PDA

View Full Version : Complete DDTM Walking Tutorial.



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.

ShowerThoughts
07-12-2008, 09:37 AM
DDTM

Dynamic deformable template model

something like that

Also i wouldn't use a DDTM like if not found then radial i would increase the area of the subpoints ;)

Claymore
07-12-2008, 05:50 PM
Yea well, radial road walk is fine, it is reliable too...

Thanks for teaching me how to summon up DDTMs when in time i need it! I never though of that (Times like these i wonder if i will keep saying this every time i read someones idea...)

BobboHobbo
07-13-2008, 12:58 AM
Hermpie: Doesnt matter it just showing a failsafe, i use it BTW :P Works fine if the DDTM fails which it shouldnt then rrw backup will work :P

Claymore
07-13-2008, 02:00 AM
Could you explain how using DDTMS for walking is better? Because in most cases, DDTMS is for items and Icons and etc... Better yet just use RadialRoadWalk.

RoadColor := FindVarrockRoadColor;
RadialRoadWalk (RoadColor, 0, 90, 70, 1, 1); That still works...

BobboHobbo
07-13-2008, 07:58 AM
DDTM's are way more accurate, where ever you make that DDTM it will always CLICK at the same spot, Mouse(x,y,8,8,true) to over come it :P

Its the preety much best walking there is.

Claymore
07-16-2008, 02:33 AM
Could someone explain what hermpie just said about increasing the area of the subpoints? What would that do.

BobboHobbo
07-16-2008, 06:13 AM
He means like you know how you made the made point and the other ones around it, the other ones around it are the subpoints and if they fail to find the DDTM it adds more subpoints So it would find it..

I wouldnt know how to do that without adding another DDTM.

kingarabian
07-16-2008, 06:27 AM
Wow thanks for this tutorial man! Finally a descriptive ddtm tutorial. I dont normally do this....but ima rep you.

BobboHobbo
07-16-2008, 06:35 AM
Thanks :P

Claymore
07-17-2008, 05:40 PM
http://i33.tinypic.com/w7yer5.jpg

So a question, can i make the main point the Road, and the i plan to make the subpoints these.

1 Dirt Road Color Upper ^^^^
2 Road Color From Side <-------- --------->

So does that work? Or do all subpoints need to be the same color?

BobboHobbo
07-18-2008, 06:35 AM
The subpoints can be all diffrent, but you need to make a very good DDTM for diffrent colours. Because of Minimap degree changes and some bad clicks, etc..

Claymore
07-18-2008, 07:01 AM
Well not that difficult, there is only 1 different color, and secondly that different color happens to be the dirt road conneted to the varrock road. So, just pointing out...so i guess it might work. I havent tested it yet... still making the rest of the path to the saw mill (*hinted my next script lol)/

BobboHobbo
07-18-2008, 07:44 AM
Ye that should work, but remember to have your AreaSize 3-4 for the point thats on the dirt.

Claymore
07-18-2008, 06:28 PM
Ye that should work, but remember to have your AreaSize 3-4 for the point thats on the dirt.

I see, but when you said "Remember", you never really mentioned anything about inserting AreaSize in your tutorial =3. But otherwise, ill do that

BobboHobbo
07-22-2008, 11:46 AM
I see, but when you said "Remember", you never really mentioned anything about inserting AreaSize in your tutorial =3. But otherwise, ill do that

Yes i did.


If you have no chose of not clicking the edge of roads change the Area Size in the DDTM editor of the spot. To about 3-5.

soccnut
07-29-2008, 03:52 PM
Thx for tut.Going to use DDTM in my script

i find DDTM much better then RW in a sense that RW does not have tolerance.My minimap colours which keep changing does not allow me to use RW.
Note: its possible if its road or something but on certain terrains, its hard to do RW.

RWex is very diff also because of the TPA, havent been able to understand TPA so far.

once again thx for your tut...

Ghostman
07-30-2008, 08:35 PM
Nice tut man, I have been trying to learn DDTMs and you helped out

I rep you;)

Griff
07-31-2008, 05:50 AM
Awesome tut, Bobbo, I think you already noticed that me n blumblebee read this, but amazing work! It sure game the Griff721 and Blumblebee's Draynor Willow masher a boost! Great work!

Blumblebee
07-31-2008, 06:47 AM
hey on the note that we're using it in our script, I'm finding that the DDTM walking proceedure in our script doesn't seem to work. For a while i had it working but i updated and it doesnt seem to work, I'm pretty sure that I've picked the DDTM's colors n stuff right but i can't seem to get the actually scripting it in to work for me, maybe I'm just a total screwup and I'm still learning scripting for the most part but any feedback would be awsome

BobboHobbo
07-31-2008, 06:53 AM
Post the code or PM w/e. Have to see how you done and what you done it on.

Blumblebee
07-31-2008, 07:06 AM
ok thanks :D
E: Sent you a PM hope you can help me out

BobboHobbo
08-02-2008, 12:14 AM
I didnt get a PM :P.

Blumblebee
08-06-2008, 03:30 AM
oh sorry Ill resend it ive been on holidays for a while now

Claymore
08-07-2008, 11:53 PM
Hey BH, i just noticed that


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


What if i got another DDTM but with 5 dtmSubPoints

noidea
08-07-2008, 11:56 PM
dtmSubPoints: array[0..5] of TDTMPointDef;

Increase the 4 to a five then it should work. Or a six I forgot?:duh:

Claymore
08-08-2008, 02:52 AM
;p yea well what if you got 2 DDTMS and one of them is 4 subpoints and the other 5.

BobboHobbo
08-11-2008, 06:13 AM
Make it the same then. You only need 4 or 5 points each time.

Magiic
08-14-2008, 09:02 AM
so can this be used for other colors eg the dirt in al kharad?

Wolygon
08-15-2008, 04:40 AM
thanks for this very good tutorial =]

Macho Man67
09-01-2008, 01:19 AM
Great tutorial! It helped a lot. I'm going to use the idea of loading DDTM's with cases. I'll credit you in script.

Claymore
09-01-2008, 03:32 AM
Although this is an example. You have a memory leak XD


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
FreeDTM(WalkDTM);
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...
begin
FreeDTM(WalkDTM); // MEmory leak, forgot this one lol
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
cant find the backup goes here... // No SCAR alows it to remain False unless it changes True.
Writeln(' Walk Backup 1. - Failed. Logging Out.');
//FreeDTM(WalkDTM); // FREEs the DDTM so you dont have a memory overload :P We already did ;p
if not (Result) then //if doesnt get results does this
begin
Logout; // logs out.
end;
end;
end;



also do this

RoadColor := FindRoadColor;

DTM somehting point color.. := RoadColor;

This prevents ur debug from having 4 same results printed ;p

Claymore
09-03-2008, 04:30 AM
How do i make a DDTM if i were to try using like Palm Trees as sub-points or Rocks, etc... I tried doing that on my Law Crafter, My DDTM isn't working.


1:begin
dtmMainPoint.x := 572;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 572;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 602;
dtmSubPoints[1].y := 44;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 195836;
dtmSubPoints[1].Tolerance := 55;
dtmSubPoints[2].x := 617;
dtmSubPoints[2].y := 82;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 195836;
dtmSubPoints[2].Tolerance := 55;
dtmSubPoints[3].x := 618;
dtmSubPoints[3].y := 26;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColor;
dtmSubPoints[3].Tolerance := Tolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
2: begin
dtmMainPoint.x := 583;
dtmMainPoint.y := 33;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 583;
dtmSubPoints[0].y := 33;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 664;
dtmSubPoints[1].y := 46;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColor;
dtmSubPoints[1].Tolerance := Tolerance;
dtmSubPoints[2].x := 587;
dtmSubPoints[2].y := 135;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := WaterColor;
dtmSubPoints[2].Tolerance := Tolerance;
dtmSubPoints[3].x := 649;
dtmSubPoints[3].y := 67;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 195836;
dtmSubPoints[3].Tolerance := 55;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
3: begin
dtmMainPoint.x := 588;
dtmMainPoint.y := 109;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 0;
dtmMainPoint.Tolerance := 255;
dtmSubPoints[0].x := 588;
dtmSubPoints[0].y := 109;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 0;
dtmSubPoints[0].Tolerance := 255;
dtmSubPoints[1].x := 604;
dtmSubPoints[1].y := 32;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := RoadColor;
dtmSubPoints[1].Tolerance := Tolerance;
dtmSubPoints[2].x := 587;
dtmSubPoints[2].y := 73;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 6774370;
dtmSubPoints[2].Tolerance := 75;
dtmSubPoints[3].x := 644;
dtmSubPoints[3].y := 145;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := RoadColor;
dtmSubPoints[3].Tolerance := Tolerance;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

spamthis
09-27-2008, 03:40 AM
Nevermind. Solved my own problem.

spamthis
09-28-2008, 08:42 PM
Edit: Oops, double-post! My bad.

When walking anywhere it is mostly likely going to involve several steps to get where you are going.

In that case, in order to avoid memory leaks, shouldn't your WalkToSomewhere actually be something along these lines?


LoadAllDTMWalks(1);
<Find>
<FreeDTM>
LoadAllDTMWalks(2);
<Find & Move>
<FreeDTM>
and so on...

Or am I just missing the point completely.

Nose Smasher
10-23-2008, 11:57 PM
dont mean to grave dig (even though its only been a month) but this is a very good tut :) thanks man

rep++

Rubix
11-26-2008, 11:27 PM
how would you make it load 2 different DDTMs?

cycrosism
04-03-2009, 07:29 AM
Thank you. I learned a lot from this and best of all it was quick and easy to learn. Thanks!

MetalancA
04-18-2009, 10:54 AM
I like the tutorials where you give a working function as an example, and then I can modify/dissect it to understand it better. Your tutorial implements this, and I thank you for it :p Besides that, it's a great tutorial, well written and easy to understand. Rep +

@Deathscytex, I'm pretty sure you just change it to:

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

:p

I could be wrong though.

zionz
11-21-2009, 03:20 PM
Wicked sick, xD. Great tut.

randy marsh
04-29-2013, 11:53 PM
I been doing a lot of gravedigging, because there seems to be some confusion as in what works for osrs

Is this up to date?

King
04-30-2013, 12:52 AM
I been doing a lot of gravedigging, because there seems to be some confusion as in what works for osrs

Is this up to date?


This works fine in OSRS, I use it for walking. It's a method, cant go out of date with a method (;. Works fine, just use ACA for your points instead of the DTM editor.

randy marsh
04-30-2013, 12:54 AM
also dos this work on, non paths ?


i.e anyway?

westkevin12
05-02-2013, 11:25 AM
awesome guide! i'm gonna practice with ddtms now thanks to you!