SRL Archive - SRL Archives

Tweaked the current Mouse(). USEFUL!


Gu3st...

2009-07-08 00:33:01

{*******************************************************************************
procedure MouseWait(mousex, mousey, ranx, rany: Integer; left: Boolean; waittime : Integer);
By: Zyt3x
Description: Added "waittime" to Mouse().
*******************************************************************************}
procedure MouseWait(mousex, mousey, ranx, rany: Integer; left: Boolean; waittime : Integer);
var
a, b, c: Integer;
begin
MMouse(mousex, mousey, ranx, rany);
Wait(60 + Random(30));
GetMousePos(b, c);
HoldMouse(b, c, left);
Wait(waittime);
GetMousePos(b, c);
ReleaseMouse(b, c, left);
Wait(100 + Random(100));
end;

{*******************************************************************************
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
By: Mutant Squirrle, with a small fix by hy71194. Redone by Zyt3x.
Description: Moves then clicks mouse.
*******************************************************************************}
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
begin
MouseWait(mousex, mousey, ranx, rany, left, 4*(20 + random(20)));
end;

Why?
Because the human does sometime value if they want to click therefore holding down the mouse button for extra long.
MouseWait(); could be added into a script like this:
case random(4) of
0..2: Mouse(x, y, 5, 5, True);
3: MouseWait(x, y, 5, 5, True, 6*(20+random(20)));
end;[SCAR]And that makes the mouse click for extra long, thus making it more human like.


I am not very good to explain things, so please try to understand the tweak before posting (not posting like "What does it do?"... :p)

THIS WILL NOT BREAK ANY SCRIPTS.

NCDS

2009-07-08 00:40:30

I recently posted something like this as well, except it checked for an UpText instead of adding extra wait.

Although it is useful, I wouldn't count on it being added to SRL for many of the same reasons stated here: http://www.villavu.com/forum/showthread.php?t=47156

I could be wrong ofcourse.

Shuttleu

2009-07-08 00:41:12

well i like it

~shut

EvilChicken!

2009-07-08 02:05:23

I remember at least two-three people doing almost exact same thing like you before, none of them were committed. And I personally dislike it, sorry.

ZephyrsFury

2009-07-08 11:54:18

I typed a long post but I pressed back on my mouse accidently and it got cleared and now I cbfed typing it again so…

Basically: No, I think its too simple and won't be used too much.

Gu3st...

2009-07-08 13:19:57

I would use this in every antiban procedure I would make, I think this is really useful.

NCDS: I would like your function better if you'd call it MouseUpText or something like that, but then it would be like "Mouse(); if WaitUpText() then". What I am saying: No really need for it :/

EvilChicken: Why do you dislike it?

ZephyrsFury: Next time you can click forward ;) Usually works for me :P