SRL Archive - SRL Archives

Procedure SRmouse( x , y : integer; rx , ry : integer);


solemn wishes

2006-08-28 07:38:29

hi everyone,

I made this for one of my new scripts a few days ago but im not sure if its ok to use or not, what it does is very randomly move the mouse smoothy sometimes away from your target then plots a few random cords on the way to the object moving towars them, it is capable of curving and even circles, but very rare….

im not sure if this is good or not to use so please just test it out in paint and tell me what you think.

a qwick example.


program mousetest;
{.include SRL/SRL.scar}

const mousemovespeed = 100;

Procedure SRmouse( x , y : integer; rx , ry : integer);
Var
xr : integer;
a, b, c : integer;
cx, cy, mx, my, ox, oy, ms: Integer;
mu, mum1, mum12, mu2, incr: Extended;
begin

GetMousePos(cx,cy)
if(cx=x)and(cy=y)then Exit else cx:= x; cy := y;

xr:= rx; if(rx > 5 ) then begin
xr:= Random(5) + Random(5) -
Random(5) + random(2) - random(2);
If(xr>5)and(xr<8)then xr:= xr / 2;
end else

if(rx <5 ) then xr:= random(3) + random(3)-
Random(3) + random(1) - random(1);

begin
repeat

incr := ((Random(2) + 1) / 1000) + Random(11) / 10000;
mu:= mu + incr; mu2 := mu * mu; mum1 := 1 - mu;
mum12 := mum1 * mum1;
mx := Trunc(cx * mum12 + 2 * ox * mum1 * mu + x * mu2);
my := Trunc(cy * mum12 + 2 * oy * mum1 * mu + y * mu2);

mx := mx / 8; my := my / 8;
a:= mx; b:= my;
repeat
c:= c + 1;
Mmouse(mx , my , 0 , 0); wait(mousemovespeed + random(10));
mx:= mx + a;
my:= my + a;

case random(2)of
0 : mx:= mx + a;
1 : mx:= mx - a;
end;

case random(2)of
0 : my:= my + a;
1 : my:= my - a;
end;
until(c=5)
ms := ms + 1;
wait(mousemovespeed + random(10));
until mu >=0;
movemousesmooth(cx,cy)
writeln(inttostr(xr))
end;
end;


begin
SetupSRL;
wait(1000)
SRmouse(272,316,6,5)
end.

Dark_Sniper

2006-08-28 21:29:00

lol this about the same as my own mouse movements.

SubiN

2006-08-29 00:37:39

someone is copying !!! na just joking.

thecoolbrian

2006-08-29 16:09:54

is this better then mmouse if it is i will use this is my script

Dark_Sniper

2006-08-29 19:58:10

mmouse and mouse are better but they are getting into trying to be so human its unhuman.

RsN

2006-08-29 21:41:54

:P simple bezier

solemn wishes

2006-09-20 14:56:41

lol thx rsn. :duh: