SCAR Code:
function FindAxe: Boolean;
var
InvAxe, WieldAxe, Ix, Iy: Integer;
begin
if not LoggedIn then exit;
srl_LoadBitmaps([47, 48, 49, 50, 51, 52, 53, 54]);
GameTab(5);
for WieldAxe := 0 to 7 do
if FindBitmapToleranceIn(srl_GetBitmap(54-WieldAxe),Ix, Iy, 566, 285, 606, 327, 10) then
break;
GameTab(4)
for InvAxe := 0 to 7 do
if FindBitmapToleranceIn(srl_GetBitmap(54-InvAxe), Ix, Iy, MIX1, MIY1, MIX2, MIY2, 10) then
break;
if(InvAxe = 8)and(WieldAxe = 8)then
begin
Result := False;
Writeln('No axe was found.');
srl_FreeBitmaps;
Exit;
end;
EquipAxe := (WieldAxe - InvAxe < 0);
case Min(WieldAxe, InvAxe) of
0: WriteLn('Using Dragon axe');
1: WriteLn('Using Rune axe');
2: WriteLn('Using Addy axe');
3: WriteLn('Using Mith axe');
4: WriteLn('Using Black axe');
5: WriteLn('Using Steel axe');
6: WriteLn('Using Iron axe');
7: WriteLn('Using Bronze axe');
end;
Result := True;
srl_FreeBitmaps;
end;