Hey guys, I was hoping someone would help me with this:
Simba Code:
program Fighter;
{$i SRL/SRL.simba}
var
x, y:integer;
i:integer;
procedure fight;
begin
if FindColorSpiralTolerance(x, y, 7834773, MSX1, MSY1, MSX2, MSY2, 5) then
begin
MMouse(x, y, 0, 0);
GetMousePos(x,y);
Mouse(x, y, 0 , 0 ,true);
end;
end;
procedure screen;
begin
case random(10) of
0: begin Keydown(39);
wait(500+randomrange(500,700));
KeyUp(39); end;
1: begin Keydown(37);
wait(500+randomrange(300,600));
Keyup(37);end;
end;
end;
begin
SetUpSRL;
repeat
fight;
wait(1500+randomrange(1200,1600));
screen;
until(false);
end.
It is for an rsps just killing some rock crabs (they're always walking around not like rs) I was wondering how instead of using waits that it'd know when the creature was killed, also how can I make the finding colors more exact I have tried setting tolerance lower, but too low doesn't work.
Thank you greatly !