If you have more DDTM's, under the first end; put 2: begin then your DDTM again.
Now you have your DDTM calling ready time for finding!
Go to your walking procedure. Add these:
SCAR Code:
function WalkToSomewhere: Boolean;
var
WalkDTM: integer; // Calls the WalkDTM making walking simpler.
begin
WalkDTM := LoadAllDTMWalks(1); //Load which DDTM you want to find.
if FindDTM(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then // Find the DDTM using Find DTM
begin
Mouse(X, Y, 8, 8, True);
WriteLn('Walk Main 1. - Complete.');
FFlag(0);
Result := True; // If succesfully finds it will click it and wait to flag is gone.
end else // else it will do this...
if RadialWalk(FindFallyRoadColor, 300, 220, 55, 1, 1) then
begin
Writeln(' Walk Backup 1. - Complete.');
Result := True; //Will look for this if DDTM fails, if this fails then logsout, but you can change that.
end else
begin
Result := False;// cant find the backup goes here...
Writeln(' Walk Backup 1. - Failed. Logging Out.');
FreeDTM(WalkDTM); // FREEs the DDTM so you dont have a memory overload :P
if not (Result) then //if doesnt get results does this
begin
Logout; // logs out.
end;
end;
end;