SRL Archive - OSR Outdated Tutorials

procedure WWait(ttime: Integer);


WT-Fakawi

2006-06-09 16:34:54

WWait waits the amount of time + random 10% and will once every ten calls move the mouse using IdleTime instead of waiting. Nice small and efective AntiBan routine. I always use this aot Wait.

{*******************************************************************************
procedure WWait(ttime: Integer);
By:
Description: Waits Time+10%. Once every ten times performs IdleTime aot Wait
*******************************************************************************}
procedure WWait(ttime: Integer);
begin
if Random(10) = 1 then
IdleTime(ttime,(ttime/10),1.0)
else
Wait(ttime + Random(ttime / 10));
end;



EDIT: Note by Dankness, Do not use with for WWait's < 500 msec. Use Wait instead.

Krazy_Meerkat

2006-06-09 19:07:01

Very reputable work here :) I did some stuff like this a long time ago..

Ron

2009-05-29 19:39:32

From: WT-Fakawi
EDIT: Note by Dankness, Do not use with for WWait's < 500 msec. Use Wait instead.


Why can't you use this function with a wait less than 500 milliseconds?

~Ron

PS: Not sure if this is a grave dig because this is a tutorial section.

ShowerThoughts

2009-05-29 19:45:46

Since it doesn't always waits the same time and wtf 3 year gravedig?

Da 0wner

2009-05-30 02:55:23

What the hell is idle time :p.

JAD

2009-05-30 03:23:51

From: Da 0wner
What the hell is idle time :p.



{*******************************************************************************
procedure IdleTime(Time, Rand: integer; Gravity: extended);
By: BenLand100
Description: Randomly moves the mouse (Rand, and Gravity) for Time milliseconds
*******************************************************************************}

procedure IdleTime(Time, Rand: Integer; Gravity: Extended);
var
H, W, Cx, Cy, i, n, St: Integer;
Controls, Path: TPointArray;
LastC, LastP: TPoint;
begin
St := GetSystemTime;
GetClientDimensions(W, H);
SetArrayLength(Controls, 4);
GetMousePos(Cx, Cy);
LastP.x := Cx;
LastP.y := Cy;
LastC.x := LastP.x + (Random(Rand * 2) - Rand)
LastC.y := LastP.y + (Random(Rand * 2) - Rand)
repeat
Controls[0].x := LastP.x;
Controls[0].y := LastP.y;
Controls[1].x := LastP.x + -(LastC.x - LastP.x);
Controls[1].y := LastP.y + -(LastC.y - lastP.y);
Controls[2].x := Controls[1].x + (Random(Rand * 2) - Rand);
Controls[2].y := Controls[1].y + (Random(Rand * 2) - Rand);
Controls[3].x := Controls[2].x + (Random(Rand * 2) - Rand);
Controls[3].x := Controls[3].x + Round(-(Controls[3].x - (W / 2)) *
(Gravity));
Controls[3].y := Controls[2].y + (Random(Rand * 2) - Rand);
Controls[3].y := Controls[3].y + Round(-(Controls[3].y - (H / 2)) *
(Gravity));
LastC.x := Controls[2].x;
LastC.y := Controls[2].y;
LastP.x := Controls[3].x;
LastP.y := Controls[3].y;
Path := MakeSplinePath(Controls, 0.01);
Path := MidPoints(Path, 5);
n := GetArrayLength(Path);
for i := 0 to n - 1 do
begin
MoveMouse(Path[i].x, Path[i].y);
Wait(Random(2) + 2);
if (GetSystemTime - St >= Time) then Break
end;
until (GetSystemTime - St >= Time)
end;

Da 0wner

2009-05-30 03:32:46

Where is that located? Old SRL or an optional SRL include?

JAD

2009-05-30 04:39:58

It's in the srl include. Mouse.scar.

Da 0wner

2009-05-30 05:30:44

Oh I see, I control + spaced and searched but found nothing, but saw that I had SRL commented out :p.

Tickyy

2009-05-30 11:35:30

From: Ron
Why can't you use this function with a wait less than 500 milliseconds?

~Ron

PS: Not sure if this is a grave dig because this is a tutorial section.


actually… this is a 3 years old thread, and a big gravedig… :duh:

ZephyrsFury

2009-05-30 13:54:47

You can't grave dig tutorials.

mastaraymond

2009-05-30 14:38:22

From: ZephyrsFury
You can't grave dig tutorials.

This doesn't look like a tutorial to me :-p

ZephyrsFury

2009-05-30 14:39:30

From: mastaraymond
This doesn't look like a tutorial to me :-p


SRL Library Small Tuts about SRL-Functions in here…

Yesh.