derangedyeti
2013-03-24 23:43:20
In the script I am making, I am trying to use the icons that are on the minimap to navigate to and from the General Store, but the problem is that when I find the first icon , Tele, the script ends on the way to the destination. I have added in wait timers. For instance Wait(RandomRange(10000, 11000)); but this just waits and then terminates the script there. Should I make a seperate procedure for each DTM? I feel like this is too much work. If anyone could give me advice that would be much appreciated.
program VialBuyer;
{$I SRL/SRL.Simba}
{$I P07Include.Simba}
var
Tele,Store, x, y: Integer;
Procedure P07_DeclarePlayer;
begin
P07_PlayerName :='';
P07_PlayerPass :='';
end;
Procedure GoToStore;
begin
P07_MakeCompassNorth;
Store := DTMFromString('mlwAAAHicY2dgYHjOxMDwEIifAfErIH4KxI+gbAFGBgZ+IOaC0sJALATEIkDc5SXIsH3teobpvf0M8WosDJviFMFiuSmpDLiACBAz4sFQAAAywQ9y');
Tele := DTMFromString('mlwAAAHicY2dgYOAEYmYgZgdiViDmAWI2BggA8bmRxJDFDdytGbavXQ/GIPblEB4wG0TLAeVFkDAyYMSDoQAAT18Kww==');
if FindDTM(Tele, x, y, MMX1, MMY1, MMX2, MMY2) Then
Begin
Writeln('Found Tele Icon');
Mouse(x, y, 7, 7, True);
end
else
begin
WriteLn('I need to fix the minimap');
end;
FreeDTM(Tele);
//Script abruptly ends here
P07_FFlag;
if FindDTM(Store, x, y, MMX1, MMY1, MMX2, MMY2) Then
Begin
WriteLn('Found General Store Icon');
Mouse(x, y, 5, 5, True);
end;
FreeDTM(Store);
end;
begin
P07_DeclarePlayer;
SetupP07Include;
SetupSRL;
ActivateClient;
GoToStore;
end.