Simba Code:
procedure HomeTeleport;
var
Box: TBox;
TPA: TPointArray;
begin
if (not (LoggedIn)) then
Exit;
GameTab(tab_Magic);
Box := IntToBox(560, 290, 589, 320);
findColorsTolerance(TPA, 5514567, Box.x1, Box.y1, Box.x2, Box.y2, 15);
Box := GetTPABounds(TPA);
Smart_DrawBox(Box);
MiddleTPAEx(TPA, x, y);
HumanMMouse(x, y, 5, 5);
ClickMouse2(True);
Wait(2000 + Random(250));
if LodeStoneScreen then
begin
writeln('Found LodeStone Screen');
Exit;
end
else
begin
Writeln('Trying second time');
findColorsTolerance(TPA, 5514567, Box.x1, Box.y1, Box.x2, Box.y2, 15);
Box := GetTPABounds(TPA);
Smart_DrawBox(Box);
MiddleTPAEx(TPA, x, y);
HumanMMouse(x, y, 5, 5);
ClickMouse2(True);
Wait(2000 + Random(250));
if LodeStoneScreen then
begin
writeln('Found LodeStone Screen');
Exit;
end
else
writeln('Tried twice could not open LodeScreen');
TerminateScript;
end;
end;