So im trying to make a bot for this flash game to get some more experience with simba for runescape bots, and this bot chucks the enemies in the air but the screen saying finished the level, go to next level pops up randomly and if the certain color for the men isent there it would go and move the mouse to go to the next level.
Heres my code at the moment
This certain line isent working though (the if not FindColorTolerance)
Error code is: [Error] (22:27): Unknown identifier 'x' at line 21
Compiling failed.
if not FindColorTolerance(x, y, 13421772 , 20) then
begin
MoveMouse(356, 371);
ClickMouse(356, 371, 1);
Wait(350);
MoveMouse(510, 337);
ClickMouse(510, 337, 1);
end;
end;
The whole code is here:
program new;
procedure StartGame;
begin
MoveMouse(329, 259);
ClickMouse(329, 259, 1);
end;
procedure KillThem;
var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, 13421772 , 14, 213, 169, 368, 20) then
MoveMouse(x, y);
begin
HoldMouse(x, y, 1);
MoveMouse(249, 2);
ReleaseMouse(249, 2, 1);
end;
end;
begin
if not FindColorTolerance(x, y, 13421772 , 20) then
begin
MoveMouse(356, 371);
ClickMouse(356, 371, 1);
Wait(350);
MoveMouse(510, 337);
ClickMouse(510, 337, 1);
end;
end;
begin
StartGame;
repeat
KillThem;
until(False)
end.


Reply With Quote


