PDA

View Full Version : A video guide to DDTM walking!



King
05-07-2013, 03:22 AM
Hey all, finally got around to posting this <3

ExbqObeERHk



Code for the script mentioned:

Example of DDTM being called in a function to load it.

function LoadDDTMWalk(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1: begin

begin
dtmMainPoint.x := 1122;
dtmMainPoint.y := 177;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 931654;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1122;
dtmSubPoints[0].y := 177;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 931654;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1119;
dtmSubPoints[1].y := 167;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 12161405;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1121;
dtmSubPoints[2].y := 187;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 12161405;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1128;
dtmSubPoints[3].y := 177;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 931654;
dtmSubPoints[3].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;




2: begin

dtmMainPoint.x := 1129;
dtmMainPoint.y := 141;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 3104640;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1129;
dtmSubPoints[0].y := 141;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 3104640;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1108;
dtmSubPoints[1].y := 154;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 12161405;
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1111;
dtmSubPoints[2].y := 161;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 12161405;
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1154;
dtmSubPoints[3].y := 161;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 931654;
dtmSubPoints[3].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;


//'''''''''''''''''''''''''''''''''''''''''\\
// Walking to Altar \\
//'''''''''''''''''''''''''''''''''''''''''\\
3: begin
dtmMainPoint.x := 1111;
dtmMainPoint.y := 203;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 2264190;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1111;
dtmSubPoints[0].y := 203;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 2264190;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1137;
dtmSubPoints[1].y := 220;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 11036250;
dtmSubPoints[1].Tolerance := 35;

dtmSubPoints[2].x := 1134;
dtmSubPoints[2].y := 149;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 610078;
dtmSubPoints[2].Tolerance := 35;

dtmSubPoints[3].x := 1117;
dtmSubPoints[3].y := 144;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 610078;
dtmSubPoints[3].Tolerance := 35;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

4: begin
dtmMainPoint.x := 1113;
dtmMainPoint.y := 228;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7369593;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1113;
dtmSubPoints[0].y := 228;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7369593;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1133;
dtmSubPoints[1].y := 215;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 610078;
dtmSubPoints[1].Tolerance := 35;

dtmSubPoints[2].x := 1112;
dtmSubPoints[2].y := 211;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 11036250;
dtmSubPoints[2].Tolerance := 35;

dtmSubPoints[3].x := 1103;
dtmSubPoints[3].y := 197;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 610078;
dtmSubPoints[3].Tolerance := 35;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;

5: begin
dtmMainPoint.x := 1114;
dtmMainPoint.y := 216;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 7369593;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1114;
dtmSubPoints[0].y := 216;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 7369593;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1095;
dtmSubPoints[1].y := 250;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 12161405;
dtmSubPoints[1].Tolerance := 35;

dtmSubPoints[2].x := 1097;
dtmSubPoints[2].y := 212;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 610078;
dtmSubPoints[2].Tolerance := 35;

dtmSubPoints[3].x := 1114;
dtmSubPoints[3].y := 236;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 931654;
dtmSubPoints[3].Tolerance := 35;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;



end;
end;


Example of DDTM in use.

function WalkToAltar: Boolean;
var
WalkDTM: integer;
aFound: Extended;
begin
WalkDTM := LoadDDTMWalk(3);
if FindDTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/2, Pi/2, Pi/30, aFound) then
begin
Mouse(X, Y, 2, 2, True);
FFlag(0);
WriteDebug('Balloon Point 1 done');
end
else
WriteDebug('Cant find the DDTM');


WalkDTM := LoadDDTMWalk(4);
if FindDTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/2, Pi/2, Pi/30, aFound) then
begin
Mouse(X, Y, 2, 2, True);
FFlag(0);
WriteDebug('Balloon Point 2 done');
end
else
writedebug('Cant find the DDTM');

WalkDTM := LoadDDTMWalk(5);
if FindDTMRotated(WalkDTM, x, y, MMX1, MMY1, MMX2, MMY2, -Pi/2, Pi/2, Pi/30, aFound) then
begin
Mouse(X, Y, 2, 2, True);
FFlag(0);
WriteDebug('Balloon Point 1 done');
end
else
WriteDebug('Cant find the DDTM');
end;

Didnt cover this in the video, should have.

How to AutoColor points:

Credit to NKN for writing the code for me in skype!

function FindTheColor(color: integer): Integer;
var
x,y:integer;
TPA:TPointArray;
begin
if FindColorSpiralTolerance(x, y, color, MMX1, MMY1, MMX2, MMY2, 30) then

result := GetColor(x, y)
else
result := -1;
end;

How to use it in a DDTM procedure :

function LoadDDTMWalk(WalkNumber: Integer): Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: array[0..3] of TDTMPointDef;
TempTDTM: TDTM;
begin
case WalkNumber of
1: begin

begin
dtmMainPoint.x := 1122;
dtmMainPoint.y := 177;
dtmMainPoint.AreaSize := 3;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 931654;
dtmMainPoint.Tolerance := 255;

dtmSubPoints[0].x := 1122;
dtmSubPoints[0].y := 177;
dtmSubPoints[0].AreaSize := 3;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 931654;
dtmSubPoints[0].Tolerance := 255;

dtmSubPoints[1].x := 1119;
dtmSubPoints[1].y := 167;
dtmSubPoints[1].AreaSize := 3;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := FindTheColor(12161405);
dtmSubPoints[1].Tolerance := 30;

dtmSubPoints[2].x := 1121;
dtmSubPoints[2].y := 187;
dtmSubPoints[2].AreaSize := 3;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := FindTheColor(12161405);
dtmSubPoints[2].Tolerance := 30;

dtmSubPoints[3].x := 1128;
dtmSubPoints[3].y := 177;
dtmSubPoints[3].AreaSize := 3;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := FindTheColor(931654);
dtmSubPoints[3].Tolerance := 30;

TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
end;

This Auto-Colors the point to find it a bit better. Another way to do this is to use ACA's AutoColor function and implement it just like this.

http://villavu.com/forum/showthread.php?t=25312

^Link to the editor

Sjoe
05-07-2013, 04:00 AM
Sexy voice ;)

King
05-07-2013, 04:02 AM
Sexy voice ;)

Thanks babe ;)

Sjoe
05-07-2013, 04:10 AM
Watched it, it's good :)

But re-testing a DDTM should be with changing worlds.

King
05-07-2013, 04:20 AM
Watched it, it's good :)

But re-testing a DDTM should be with changing worlds.

I thought I said to change worlds? That was like the 5th or 6th time I logged into RS to test that DDTM :D

Sjoe
05-07-2013, 04:49 AM
I thought I said to change worlds? That was like the 5th or 6th time I logged into RS to test that DDTM :D

Ooh sorry, didn't see you log out that's why lol.

King
05-07-2013, 05:06 AM
Ooh sorry, didn't see you log out that's why lol.

I edited out the logo it's :p

barb_of_all
05-07-2013, 07:03 PM
Keep 'em coming! That was great

King
05-07-2013, 07:23 PM
Keep 'em coming! That was great

Post any requests you may have :P

StickToTheScript
05-07-2013, 07:51 PM
Good job! I enjoyed it! Do another!

King
05-07-2013, 08:43 PM
Good job! I enjoyed it! Do another!

Can you think of some to do? Im open to anything :P

StickToTheScript
05-07-2013, 08:44 PM
Can you think of some to do? Im open to anything :P

Are you good with TPAs? Lots of people seem to be having trouble with those. Plus, a video on that would be stinking amazing! I would for sure give it a watch!

TheeMason
05-07-2013, 09:01 PM
Are you good with TPAs? Lots of people seem to be having trouble with those. Plus, a video on that would be stinking amazing! I would for sure give it a watch!

It was an amazing guide! It is great now to have an alternate to sps walking!
Yes another! A guide to TPAs would be fantastic!
+Rep whatever I can give!

StickToTheScript
05-07-2013, 09:04 PM
It was an amazing guide! It is great now to have an alternate to sps walking!
Yes another! A guide to TPAs would be fantastic!

King

I told you.

Kasi
05-07-2013, 09:04 PM
Great Tut, should add an explanation of ddtm offsets.

King
05-07-2013, 09:15 PM
Are you good with TPAs? Lots of people seem to be having trouble with those. Plus, a video on that would be stinking amazing! I would for sure give it a watch!

Im pretty good with TPA's, Ill do a few videos on them, basic, intermediate and advanced!


It was an amazing guide! It is great now to have an alternate to sps walking!
Yes another! A guide to TPAs would be fantastic!
+Rep whatever I can give!

Working on the first video tongiht :P


King

I told you.
:P


Great Tut, should add an explanation of ddtm offsets.

I can add a text part to it if you like, are you talking about in the editor? If I am right, doesn't it just make the point it returns offset either by x or y that much? So I could have a DDTM that then clicks to so many spaces to the right left ect?

StickToTheScript
05-07-2013, 09:18 PM
Im pretty good with TPA's, Ill do a few videos on them, basic, intermediate and advanced!

Working on the first video tongiht :P

I can add a text part to it if you like, are you talking about in the editor? If I am right, doesn't it just make the point it returns offset either by x or y that much? So I could have a DDTM that then clicks to so many spaces to the right left ect?

I would love to see those 3 tutorials. And please add the text part. The more info, the better.

King
05-07-2013, 09:23 PM
I would love to see those 3 tutorials. And please add the text part. The more info, the better.

I will do them tonight, I will cover basic TPA finding functions to MMToMSEx and functions with finding with that, to ATPA's ect. I will also brush up on wrappers to hopefully be able to explain those as well, if I remember wrappers stop memory leaks?

StickToTheScript
05-07-2013, 09:25 PM
I will do them tonight, I will cover basic TPA finding functions to MMToMSEx and functions with finding with that, to ATPA's ect. I will also brush up on wrappers to hopefully be able to explain those as well, if I remember wrappers stop memory leaks?

I look forward to learning your knowledge!! :D Its gonna be great!!

But, I am not good with wrappers, so dont ask me about those... Lol.

Kasi
05-07-2013, 09:31 PM
I can add a text part to it if you like, are you talking about in the editor? If I am right, doesn't it just make the point it returns offset either by x or y that much? So I could have a DDTM that then clicks to so many spaces to the right left ect?

Yer, you got it, its because in your video you were talking about not knowing how often the dock would show up, if you selected a mainpoint which is more reliable I.E one closer to the center of the compass then you could just add an offset to where you wanna click in relation to where your reference point was found. Remember to add the offset with the compass angle taken into account. You can do this by rotating the offset in point form (Point(X, Y)) by the angle the ddtm is found (i think the function is called RotatePoint). FindDTMRotated returns the angle in radians at which the ddtm was found, in your case this variable was aFound.

King
05-07-2013, 09:45 PM
I look forward to learning your knowledge!! :D Its gonna be great!!

But, I am not good with wrappers, so dont ask me about those... Lol.

Lol :D I hope it goes well..Im not the best with wrappers either XD


Yer, you got it, its because in your video you were talking about not knowing how often the dock would show up, if you selected a mainpoint which is more reliable I.E one closer to the center of the compass then you could just add an offset to where you wanna click in relation to where your reference point was found. Remember to add the offset with the compass angle taken into account. You can do this by rotating the offset in point form (Point(X, Y)) by the angle the ddtm is found (i think the function is called RotatePoint). FindDTMRotated returns the angle in radians at which the ddtm was found, in your case this variable was aFound.

Ill add that into the main post :P

StickToTheScript
05-07-2013, 09:50 PM
Lol :D I hope it goes well..Im not the best with wrappers either XD

I feel your pain... :P

Haxz
05-07-2013, 09:55 PM
if I remember wrappers stop memory leaks?

Yep, I used wrappers in all my TPA finding functions to avoid memory leaks.

Ian
05-07-2013, 10:29 PM
ExbqObeERHk

StickToTheScript
05-07-2013, 11:54 PM
Forgot to ask...

Do you care that ur username is showing? (Im guessing not)


oh, You should upload that Law Rune Runner... :p

King
05-08-2013, 12:02 AM
Forgot to ask...

Do you care that ur username is showing? (Im guessing not)


oh, You should upload that Law Rune Runner... :p

I dont care, video is unlisted, so less likely to be seen by general public. I might after I sell some copies, atleast to members +

StickToTheScript
05-08-2013, 12:06 AM
I dont care, video is unlisted, so less likely to be seen by general public. I might after I sell some copies, atleast to members +

Lolz. You should!!!

Hoodz
05-08-2013, 05:39 PM
does your screen has to be set to north? or can you also use rotated dtms?

King
05-08-2013, 05:46 PM
does your screen has to be set to north? or can you also use rotated dtms?

It is better to set it nort, but that's why. We use FindDTMRotated(:

Hoodz
05-13-2013, 12:17 PM
It is better to set it nort, but that's why. We use FindDTMRotated(:

I tried it but i cant make a good path.. Its from the ghouls(south, Right next to the swamp entrance) to the bank in canafis (or something). All the colours there are simulair to each other (blue, green and brown).

King
05-13-2013, 03:16 PM
I tried it but i cant make a good path.. Its from the ghouls(south, Right next to the swamp entrance) to the bank in canafis (or something). All the colours there are simulair to each other (blue, green and brown).

Are you using objects (Trees, buildings, signs, gate entrances ect )?

Hoodz
05-13-2013, 04:32 PM
Are you using objects (Trees, buildings, signs, gate entrances ect )?
the beginning of the path doesnt have buildings. and there are 100's of trees there so that is not going to work. also sometimes there is a teleport sign at the minimap and sometimes it isnt there. but i try it again with the gate entrance.

King
05-14-2013, 02:35 PM
the beginning of the path doesnt have buildings. and there are 100's of trees there so that is not going to work. also sometimes there is a teleport sign at the minimap and sometimes it isnt there. but i try it again with the gate entrance.

Just because there is 100's of trees doesn't mean it isn't going to work. Don't use symbols as they move, use trees. You can easily make a pattern of them by choosing a few different shapes to play with in making the DDTM if you can get it, send me a picture of the MM of the area.

Hoodz
05-14-2013, 08:54 PM
Just because there is 100's of trees doesn't mean it isn't going to work. Don't use symbols as they move, use trees. You can easily make a pattern of them by choosing a few different shapes to play with in making the DDTM if you can get it, send me a picture of the MM of the area.

Billions* and i try it again :p and i send you a picture when im on my pc.

hamster31
05-15-2013, 02:40 PM
Thank you for this tutorial. It was really helpful =)

Haxz
05-15-2013, 06:24 PM
You lied about posting the link to DDTM editor :(]

Btw, gonna continue making my nats script since I failed walking last time. You're gonna pay me your law rune script if my walking still fails :D

EDIT: After all that DDTMs I made, it's still pretty inaccurate at certain point between the path from general shop to nature altar :(

Sk1nyNerd
05-20-2013, 08:00 PM
nice vid! wheres the link for the editor though?

chances of doing a vid on sorting ATPAs/TPAs by size and distance from character? :P been having some troubles lately

King
05-20-2013, 08:40 PM
nice vid! wheres the link for the editor though?

chances of doing a vid on sorting ATPAs/TPAs by size and distance from character? :P been having some troubles lately

Been slammed with finals, all ap ): I'll do them tomorrow or tonight!

http://villavu.com/forum/showthread.php?t=25312

Link to editor^ forgot about it XD

Solar
05-20-2013, 09:21 PM
Used this to make my first DTM to try and fix someones buggy script. Helped a lot, thanks. Was able to make some decent walking DDTM's after just a few minutes because of this vid.

King
05-20-2013, 09:25 PM
Used this to make my first DTM to try and fix someones buggy script. Helped a lot, thanks. Was able to make some decent walking DDTM's after just a few minutes because of this vid.

Glad it helped (: Ill post a video of My law rune runner using DDTM's to walk

Won
05-28-2013, 05:47 PM
How do you test the script out without having the script open a new client each time?

King
05-29-2013, 11:49 AM
How do you test the script out without having the script open a new client each time?

What do you mean? I just hit play and then it runs again? Does your script open SMART everytime it runs?

Won
05-29-2013, 09:19 PM
What do you mean? I just hit play and then it runs again? Does your script open SMART everytime it runs?

Nvm it's not opening smart now eachtime but I still can't get it to even start testing:
21503
A better question is how do I just test part of my script like you did in the video? Or will the script run through it quickly and know where it's at?

King
05-30-2013, 12:10 AM
Nvm it's not opening smart now eachtime but I still can't get it to even start testing:
21503
A better question is how do I just test part of my script like you did in the video? Or will the script run through it quickly and know where it's at?

Just comment out the DDTM walking you dont need in the procedure, then run only that procedure :)

Won
05-30-2013, 01:13 AM
Just comment out the DDTM walking you dont need in the procedure, then run only that procedure :)
Sorry for being such a noob but what do you mean by "comment out the DDTM walking" and do you mean run only the function?

King
05-30-2013, 01:36 AM
Sorry for being such a noob but what do you mean by "comment out the DDTM walking" and do you mean run only the function?

put // in front of the procedure to make it not run that one and only put 1 procedure in your main loop.

Won
05-30-2013, 02:11 AM
put // in front of the procedure to make it not run that one and only put 1 procedure in your main loop.
Oh ok I gotcha thanks man and nice video

King
05-30-2013, 02:27 AM
Oh ok I gotcha thanks man and nice video

Not a problem(:

ocmon01
09-11-2013, 10:55 PM
Thanks for the video tutorial:D I cant keep up with a lot of text tutorials, especially about DDTMs.

Kerskunkle
04-02-2014, 05:13 AM
Fantastic Tutorial, Thanks for taking the time to make a video, it made things so much easier to understand. Problem is I'm a noob to scripting and I can't figure out how to fix an error I keep getting "Unknown type 'TDTMPointDef' at line X"

edit: Neilsy95 answered this question in another thread here's what he had to say

"TDTM is defined in Simba.scar in SRL for Simba. Else you've got to use the Simba alternative (TMDTM).

type
TDTMPointDef = TSDTMPointDef;
TDTMPointDefArray = TSDTMPointDefArray;
TDTM = TSDTM;
function AddDTM(DTM : TDTM) : integer;
begin
result := AddSDTM(dtm);
end; "

In other words if anybody else is getting the error "Unknown type 'TDTMPointDef' at line X" Change anything with "TDTM" in it to "TSDTM" and your "addDTM" to "addSDTM"

King
04-04-2014, 03:12 AM
Fantastic Tutorial, Thanks for taking the time to make a video, it made things so much easier to understand. Problem is I'm a noob to scripting and I can't figure out how to fix an error I keep getting "Unknown type 'TDTMPointDef' at line X"

edit: Neilsy95 answered this question in another thread here's what he had to say

"TDTM is defined in Simba.scar in SRL for Simba. Else you've got to use the Simba alternative (TMDTM).

type
TDTMPointDef = TSDTMPointDef;
TDTMPointDefArray = TSDTMPointDefArray;
TDTM = TSDTM;
function AddDTM(DTM : TDTM) : integer;
begin
result := AddSDTM(dtm);
end; "

In other words if anybody else is getting the error "Unknown type 'TDTMPointDef' at line X" Change anything with "TDTM" in it to "TSDTM" and your "addDTM" to "addSDTM"

Saw the post, thank you for posting an answer as well!

maxlvs
10-28-2015, 07:55 PM
iam a bit confused about how he used DDTM because the points he picked were not visible on the mini map since he walked away so far? so would it just be clicking in the pattern that he specified

Joopi
10-28-2015, 08:16 PM
iam a bit confused about how he used DDTM because the points he picked were not visible on the mini map since he walked away so far? so would it just be clicking in the pattern that he specified

Would you please stop gravedigging?
Post your way to 30 posts reasonably, not all in 4 days and BANG entire jr lib downloaded.
Post useful stuff that people can gain from.

Harrier
10-28-2015, 08:22 PM
iam a bit confused about how he used DDTM because the points he picked were not visible on the mini map since he walked away so far? so would it just be clicking in the pattern that he specified
If it cannot find the DDTM it moves onto the next DDTM and so on until it finds one (then it'll click and move on to the next one) or it's at the end.


Would you please stop gravedigging?
Post your way to 30 posts reasonably, not all in 4 days and BANG entire jr lib downloaded.
Post useful stuff that people can gain from.
He's asking a valid question and you cannot grave dig in the tutorial section. From the seems of things he's just reading tutorials and asking questions, don't put him off.

maxlvs
10-28-2015, 08:55 PM
thank you Hawker your a very respectable person unlike youpee for some reason has an issue with people trying to learn. i was thinking of trying to make a walking script with just random clicks in a box and bitmaps because iam not sure how to use DDTMs yet

thank you that does explain it a little bit more

i wish i could get some skype users and have a voice call or even just IM to ask direct questions kinda deal

oh wait i just saw you have a skype on you profile iam gonna add you hawker

Harrier
10-28-2015, 09:26 PM
I don't often use skype but I'm nearly always on IRC (Rizon #srl (https://villavu.com/forum/usertag.php?do=list&action=hash&hash=srl) or click the chat button) if I'm on my PC.

kakadudl
11-22-2015, 04:13 PM
Hey man I tried using your method, did everything as you did but it gives me error at Result := AddDTM(TempTDTM);



Error: Expected variable of type "Pointer", got "record [0]record [0]UInt32; [4]UInt32; [8]UInt32; [12]UInt32; [16]UInt32; [20]UInt32; end; [24]array of record [0]UInt32; [4]UInt32; [8]UInt32; [12]UInt32; [16]UInt32; [20]UInt32; end; end" at line 65


I have set "TempTDTM : TDTM;" adn all other variables just like you did.

Could you please tell me what am I doing wrong, I'm using AeroLib in my script.

Harrier
11-22-2015, 04:49 PM
Hey man I tried using your method, did everything as you did but it gives me error at Result := AddDTM(TempTDTM);



Error: Expected variable of type "Pointer", got "record [0]record [0]UInt32; [4]UInt32; [8]UInt32; [12]UInt32; [16]UInt32; [20]UInt32; end; [24]array of record [0]UInt32; [4]UInt32; [8]UInt32; [12]UInt32; [16]UInt32; [20]UInt32; end; end" at line 65


I have set "TempTDTM : TDTM;" adn all other variables just like you did.

Could you please tell me what am I doing wrong, I'm using AeroLib in my script.
This guide is for PascalScript not lape so you need to change AddDTM to AddSDTM (and I'd recommend not using DDTM walking on OSRS since it can be quite inaccurate and the DTMs break a lot.)

chief404
09-03-2016, 03:10 PM
This guide is for PascalScript not lape so you need to change AddDTM to AddSDTM (and I'd recommend not using DDTM walking on OSRS since it can be quite inaccurate and the DTMs break a lot.)

What type of walking would you recommend for osrs?

Kasi
09-04-2016, 01:41 AM
What type of walking would you recommend for osrs?

Not sure if you should write off DDTMs. They are pretty powerful when used right and definitely worth learning if you have the time to learn. Can't speak for others but DDTMs rarely failed me when i used them in my color scripts. Other than that, SPS seems to be used a lot with OSRS. Other than that, try not to gravedig.

Joopi
09-04-2016, 08:43 AM
I'd say RSWalker, never seen anyone use SPS in their OSRS scripts

Kasi
09-04-2016, 08:52 AM
I'd say RSWalker, never seen anyone use SPS in their OSRS scripts

Considered them the same thing as it's the same concept. I actually meant RSWalker too.

slacky
09-04-2016, 10:17 AM
Considered them the same thing as it's the same concept. I actually meant RSWalker too.
Only if you strip it down to the core idea (that's rather misleading) - which is to use image cross correlation, that's all there is in common. If you put SPS (for OSR) on the testbench it will fail you, SPS is straight forward and basic. RSW however does roughly 20 cross correlations to account for transformations on the minimap and stuff in order to pinpoint where you are. And then we have the memscanning which usually improve both performance and accuracy.

Kasi
09-04-2016, 12:09 PM
Only if you strip it down to the core idea (that's rather misleading) - which is to use image cross correlation, that's all there is in common. If you put SPS (for OSR) on the testbench it will fail you, SPS is straight forward and basic. RSW however does roughly 20 cross correlations to account for transformations on the minimap and stuff in order to pinpoint where you are. And then we have the memscanning which usually improve both performance and accuracy.

So what you're trying to say is the difference between RSWalker and SPS is how you find/compare the smaller map on the bigger map?

Harrier
09-04-2016, 01:54 PM
Not sure if you should write off DDTMs. They are pretty powerful when used right and definitely worth learning if you have the time to learn. Can't speak for others but DDTMs rarely failed me when i used them in my color scripts. Other than that, SPS seems to be used a lot with OSRS. Other than that, try not to gravedig.
With how much the map changes on osrs DDTMs can break a lot or be quite inaccurate although it really depends on the location.

slacky
09-04-2016, 07:33 PM
So what you're trying to say is the difference between RSWalker and SPS is how you find/compare the smaller map on the bigger map?
Oversimplification, and lacking. That's not the only difference obviously. You have to tweak SPS (it takes some limiting parameters), RSW however has no such thing, it instead does a (well several) full on cross correlation, returning a matrix of correlation values at each point in the big image... it then loop through it to locate a good peak, and then performs a cross correlation AGAIN locally around that peak, to pinpoint exactly the center of the peak. (There has been changes so it might not be exactly as stated here)

SPS isn't nearly as involved, and it's image cross correlation is naive: at each pt in big the image the sub image is compared using a test to count how many pixels are within given tolerance limit, the point with the highest number of matches is where you are. That's it.

Other than that the API is way different, and RSW allows you to hook into just about everything so you can search for whatever while walking, stop the walk mid walk and so on, and doesn't rely on ANY include.


tl;dr RSW is simply not SPS.

Kasi
09-05-2016, 02:55 AM
slacky;

So the difference is the image cross correlation + the number of cross correlations it does? Could you explain the limiting parameters thing? don't really understand that.

Turpinator
09-05-2016, 03:05 AM
Id assume hes referring to the params taken into SPS when a map is setup. So that would (mainly) be the accuracy (size of the 'squares' the map is split into), coupled with the tolerance (per square), and finally the min match percent.

As for another difference, as slacky has mentioned in his post, RSWalker takes the best matching spot. SPS, on the other hand, takes the first spot (right to left, up to down, iirc) that fits the minimum requirements (min match percent), so if there were two similar areas, you could perhaps return a wrong spot simply because it encountered it first, rather than determining all possible spots and picking the best.

Kasi
09-05-2016, 03:13 AM
Id assume hes referring to the params taken into SPS when a map is setup. So that would (mainly) be the accuracy (size of the 'squares' the map is split into), coupled with the tolerance (per square), and finally the min match percent.

As for another difference, as slacky has mentioned in his post, RSWalker takes the best matching spot. SPS, on the other hand, takes the first spot (right to left, up to down, iirc) that fits the minimum requirements (min match percent), so if there were two similar areas, you could perhaps return a wrong spot simply because it encountered it first, rather than determining all possible spots and picking the best.

So the difference is the way it finds the best match of the smaller map on the bigger map?

slacky
09-05-2016, 05:34 AM
So the difference is the way it finds the best match of the smaller map on the bigger map?
ugh. They are different. I am done here.

Kasi
09-05-2016, 05:49 AM
ugh. They are different. I am done here.

I know they are different. Just thought the concept was the same. Don't get me wrong here. RSWalker is way better than SPS. I just thought the concept was the same, Apparently not.