SRL Archive - OSR Help

ClickMouse if not found color?


bas

2012-04-05 11:57:27

Hello all!

I'm trying to make a BattleScape (RSPS) bot.
Its working out pretty well!

This is my first attempt to SRL/Simba.

But now i have a problem.

I made a thieving bot, but how do i make it reconise if there is no food?

i tried:


procedure GetHP;
begin

if (FindColor(x,y,Shark,556,256,724,451)) then
begin
MoveMouse(x,y+random(3));
Wait(randomrange(500, 700));
ClickMouse(x,y,mouse_Left);
Wait(randomrange(300, 450));

MoveMouse(642,183); //Move to BackPack
Wait(randomrange(20, 30));
ClickMouse(642,183,1); //Click BackPack

if not (FindColor(x,y,Shark,556,256,724,451)) then

exit;

end;
end;
end;
end;

nickrules

2012-04-05 13:04:05

Check if there is the color of the food being eaten inside of a box for each inventory spot. Or just check if the color is anywhere in the inventory.