Updated TinderBox.bmp:
SCAR Code:
TinderBox := BitmapFromString(7, 3, 'beNoLCrC2stRSZdNVByEDL' +
'XYI8vJ0t7O1VldihYhDpMJCgoKDAgL9/YDI39cbiIIBYsIMuA==');
I couldn't think of any reason this shouldn't be in there.
SCAR Code:
{*******************************************************************************
function TinderBoxExists(var x, y: Integer): Boolean;
By: NCDS
Description: Checks if there is TinderBox present in inventory. Returns 'x' and 'y' values it is found at.
*******************************************************************************}
function TinderBoxExists(var x, y: Integer): Boolean;
begin
Gametab(tab_Inv);
Wait(300 + Random(300));
Result := FindBitmapToleranceIn(TinderBox, x, y, MIx1, MIy1, MIx2, MIy2, 10);
end;
Tested with:
SCAR Code:
program New;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/firemaking.scar}
function TinderBoxExists(var x, y: Integer): Boolean;
begin
Gametab(tab_Inv);
Wait(300 + Random(300));
Result := FindBitmapToleranceIn(TinderBox, x, y, MIx1, MIy1, MIx2, MIy2, 10);
end;
var
x, y: Integer;
begin
SetupSRL;
ActivateClient;
LoadFiremakingBitmaps;
if TinderBoxExists(x, y) then
begin
Writeln('x := '+IntToStr(x)+';');
Writeln('y := '+IntToStr(y)+';');
end;
end.
Output:
SCAR Code:
New client targeted
Successfully compiled (2060 ms)
SRL Compiled in 16 msec
x := 572;
y := 233;
Successfully executed