Simba Code:
function attack: integer;
var
x, y, Pit: integer;
begin
if FindBitmapToleranceIn(Pit, X, Y, 737, 263, 795, 335, 145) then //We we find this bitmap, then...
begin
MoveMouse(x, y); //Move the mouse to where we found it (don't click or anything though)
writeLn('inside pit');
end else exit; //I've added this bit here.
//If the bitmap is not found, we'll exit the routine.
if findColorTolerance(x, y, 3035181, 20, 59, 768, 413, 5) then //If we find this color(?)
begin
writeLn('target found'); //I guess the above color is of a monster to attack?
MoveMouse(x, y); //Move the mouse, wait 2 seconds and then click? I hope the target isn't moving...
wait(2000);
ClickMouse(x, y, MOUSE_LEFT);
wait(2000)
end else writeln('target not found, not in pit');
end;