I've made a basic firemaking script that will click on the tinderbox and then the logs, then wait a few seconds.
It compiles beautifully, but then when I hit F4 it goes directly to the failsafe.
Is there something I've been missing? This tends to happen a lot.
SCAR Code:
program LightAll;
{.include SRL/SRL.scar}
var
x, y, rx, ry, Logs, Tinderbox: Integer;
Finish: String;
procedure DeclareBMPs;
begin
Logs := BitmapFromString(1, 13, 'beNpr8/ZwMHFzMAYiZ2tDIBtIQ' +
'hADA2NGgH52kOGSNu8lAMTMCmc=');
Tinderbox := BitmapFromString(6, 1, 'beNqzNnS2NnS01HMw0wUyQ' +
'AgAJhsECA==');
end;
procedure FindLogs;
begin
if FindBitmap(Logs, x, y) and FindBitmap(Tinderbox, rx, ry) then
Begin
MouseSpeed := 7;
repeat
MMouse(rx, ry, 2, 1);
Wait(500+random(500));
Mouse(rx, ry, 0, 0, true);
Wait(1000+random(500));
MMouse(x, y, 0, 0);
Wait(500+random(500));
Mouse(x, y, 0, 0, true);
Wait(10000+random(5000));
until(not FindBitmap(Logs, x, y));
Finish := 'Finished.';
end else
Begin
Finish := 'Did not finish.';
end;
end;
procedure Prog;
begin
Writeln(Finish);
end;
procedure Idle;
begin
while not IsFKeyDown(4) do
Wait(10);
end;
begin
SetupSRL;
ClearDebug;
DeclareBMPs;
Idle;
FindLogs;
Prog;
end.