BobboHobbo

07-12-2008, 09:27 AM

Complete DDTM Walking Tutorial

Chapters:

What is a DDTM?

How to make a DDTM

How to use a DDTM (Most efficent way)

Last Updated: August 29th, 2009.

Requirements:

DDTM Editor by Nielse - Click Here to Download (http://www.villavu.com/forum/showthread.php?t=25312)

Chapter 1. What is a DDTM.

A DDTM is a DTM which is Dynamic deformable template model, which is basicly a normal DTM but with editable colours, cords and tolerances, Overall much better for more advanced jobs.

Chapter 2. How To Make A DDTM.

To make a DDTM open Nielesles DDTM Editor (http://www.villavu.com/forum/showthread.php?t=25312)

Now you should see this:

http://img373.imageshack.us/img373/1474/ddtmtut1yi4.png

Now go on Runescape, take a screen shot of the place where you want to walk to.

For example I want to walk to the X on the MiniMap.

http://img133.imageshack.us/img133/9876/walk2xy7.png

To get there I will need to open Niesles DDTM editor, Go to Image > Paste Image on the top bar. Now the screen shot you took earlier will be in there. You will have to scroll right wards to have the MiniMap where you want it.

Ok, making the DDTM..

Now click on the MiniMap where you want your character to walk to.

Example:

http://img174.imageshack.us/img174/3645/walk3lm6.png

Now make 3-4 other points (By left clicking), around the place you want to walk, BUT don't click on the edges of the road because the walking will fail.

Example:

http://img155.imageshack.us/img155/7987/walk4iv2.png

If you have no choice of not clicking the edge of a road, change the Area Size in the DDTM editor of the spot. To about 3-5. Like my picture is a sort of akword road, so you may have to do this.

Now when you done with that Go to File > DDTM to Text (On the top bar). A Box should come up with all the DDTM code like:

function SetDDTM: Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: Array [0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := 7241098;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := 7241098;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := 7241098;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := 7241098;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := 7241098;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := 7241098;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

Now you should have something like this. To make it work an AutoColour for the road your walking on example: FindVarrockRoadColour, FindRoadColor, FindFallyRoadColor. And fill them into the color := Colourhere; on each of the DDTM Subpoints so it should end up like this:

function SetDDTM: Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: Array [0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := FindRoadColor;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := FindRoadColor;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := FindRoadColor;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := FindRoadColor;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := FindRoadColor;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := FindRoadColor;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

Now paste it in SCAR.

Chapter 3. How To Find The DDTM (Best Way)

This way is really efficent and doesnt waste alot of usesless space in scar!

First make a new Function called: function LoadAllDTMWalks(WalkNumber: Integer): Integer;

Now put these vars underneath:

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin

Should look like this:

function LoadAllDTMWalks(WalkNumber: Integer): Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin

What does that mean and why?

Well its the quickest and best way to load your DDTM for finding. It basicly is the vars of the DDTM but only needed once.

Now get your DDTM from before. And enter it. example:

function LoadAllDTMWalks(WalkNumber: Integer): Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin //Walk To mine Begins

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := FindRoadColor;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := FindRoadColor;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := FindRoadColor;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := FindRoadColor;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := FindRoadColor;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := FindRoadColor;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

end;

end;

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:

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;

Ends up looking like this:

program NewScript;

{.include SRL/SRL.scar}

var

x,y:integer;

function LoadAllDTMWalks(WalkNumber: Integer): Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin //Walk To mine Begins

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := FindRoadColor;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := FindRoadColor;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := FindRoadColor;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := FindRoadColor;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := FindRoadColor;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := FindRoadColor;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

end;

end;

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;

Procedure Setup;

begin

SetupSRL;

ActivateClient;

end;

begin

Setup;

Walktosomewhere;

end.

That should explain it all...

Thanks for looking. Hope this helped you.

Chapters:

What is a DDTM?

How to make a DDTM

How to use a DDTM (Most efficent way)

Last Updated: August 29th, 2009.

Requirements:

DDTM Editor by Nielse - Click Here to Download (http://www.villavu.com/forum/showthread.php?t=25312)

Chapter 1. What is a DDTM.

A DDTM is a DTM which is Dynamic deformable template model, which is basicly a normal DTM but with editable colours, cords and tolerances, Overall much better for more advanced jobs.

Chapter 2. How To Make A DDTM.

To make a DDTM open Nielesles DDTM Editor (http://www.villavu.com/forum/showthread.php?t=25312)

Now you should see this:

http://img373.imageshack.us/img373/1474/ddtmtut1yi4.png

Now go on Runescape, take a screen shot of the place where you want to walk to.

For example I want to walk to the X on the MiniMap.

http://img133.imageshack.us/img133/9876/walk2xy7.png

To get there I will need to open Niesles DDTM editor, Go to Image > Paste Image on the top bar. Now the screen shot you took earlier will be in there. You will have to scroll right wards to have the MiniMap where you want it.

Ok, making the DDTM..

Now click on the MiniMap where you want your character to walk to.

Example:

http://img174.imageshack.us/img174/3645/walk3lm6.png

Now make 3-4 other points (By left clicking), around the place you want to walk, BUT don't click on the edges of the road because the walking will fail.

Example:

http://img155.imageshack.us/img155/7987/walk4iv2.png

If you have no choice of not clicking the edge of a road, change the Area Size in the DDTM editor of the spot. To about 3-5. Like my picture is a sort of akword road, so you may have to do this.

Now when you done with that Go to File > DDTM to Text (On the top bar). A Box should come up with all the DDTM code like:

function SetDDTM: Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: Array [0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := 7241098;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := 7241098;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := 7241098;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := 7241098;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := 7241098;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := 7241098;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

Now you should have something like this. To make it work an AutoColour for the road your walking on example: FindVarrockRoadColour, FindRoadColor, FindFallyRoadColor. And fill them into the color := Colourhere; on each of the DDTM Subpoints so it should end up like this:

function SetDDTM: Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: Array [0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := FindRoadColor;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := FindRoadColor;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := FindRoadColor;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := FindRoadColor;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := FindRoadColor;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := FindRoadColor;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

Now paste it in SCAR.

Chapter 3. How To Find The DDTM (Best Way)

This way is really efficent and doesnt waste alot of usesless space in scar!

First make a new Function called: function LoadAllDTMWalks(WalkNumber: Integer): Integer;

Now put these vars underneath:

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin

Should look like this:

function LoadAllDTMWalks(WalkNumber: Integer): Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin

What does that mean and why?

Well its the quickest and best way to load your DDTM for finding. It basicly is the vars of the DDTM but only needed once.

Now get your DDTM from before. And enter it. example:

function LoadAllDTMWalks(WalkNumber: Integer): Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin //Walk To mine Begins

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := FindRoadColor;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := FindRoadColor;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := FindRoadColor;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := FindRoadColor;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := FindRoadColor;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := FindRoadColor;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

end;

end;

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:

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;

Ends up looking like this:

program NewScript;

{.include SRL/SRL.scar}

var

x,y:integer;

function LoadAllDTMWalks(WalkNumber: Integer): Integer;

var

dtmMainPoint: TDTMPointDef;

dtmSubPoints: array[0..4] of TDTMPointDef;

TempTDTM: TDTM;

begin

case WalkNumber of

1: begin //Walk To mine Begins

dtmMainPoint.x := 994;

dtmMainPoint.y := 244;

dtmMainPoint.AreaSize := 0;

dtmMainPoint.AreaShape := 0;

dtmMainPoint.Color := FindRoadColor;

dtmMainPoint.Tolerance := 0;

dtmSubPoints[0].x := 994;

dtmSubPoints[0].y := 244;

dtmSubPoints[0].AreaSize := 0;

dtmSubPoints[0].AreaShape := 0;

dtmSubPoints[0].Color := FindRoadColor;

dtmSubPoints[0].Tolerance := 0;

dtmSubPoints[1].x := 986;

dtmSubPoints[1].y := 258;

dtmSubPoints[1].AreaSize := 0;

dtmSubPoints[1].AreaShape := 0;

dtmSubPoints[1].Color := FindRoadColor;

dtmSubPoints[1].Tolerance := 0;

dtmSubPoints[2].x := 987;

dtmSubPoints[2].y := 227;

dtmSubPoints[2].AreaSize := 0;

dtmSubPoints[2].AreaShape := 0;

dtmSubPoints[2].Color := FindRoadColor;

dtmSubPoints[2].Tolerance := 0;

dtmSubPoints[3].x := 991;

dtmSubPoints[3].y := 216;

dtmSubPoints[3].AreaSize := 4;

dtmSubPoints[3].AreaShape := 0;

dtmSubPoints[3].Color := FindRoadColor;

dtmSubPoints[3].Tolerance := 0;

dtmSubPoints[4].x := 984;

dtmSubPoints[4].y := 267;

dtmSubPoints[4].AreaSize := 0;

dtmSubPoints[4].AreaShape := 0;

dtmSubPoints[4].Color := FindRoadColor;

dtmSubPoints[4].Tolerance := 0;

TempTDTM.MainPoint := dtmMainPoint;

TempTDTM.SubPoints := dtmSubPoints;

Result := AddDTM(TempTDTM);

end;

end;

end;

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;

Procedure Setup;

begin

SetupSRL;

ActivateClient;

end;

begin

Setup;

Walktosomewhere;

end.

That should explain it all...

Thanks for looking. Hope this helped you.