SCAR Code:
program New;
{.include SRL/SRL.scar}
{*******************************************************************************
procedure lmouse(x, y, randomx, randomy, overshot : Integer);
By: Hobbit with help from Nielsie95 & Smartzkid
Description: Moves the mouse in a segmented laptop motion.
MissChance: The chances of your mouse missing the target and having
to correct. So like 1/# of chaces. For example if overshot=50 then
there is a 1/50 chance it will overshoot the target.
*******************************************************************************}
procedure lmouse(x, y, randomx, randomy, misschance : Integer);
Var
cx, cy, seg, e, f, g, nx, ny, zx, zy, hypo : integer;
a, b, c, randSpeed : extended;
miss : boolean;
begin
MouseSpeed:= RandomRange(14,17);
miss:= False;
if(Random(misschance) = 0) then
miss:= True;
e:= 0;
GetMousePos(cx, cy);
a:= x - cx;
b:= y - cy;
c:= Pow(a,2) + Pow(b,2)
hypo:= Round(Sqrt(c));
case hypo of
0: Exit;
1..225: seg:=1;
226..600: seg:= Random(2) + 1;
601..1800: seg:= random(3) + 2;
else seg := 5;
end;
f:= Round( a / seg);
g:= Round( b / seg);
repeat
Wait(30 + random(50));
{Begin: Modified from MMouse by Benland100}
randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
if randSpeed = 0.0 then
randSpeed := 0.1;
getMousePos(cx,cy);
nx:= (cx + (f * e)) + random(randomx);
ny:= (cy + (g * e)) + random(randomy);
{End: Modified from MMouse by Benland100}
if(miss = true)then
begin
nx:= nx + RandomRange(5,10);
ny:= ny + RandomRange(5,10);
end;
WindMouse(cx,cy,nx,ny,11.0,8.0,10.0/randSpeed,12.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
e:= e + 1;
until(e = seg);
GetMousePos(cx, cy);
if Distance(x, y, cx, cy) > 5 then
begin
Wait(30 + random(30));
WindMouse(cx,cy,(x + random(randomx)),(y + random(randomy)),11.0,6.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
end;
end;
{*******************************************************************************
procedure lcmouse(x, y, randomx, randomy : Integer; left : Boolean);
By: Hobbit with help from Nielsie95 & Smartzkid
Description: Moves the mouse in a segmented laptop motion then clicks
MissChance: The chances of your mouse missing the target and having
to correct. So like 1/# of chaces. For example if overshot=50 then
there is a 1/50 chance it will overshoot the target.
*******************************************************************************}
procedure lcmouse(x, y, randomx, randomy, misschance : Integer; left : Boolean);
Var
cx, cy, seg, e, f, g, j, nx, ny, o, p, zx, zy, hypo : integer;
a, b, c, randSpeed : extended;
miss : boolean;
begin
MouseSpeed:= RandomRange(14,17);
miss:= False;
if(Random(misschance) = 0) then
miss:= True;
e:= 0;
GetMousePos(cx, cy);
a:= x - cx;
b:= y - cy;
c:= Pow(a,2) + Pow(b,2)
hypo:= Round(Sqrt(c));
case hypo of
0: begin
Mouse(x,y,0,0,left);
Exit;
end;
1..225: seg:=1;
226..600: seg:= Random(2) + 1;
601..1800: seg:= random(3) + 2;
else seg := 5;
end;
f:= Round( a / seg);
g:= Round( b / seg);
repeat
Wait(30 + random(50));
{Begin: Modified from MMouse by Benland100}
randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
if randSpeed = 0.0 then
randSpeed := 0.1;
getMousePos(cx,cy);
nx:= (cx + (f * e)) + random(randomx);
ny:= (cy + (g * e)) + random(randomy);
{End: Modified from MMouse by Benland100}
if(miss = true)then
begin
nx:= nx + RandomRange(16,26);
ny:= ny + RandomRange(16,30);
end;
WindMouse(cx,cy,nx,ny,11.0,8.0,10.0/randSpeed,12.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
e:= e + 1;
until(e = seg);
repeat
GetMousePos(cx, cy);
if Distance(x, y, cx, cy) > 5 then
begin
Wait(30 + random(30));
WindMouse(cx,cy,(x + random(randomx)),(y + random(randomy)),11.0,6.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
end;
until(Distance(x, y, cx, cy) > 5)
Wait(20 + Random(20));
GetMousePos(cx, cy);
HoldMouse(cx + random(3), cy, left);
repeat
Wait(20 + Random(30));
j := j + 1;
until (j > 4);
GetMousePos(cx, cy);
ReleaseMouse(cx, cy, left);
Wait(100 + Random(100));
end;
begin
end.