SCAR Code:
program Smelt;
{.include SRL/SRL.scar}
var
x, y, Iron, Coal: Integer;
procedure GetOres;
begin
OpenBankFast('feb');
Wait(500+random(50));
if not FindDTM(Iron, x, y, 0, 0, 515, 334) then
begin
WriteLn('Iron not found');
Exit;
end;
begin
Mouse(x, y, 3, 3, False);
Wait(1000+random(1000));
if ChooseOption('draw X') then
begin
Wait(600 + Random(1000));
TypeSend('9');
end else WriteLn('Withdraw X not found');
end;
if not FindDTM(Coal, x, y, 0, 0, 515, 334) then writeLn('Coal not found');
begin
Mouse(x,y, 3, 3, False);
Wait(400+random(300))
if ChooseOption('draw X') then
begin
Wait(600 + Random(1000));
TypeSend('18');
end else WriteLn('Withdraw X not found');
end;
end;
Begin // This is your mainloop!
SetupSRL;
Iron := DTMFromString('78DA637CCBC0C0E0CB80027C0D5418FE03694' +
'620FE0F048C6F800C2F54350EEA720C22503520C0F80A48F8A0AA' +
'3153944455F31248F833A001465435EF814400A67B50D47C06124' +
'1A86AAC55A451D53CC634A721C313D3CDE1A86A6AD33C50D40000' +
'A571147C');
Coal := DTMFromString('78DA63DCCFC0C0B0990105D8D96A31FC07D28' +
'C40FC1F0818F701191B50D5989AAA30F043D5800023C89CAD98E6' +
'A0A83904243632A001465435BB81C426541506068AA86A8E0289E' +
'D04DCB319D35FA5F1CEA86A760189DDA86A2A125D50D40000C72F' +
'161C');
GetOres;
end.
Enjoy, look at the changes I've made. Remember you allways need a mainloop.
Good luck!