SRL Archive - SRL Archives

Random Mouse Movement!


Camaro'

2008-05-13 15:59:17

{*******************************************************************************
procedure RandomMouseMovement;
By: cnr sport
Description: Moves the mouse randomly in a specific pattern.
*******************************************************************************}
procedure RandomMouseMovement;
var
CurSpeed, B : Byte;
begin
CurSpeed := MouseSpeed;
MouseSpeed := RandomRange(60, 75);
case random(4) of
0: begin
writeln('Zig Zagging');
B := 0;
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
repeat
MMouse(748 + random(250), 367 + random(250), 1, 1);
MMouse(280 + random(250), 458 + random(250), 1, 1);
Inc(B);
until B >= 3 + random(5);
end;
1: begin
WriteLn('Looping');
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
MMouse(578 + random(130), 184 + random(130), 1, 1);
MMouse(377 + random(130), 150 + random(130), 1, 1);
MMouse(287 + random(130), 204 + random(130), 1, 1);
MMouse(443 + random(130), 372 + random(130), 1, 1);
MMouse(5 + random(130), 413 + random(130), 1, 1);
MMouse(769 + random(130), 514 + random(130), 1, 1);
end;
2: begin
WriteLn('Up / Down');
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
MMouse(456 + random(30), 147 + random(30), 1, 1);
MMouse(421 + random(30), 758 + random(30), 1, 1);
MMouse(472 + random(30), 768 + random(30), 1, 1);
MMouse(577 + random(30), 50 + random(30), 1, 1);
MMouse(603 + random(30), 765 + random(30), 1, 1);
MMouse(595 + random(30), 806 + random(30), 1, 1);
end;
3: begin
WriteLn('Random');
B := 0;
repeat
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
Inc(B);
until B >= 5 + random(4);
end;
end;
Mousespeed := CurSpeed;
end;

Honestly, i dont care if the mouse doesnt move in the "loop" or the "zig zag" Its just here to provide randomness.
Evil chicken fixed up the code UP then i made it more humany not even sure if thats a word.

{*******************************************************************************
procedure RandomMouseMovement;
By: cnr sport
Description: Moves the mouse randomly in a specific pattern.
*******************************************************************************}

procedure RandomMouseMovement;
var
CurSpeed, B : Byte;
begin
CurSpeed := MouseSpeed;
MouseSpeed := RandomRange(30, 45);
case random(4) of
0: begin
writeln('Zig Zagging');
B := 0;
MMouse(MMX1, MMY1, MMY1, MMY2);
wait(1+random(4));
repeat
MMouse(748 + random(60), 367 + random(60), 1, 1);
wait(1+random(4));
MMouse(280 + random(60), 458 + random(60), 1, 1);
Inc(B);
MMouse(748 + random(60), 337 + random(60), 1, 1);
wait(1+random(4));
MMouse(280 + random(60), 428 + random(60), 1, 1);
until B >= 2 + random(2);
end;
1: begin
WriteLn('Looping');
MMouse(MMX1, MMY1, MMX2 , MMY2);
wait(1+random(4));
MMouse(578 + random(130), 184 + random(130), 1, 1);
MMouse(377 + random(130), 150 + random(130), 1, 1);
MMouse(287 + random(130), 204 + random(130), 1, 1);
MMouse(443 + random(130), 372 + random(130), 1, 1);
MMouse(5 + random(130), 413 + random(130), 1, 1);
MMouse(769 + random(130), 514 + random(130), 1, 1);
end;
2: begin
WriteLn('Up / Down');
MMouse(MMX1, MMY1, MMX2, MMY2);
wait(3+random(4));
MMouse(456 + random(60), 147 + random(60), 1, 1);
wait(3+random(4));
MMouse(421 + random(60), 758 + random(60), 1, 1);
MMouse(472 + random(60), 768 + random(60), 1, 1);
MMouse(577 + random(60), 50 + random(60), 1, 1);
MMouse(603 + random(60), 765 + random(60), 1, 1);
MMouse(595 + random(60), 806 + random(60), 1, 1);
end;
3: begin
WriteLn('Random');
B := 0;
repeat
MMouse(MMX1, MMY1, MMX2, MMY2);
wait(1+random(4));
Inc(B);
until B >= 6 + random(4);
end;
end;
Mousespeed := CurSpeed;
end;

Harry

2008-05-13 16:01:33

Mousespeed:=66+random(15);
O MAI GAWD.. Don't do that ;)

Camaro'

2008-05-13 16:02:34

From: Hy71194
Mousespeed:=66+random(15);
O MAI GAWD.. Don't do that ;)


Or else it looks so botty.. Mousespeed 66 isnt as bad as it looks lol. You can edit to your needings. For me 66 is fine

EvilChicken!

2008-05-13 16:21:48

Actually, the mosuespeed works pretty well. Test it, Hy. It actually works cooler than the code looks like. Alhough, this is really simple. I improved the code, slightly. Here you go. :)

{*******************************************************************************
procedure RandomMouseMovement;
By: cnr sport
Description: Moves the mouse randomly in a specific pattern.
*******************************************************************************}
procedure RandomMouseMovement;
var
CurSpeed, B : Byte;
begin
CurSpeed := MouseSpeed;
MouseSpeed := RandomRange(60, 75);
case random(4) of
0: begin
writeln('Zig Zagging');
B := 0;
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
repeat
MMouse(748 + random(250), 367 + random(250), 1, 1);
MMouse(280 + random(250), 458 + random(250), 1, 1);
Inc(B);
until B >= 3 + random(5);
end;
1: begin
WriteLn('Looping');
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
MMouse(578 + random(130), 184 + random(130), 1, 1);
MMouse(377 + random(130), 150 + random(130), 1, 1);
MMouse(287 + random(130), 204 + random(130), 1, 1);
MMouse(443 + random(130), 372 + random(130), 1, 1);
MMouse(5 + random(130), 413 + random(130), 1, 1);
MMouse(769 + random(130), 514 + random(130), 1, 1);
end;
2: begin
WriteLn('Up / Down');
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
MMouse(456 + random(30), 147 + random(30), 1, 1);
MMouse(421 + random(30), 758 + random(30), 1, 1);
MMouse(472 + random(30), 768 + random(30), 1, 1);
MMouse(577 + random(30), 50 + random(30), 1, 1);
MMouse(603 + random(30), 765 + random(30), 1, 1);
MMouse(595 + random(30), 806 + random(30), 1, 1);
end;
3: begin
WriteLn('Random');
B := 0;
repeat
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
Inc(B);
until B >= 5 + random(4);
end;
end;
Mousespeed := CurSpeed;
end;


begin
RandomMouseMovement;
end.

Camaro'

2008-05-13 16:53:50

From: EvilChicken!
Actually, the mosuespeed works pretty well. Test it, Hy. It actually works cooler than the code looks like. Alhough, this is really simple. I improved the code, slightly. Here you go. :)

{*******************************************************************************
procedure RandomMouseMovement;
By: cnr sport
Description: Moves the mouse randomly in a specific pattern.
*******************************************************************************}
procedure RandomMouseMovement;
var
CurSpeed, B : Byte;
begin
CurSpeed := MouseSpeed;
MouseSpeed := RandomRange(60, 75);
case random(4) of
0: begin
writeln('Zig Zagging');
B := 0;
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
repeat
MMouse(748 + random(250), 367 + random(250), 1, 1);
MMouse(280 + random(250), 458 + random(250), 1, 1);
Inc(B);
until B >= 3 + random(5);
end;
1: begin
WriteLn('Looping');
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
MMouse(578 + random(130), 184 + random(130), 1, 1);
MMouse(377 + random(130), 150 + random(130), 1, 1);
MMouse(287 + random(130), 204 + random(130), 1, 1);
MMouse(443 + random(130), 372 + random(130), 1, 1);
MMouse(5 + random(130), 413 + random(130), 1, 1);
MMouse(769 + random(130), 514 + random(130), 1, 1);
end;
2: begin
WriteLn('Up / Down');
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
MMouse(456 + random(30), 147 + random(30), 1, 1);
MMouse(421 + random(30), 758 + random(30), 1, 1);
MMouse(472 + random(30), 768 + random(30), 1, 1);
MMouse(577 + random(30), 50 + random(30), 1, 1);
MMouse(603 + random(30), 765 + random(30), 1, 1);
MMouse(595 + random(30), 806 + random(30), 1, 1);
end;
3: begin
WriteLn('Random');
B := 0;
repeat
MMouse(MMX1, MMY1, MMX2 - MMX1, MMY2 - MMY1);
Inc(B);
until B >= 5 + random(4);
end;
end;
Mousespeed := CurSpeed;
end;


begin
RandomMouseMovement;
end.


Thank you evil chicken :p

Daniel

2008-05-14 06:09:06

I'm looking at this: …in a specific pattern. Is this pattern always the same? If it is, wouldn't it look in-human?

Camaro'

2008-05-14 06:58:43

From: IP-Drowner
I'm looking at this: …in a specific pattern. Is this pattern always the same? If it is, wouldn't it look in-human?


we the one i posted , the second one starts out my moving to a random point to the screen, and either moves in a random zigzag, random up/down motion,random loopy , or just random..

It has a randomeness of like 30

Gu3st...

2008-05-14 10:41:46

omfg 60+random(15); is too much, when i run the script it doest look humanlike at ALL!

Camaro'

2008-05-14 13:17:35

From: Zytex!
omfg 60+random(15); is too much, when i run the script it doest look humanlike at ALL!


Lol, me and evil chicken agree that its fine, and you and hy71194 think its too high , It could also be are mouse speed on our computers..

Start –> Control Panel –> Printers and other hardware–>Mouse–>Pointer Options

I have mine set on the second bar( Really slow) but when i got my mouse(red dot on the bottom) it was so fast if u would move it an inch u wouldn't even be able to see it It would be too fast.. You probbaly have a different type of mousespeed on your computer and mouse. So you dont have to go by the 60+random(15) u can add ur own numbers.

Gu3st...

2008-05-14 15:26:07

Yeap i think its way to much, cus if we make the mmouse have 30+ m speed then runescape would see that our mouse moves too fast (and rs cant really record the mouse. Only when the mouse clicks the rs-thing can record the time taken from xs to xe.).

Harry

2008-05-14 15:44:31

Lol, me and evil chicken agree that its fine, and you and hy71194 think its too high , It could also be are mouse speed on our computers..

Start –> Control Panel –> Printers and other hardware–>Mouse–>Pointer Options

I have mine set on the second bar( Really slow) but when i got my mouse(red dot on the bottom) it was so fast if u would move it an inch u wouldn't even be able to see it It would be too fast.. You probbaly have a different type of mousespeed on your computer and mouse. So you dont have to go by the 60+random(15) u can add ur own numbers.

I don't think the Mouse Speed in control panel affects the MouseSpeed in MMouse ;)

Camaro'

2008-05-14 16:54:20

From: Hy71194
I don't think the Mouse Speed in control panel affects the MouseSpeed in MMouse ;)


LOL i dont know:f:

But besides the mousespeed, anyone like the function it self?