Alek000
2010-09-01 12:12:25
Well, I'm slowly getting the hang of scripting. I made a simple script to see if I could find Coal in either the bank or in the inventory. I tried both and it couldn't find the Coal. I made 4 different DTMs of the Coal and it could not find it… If someone could look and maybe I messed up something in the script could you give me a hint.
program New;
{.include SRL/SRL.scar}
procedure LoadDTM;
var
Coal: Integer;
begin
Coal := DTMFromString('78DA63D4666260F8CEC8800C14E42518FE036' +
'990E87F20603401AA6160624005103E4C27A32590FF8911BF1A7D' +
'20FF0D01351A40FE2B026A6480FCDF4498C386DFCD001C7E0B77');
end;
procedure FindCoal;
var
X, Y, Coal: Integer;
begin
if FindDTM(Coal, X, Y, MSX1, MSY1, MSX2, MSY2) then
MMouse(X, Y, 3, 3)
else
Writeln('Could not find Coal!');
FreeDTM(Coal);
end;
procedure MainLoop;
begin
LoadDTM;
FindCoal;
end;
begin
ClearDebug;
SetupSRL;
MainLoop;
end.