Alright, I was trying to script an antilogout script utilizing the Mmouse function. It is not complete yet so what I have included is not yet finished.
Problem: When the script is run, the mouse gets stuck in one location. What should happen is if the script detecs the mouse has been idle for a one second (for the sake of testing for immediate results), the mouse moves randomly to a location (to reactivate Runescape's timer). Again, the script has not been completed, that is not the problem; the problem is that the mouse will not move to it's random destination.
SCAR Code:
program Antilogout;
{.include SRL/SRL.scar}
var
x,y,xchange,ychange,xmove,ymove,counter: Integer;
procedure Antilogout;
begin
repeat
GetMousePos(x,y);
Wait(1000+random(100)); // Wait 1 Second Before Testing Mouse Location
GetMousePos(xchange,ychange);
if (x=xchange) then
begin
GetMousePos(x,y);
xmove:= random(200);
ymove:= random(200);
Mmouse(x+xmove,y+ymove,20,20);
counter:= counter + 1;
writeln('Script Successfully Executed '+IntToStr(counter)+' Times');
Wait(1000);
end;
until(false)
end;
begin
Antilogout;
end.
Any Help would be greatly appreciated
Thanks!
- Pianoman993