In my script, the bot checks for combat, when the hp bar disapears it starts the looting procedure:
Simba Code:
procedure PickUp;
var
X, Y: Integer;
begin
Wait(500 + Random(1200));
WriteLn('Looking for bones...');
if FindColorTolerance(X, Y, loot, 223, 114, 388, 290, 15) then
begin
WriteLn('Found bones!');
MouseSpeed:=40;
mmouse(x, y,1,1);
Wait(120 + Random(80));
ClickMouse(x, y, mouse_Right);
WriteLn('Looking for charm...');
Wait(1100);
FindBitmapToleranceIn(charm, X, Y,161, 86, 420, 252, 95)
MouseSpeed:=40;
mmouse(x, y,1,1);
WriteLn('Found charm!');
Wait(500);
ClickMouse(X, Y, mouse_Left);
Wait(1820 + Random(80));
end;
end;
After its done with this it is supposed to go back to attacking Skeletons but it won't. In a older version the method was:
Simba Code:
procedure PickUp;
var
X, Y: Integer;
begin
Wait(1700 + Random(1200));
WriteLn('Looking for bones...');
if FindColorTolerance(X, Y, loot, 223, 114, 388, 290, 15) then
begin
WriteLn('Found bones!');
MouseSpeed:=40;
mmouse(x, y,1,1);
Wait(120 + Random(80));
ClickMouse(x, y, mouse_Right);
end;
WriteLn('Looking for charm...');
Wait(1100);
if FindBitmapToleranceIn(charm, X, Y,161, 86, 420, 252, 85) then
begin
MouseSpeed:=40;
mmouse(x, y,1,1);
WriteLn('Found charm!');
Wait(500);
ClickMouse(X, Y, mouse_Left);
Wait(1820 + Random(80));
end;
end;
But it proved to be to buggy so i re-did it.