PDA

View Full Version : [Money Making] How to make a random mouse click in a little selected square?



RSPS Scripter
04-08-2018, 04:18 PM
so i manged to do this....

this is what i made so far

program Whine_Grabber;

{$I SRL-6/SRL.simba} // Be sure to add this to ALL your scripts!

Procedure Whine_Grabber

Var

Wine_Of_Zamorak :Integer;

X, y:Integer;


begin
//This is the DTM of the wine
Wine_Of_Zamorak:= DTMFromString('m1gAAAHic42JgYGhlZGBoBOJeIO4D4n4g7g LiOiAuBeJiIK4A4plAte1A3AXEE4F4BhAvBeJlQDwXiKcA8QQg 1lJTY8hOTGBwtrVliAgIYGirrGSwMTNj4GRnZxAWFGQwNzRkSI mOZhABqiUGMxKJEQAA3+kTVA==');

if
FindDTM(Wine_Of_Zamorak, x, y, 332, 120, 438, 195) then // Looking Location of the wine


// starting this when we find the wine
Begin

mouse(point(x, y), MOUSE_MOVE, MOUSE_HUMAN); //Moving to wine

mouse(point(x, y), MOUSE_Left, MOUSE_HUMAN); //Clicking on the wine

wait(random(3400, 5020)); //Random wait between a and b ms

mouse(point(692, 277), MOUSE_MOVE, MOUSE_HUMAN); //Moving to telegrab Icon I WHANT TO CLICK RANDOMLY TO THIS SO I DONT CLICK ALWAYS ON THE SAME PIXEL

Wait(random(1200, 1600)); //Random wait between a and b ms

mouse(point(692, 277), MOUSE_Left, MOUSE_HUMAN); //Clicking on telegrab Icon I WHANT TO CLICK RANDOMLY TO THIS SO I DONT CLICK ALWAYS ON THE SAME PIXEL

Wait(random(1200, 1600)); //Random wait between a and b ms

mouse(point(379, 185), MOUSE_MOVE, MOUSE_HUMAN); //Moving back to the spawn location of the wine

FreeDTM(Wine_Of_Zamorak); // freeDTM so idk why this is needed.....

end;

end;
Begin

Repeat

Whine_Grabber;

until(False);

end.

Aspect
04-08-2018, 07:17 PM
I believe the randomrange(min, max) function may be what you're looking for.
So you could use for example
mouse(point(690 + randomrange(1, 5), 275 + randomrange(1, 5)), MOUSE_MOVE, MOUSE_HUMAN);

I haven't touched Simba in quite a while, so I'm not sure if that formatting is correct.

you could also generate the random number of x and y before hand, each loop though, and plug in the variables into the mouse function.
ranx := randomRange(690, 695);
rany := randomRange(275, 280);
mouse(point(ranx, rany), MOUSE_MOVE, MOUSE_HUMAN);

RSPS Scripter
04-08-2018, 07:57 PM
Thank you for the reply

Yoopi told me in teh chat to use these and it works great.

this is what yoopi said to me. mouse(random(690, 694), random(275, 279), MOUSE_MOVE, MOUSE_HUMAN);

Lipcot
04-09-2018, 02:53 PM
Thank you for the reply

Yoopi told me in teh chat to use these and it works great.

this is what yoopi said to me. mouse(random(690, 694), random(275, 279), MOUSE_MOVE, MOUSE_HUMAN);

Try putting code in [SIMBA] Code, you can find it in Advanced. It makes it way easier to read

P1nky
04-09-2018, 05:04 PM
You can also use MouseBox:
MouseBox(x1, y1, x2, y2: Integer; ClickType: Integer);
Moves mouse into a random position in the box. Clicks if told to.

slackeru
05-18-2020, 09:35 AM
Try this
program FindLogin;

procedure login;
begin
ClickMouseSpline(352, 176, 413, 189, True);
end;

begin
login;
end.