SRL Archive - SRL Snippets

Missclick Procedure


Footy

2012-09-30 12:37:42

This is a quick snippet I made, I still have to make a few improvements, but I'd like to hear your opinions on it. It's basically a replacement for mouse. (misspercent) % of the time it will missclick, move the mouse off the menu, then click again in the correct spot. I'm not great at explaining stuff, so just try it. :p

{=============================================================================)
Procedure FootyMouse(x, y, ranx, rany, misspercent:integer; button:variant);

Author: Footy

Description: Moves mouse and clicks, missclicks and corrects itself
(misspercent) percent of the time.

Idea: Litoris

Note: Be careful using mouse_left as the missclickbutton. If used on the MS, it
could walk you somewhere.
(=============================================================================}
Procedure FootyMouse(x, y, ranx, rany, misspercent:integer; button, missclickbutton:variant);
var
sx, sy, r, menuDTM:integer;
begin
case random(100) of
0..(misspercent - 1):
begin
mmouse(x + (randomrange(-40, 40)), y + (randomrange(-40, 40)), 0, 0);
wait(randomrange(15, 40));
clickmouse2(mouse_right);
wait(randomrange(40, 150));
getmousepos(sx, sy);
r := random(4);
if r = 0 then
mmouse(sx + randomrange(182, 260), sy + randomrange(80, 150), 0, 0) else
if r = 1 then
mmouse(sx + randomrange(180, 200), sy - randomrange(80, 150), 0, 0) else
if r = 2 then
mmouse(sx - randomrange(180, 200), sy + randomrange(80, 150), 0, 0) else
mmouse(sx - randomrange(180, 200), sy - randomrange(80, 150), 0, 0);
wait(randomrange(80, 250));
mouse(x, y, ranx, rany, button);
end;
misspercent..99:
begin
mouse(x, y, ranx, rany, button);
end;
end;
end;

litoris

2012-09-30 12:45:24

Maybe you should call it litorismouse, since I gave you the idea.:fiery:

Lol jk, it's pretty good. I'll make one tomorrow myself, I have never made mouse functions before so it'll be fun.

Footy

2012-09-30 12:49:27

Neither have I, this was my first one. I gave you credit for the idea in the description. :)

Nebula

2012-09-30 13:47:49

Nvm I'm retarted.

—
It looks decent, but I'm pretty sure this has already been made :p

Footy

2012-09-30 13:55:19

Random(100) is 0-99, random(99) is 0-98. So for percent, I would use random(100), no?

masterBB

2012-09-30 14:38:38

When you define UseLaptopMouse, all the functions will have a random change of missing, based on the distance and a few other factors. This is for all the mouse functions and srl functions.

Shatterhand

2012-10-03 05:30:39

From: masterBB
When you define UseLaptopMouse, all the functions will have a random change of missing, based on the distance and a few other factors. This is for all the mouse functions and srl functions.

How to do that?
Great job Footy. Looks cool.

riwu

2012-10-03 05:47:45

From: Shatterhand
How to do that?
Great job Footy. Looks cool.

{$DEFINE UseLaptopMouse}
Just like how you would define SMART.

Shatterhand

2012-10-03 07:26:36

From: riwu
{$DEFINE UseLaptopMouse}
Just like how you would define SMART.

Thanks. :)

Sax

2012-10-28 15:13:45

could you check the procedure again if it works properly? I tried but it seems to be something wrong. first it clicks a little down (I think its because of the nav bar) and then it makes some movements I dont get. It right-clicks somewhere in script dunno why

I used this

FootyMouse(665, 314, 0, 0, 99, mouse_Left, mouse_Left);

Footy

2012-10-28 15:48:43

I'll look at this again in a bit, I made this a while ago, it could have broken… Make sure you are still deducting 59 from your y coord.

Sax

2012-10-28 15:55:00

From: Footy
I'll look at this again in a bit, I made this a while ago, it could have broken… Make sure you are still deducting 59 from your y coord.


I did and it stills act weird. I also tried to mess up a little with the code changing some stuff and it was better but not as it should be.
please see if you can do something as this procedure is very helpful for human like movements

Footy

2012-10-30 15:31:55

That was supposed to be 50 from your Y coords. :p Leme look over it now.