westkevin12
2013-04-27 10:49:13
ok so i made some DTMs to walk from the yanil bank to the iron mining pit but sometimes it doesn't find them so i made backup DTMs to each of my DTM. now i need to know how to make simba use the backup DTM if it can't find the main DTM. please don't just "fix my script" i just want to know the order and how to make it go to a backup only if it couldn't find the main and i want to be able to do it on my own in the future. thankyou!
procedure WalkToPit;
var
aFound: Extended;
begin
if
FindDTMRotatedAlternating(gate, x, y, 560, 12, 720, 156, -15, 15, 2, aFound)
then
begin
writeln('walking to the pit')
mmouse(x,y,2,2);
clickmouse2(MOUSE_LEFT);
wait(8000);
writeln('25% there')
end;
if
FindDTMRotatedAlternating(betweentrees, x, y, 560, 12, 720, 156, -15, 15, 2, aFound)
then
begin
mmouse(x,y,2,2);
clickmouse2(MOUSE_LEFT);
wait(7000);
writeln('50% there')
end;
if
FindDTMRotatedAlternating(nearpit, x, y, 560, 12, 720, 156, -15, 15, 2, aFound)
then
begin
mmouse(x,y,2,2);
clickmouse2(MOUSE_LEFT);
wait(7000);
writeln('75% there')
end;
if
FindDTMRotatedAlternating(inpit, x, y, 560, 12, 720, 156, -15, 15, 2, aFound)
then
begin
mmouse(x,y,2,2);
clickmouse2(MOUSE_LEFT);
wait(7000);
writeln('100% we made it to the pit!')
end;
end;