Code:
program MapleSnijder;
{.include SRL/SRL.scar}
var
Maple, Knife: Integer;
function LoadBitmaps: Boolean;
begin
Maple := BitmapFromString(5, 4, 'beNqz5o205g235Aky4wkw5fY24' +
'oaQngZcLrpcTtqc7npcQDZQxM8YJAVEQJWhFjxALZEAUIYLFg==');
Knife := BitmapFromString(6, 5, 'beNpjYHK2NvRwMGFgYMpISUlJS' +
'IiLioRz05KSEmJiIkND4SJJcXHREeHT+vshIlP6ertbW5tqaoBsIH' +
'LX44IjBgA+dxdO');
end;
function GetMapleFromBank: Boolean;
var
x, y: Integer;
begin
if FindBitmapToleranceIn(Maple, x, y, MSX1, MSY1, MSX2, MSY2, 5) then
begin
Writeln('Found Maple in bank!');
MMouse(x, y, 2, 2);
Wait(80 + Random(100));
Mouse(x, y, 0, 0, False);
Wait(500 + Random(100));
ChooseOption('Withdraw-30');
CloseWindow;
Wait(200 + Random(100));
if FindBitmapToleranceIn(Maple, x, y, MIX1, MIY1, MIX2, MIY2, 5) then
Writeln('Found Maple in inventory, moving on!')
else
begin
Writeln('Could not find maple in inventory, logging out.');
Logout;
end;
end;
Result := True;
FreeBitmap(Maple);
end;
function CutMaple: Boolean;
var
x, y: Integer;
begin
if FindBitmapToleranceIn(Knife, x, y, MIX1, MIY1, MSX2, MIY2, 5) then
begin
Writeln('Found Knife in inventory!');
Mouse(x, y, 1, 1, True);
if FindBitmapToleranceIn(Maple, x, y, MIX1, MIY1, MIX2, MIY2, 5) then
begin
Mouse(x, y, 1, 1, True);
MouseBox(MCX1, MCY1, MCX2, MCY2, 2);
ChooseOption('Make X');
Wait(100 + Random(200));
TypeSend('27');
Wait(50000);
end else
Writeln('Could not find Knife in inventory, logging out.');
end;
Result := True;
FreeBitmap(Maple);
FreeBitmap(Knife);
end;
procedure MainLoop;
begin
SetupSRL;
ActivateClient;
ClearDebug;
if GetMapleFromBank then
Writeln('We have clicked the Maple logs!')
else
begin
Writeln('We have not clicked the Maple logs.');
end;
if CutMaple then
Writeln('We have cutted Maple longbows!')
else
begin
Writeln('We did not have cutted Maple longbows.');
end;
end;
begin
MainLoop;
end.