Naum
05-28-2008, 10:04 AM
How To Make DDTM's Using Nielsie95's DDTM Edit0r!
Table Of Contents
I - What Are DDTM's?
II - Capturing The Client.
III - Getting To Grips with the DDTM Edit0r!
IV - Using the DDTM[s] In Your Script!
V - Links!
LINK TO THE DDTM EDITOR : http://www.villavu.com/forum/showthread.php?t=25312
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||
I - What Are DDTM's?
So What the f*ck are DDTM's? DDTM's are related to DTM's, but they have a more user friendly Interface. DDTM's stand for Dynamic Deformable Template Model. They are used mainly for walking to places in runescape using SCAR. Coding a DDTM by hand isn't at all hard, but takes a lot of time.
This Is why Nielsie has made a very easy shortcut for us, this was located in the Delphi Programming Section of the forum and sadly only got 'jack' views. This is a shame really as I think this is one of the best programming helping tools available (ACA 2 :p). It has a very Human friendly interface and is very very easy to use.
A Picture:
http://i29.tinypic.com/sym5jp.jpg
II - Capturing The Client.
Ok So now we need to Get the client picture (Runescape Interface) to plot the DDTM
MainPoints and Subpoints, For this I would use the Screen Captcha that Sumilion sent me:
program RS_ScreenCaptcha;
var
bmpScreen, x, y: Integer;
begin
ActivateClient;
wait(1800+Random(200))
Disguise('Dont touch');
GetClientDimensions(x, y);
bmpScreen := BitmapFromString(x, y, '');
CopyClientToBitmap(bmpScreen, 0, 0, x, x);
SaveBitmap(bmpScreen, ScriptPath + 'RS Screenshot.bmp');
Disguise('Done!');
end.
Not: 'You must save this to your desktop as that is where the picture will be saved aswell
;)'
^ Just Specify the Client to where you want to walk to and it will capture it in a .Bmp
form^
So you ask why do I Need this? You need this becuase Nielsie's DDTM editor goes of co-ords from about 100 pixels to 500, you need to capture the Screen exactally or it won't Find the DDTM when we go to the end.
Ok so we should now have the picture ready on which to Make the DDTM, Now comes the Hard Part j/k....
III - Getting To Grips with the DDTM Edit0r!
Now the DDTM Editor is just like the DTM editor that SCAR has built in, but with a few extra Functions :
Create, edit, view and delete points
Adjustable colors for the lines to the points.
Yellow pointers to see which point you're editing.
Load / save DTM's (supports the SCAR format) :D
Load DTM's from strings.
Load images from a .bmp file.
Load images from clipboard
Show the matching pixels (similar to cts 1).
Generate a DDTM or DTM which you can use in SCAR.
Now we go to Image ( in the taskbar! ) --> Browse Image.
You should now see a screen like this:
http://i32.tinypic.com/15f6f7k.jpg
Go onto the desktop and select this .bmp image called 'RS Screenshot', Open it and proceed.
Now we have the Image Open. My Image Looks Like this:
http://i26.tinypic.com/2yjx8k3.jpg
Now we make the DDTM, just like you would do with the Normal DTM Editor you make a mainpoint and a subpoint. As your plotting the points you should notice these Boxes called Tolerance, Color, Area Size, Area Shape, x and y.
You might want to play about with these values to find the right DDTM for you.
My DDTM Looks like this :
http://i26.tinypic.com/2aa0djb.jpg
As you see my mouse is hovering over the DDTM to Text option you might want to do this after you have made your DDTM.
When you are finished click that Option and a window should pop up with the DDTM:
http://i25.tinypic.com/23hrfgm.jpg
Use this Copy to Clip Board Function and close the DDTM Editor.
IV - Using the DDTM[s] In Your Script!
Open Scar you should see:
program New;
begin
end.
Now This is what my DDTM looks Like and this is How you should Paste it
Program New;
function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 633;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 8355209;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 633;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 8355209;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 620;
dtmSubPoints[1].y := 67;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 8355209;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 648;
dtmSubPoints[2].y := 67;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 8355209;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 645;
dtmSubPoints[3].y := 38;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 8355209;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 600;
dtmSubPoints[4].y := 22;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8355209;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
Begin
end.
Now as we want scar to Find the DDTM we must specify it as so:
Program New;
Var
DTM1 : Integer;
function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 633;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 8355209;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 633;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 8355209;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 620;
dtmSubPoints[1].y := 67;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 8355209;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 648;
dtmSubPoints[2].y := 67;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 8355209;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 645;
dtmSubPoints[3].y := 38;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 8355209;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 600;
dtmSubPoints[4].y := 22;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8355209;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
Begin
end.
^ As you can see I have added an Integer called 'DTM1' I want my script to walk to this place so what I must now do is to Make scar associate that DTM1 with the SetDDTM :
Program New;
{.include srl/srl.scar}
Var
DTM1, x, y : Integer;
function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 633;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 8355209;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 633;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 8355209;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 620;
dtmSubPoints[1].y := 67;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 8355209;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 648;
dtmSubPoints[2].y := 67;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 8355209;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 645;
dtmSubPoints[3].y := 38;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 8355209;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 600;
dtmSubPoints[4].y := 22;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8355209;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
Begin
DTM1 := SetDDTM;
If DTMRotated(DTM1, X, Y, MMX1, MMY1, MMX2, MMY2) Then
WriteLn('Found DTM1');
end.
What I have done is used the Procedure DTMROtated to search for the DTM1 in the Minimap, If it finds it then it will write in the DebugBox : Found DTM1.
This is just a glimpse of How smex-eh the DDTM Editor is.
Good Night!
[Note Some of the Example Might'nt Work]
V - LINKS!
http://www.villavu.com/forum/showthread.php?t=26968?t=29398&highlight=ddtm+tuts
http://www.villavu.com/forum/showthread.php?t=19162?t=20941&highlight=ddtm+tuts
http://www.villavu.com/forum/showthread.php?t=12584
Use the search Button to Find More!
Credits:
Nielsie
Sumilion
THANKS FOR READING!!!
:garfield:
Table Of Contents
I - What Are DDTM's?
II - Capturing The Client.
III - Getting To Grips with the DDTM Edit0r!
IV - Using the DDTM[s] In Your Script!
V - Links!
LINK TO THE DDTM EDITOR : http://www.villavu.com/forum/showthread.php?t=25312
|||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||| ||||||||||||||||||||||||||||||||||||||
I - What Are DDTM's?
So What the f*ck are DDTM's? DDTM's are related to DTM's, but they have a more user friendly Interface. DDTM's stand for Dynamic Deformable Template Model. They are used mainly for walking to places in runescape using SCAR. Coding a DDTM by hand isn't at all hard, but takes a lot of time.
This Is why Nielsie has made a very easy shortcut for us, this was located in the Delphi Programming Section of the forum and sadly only got 'jack' views. This is a shame really as I think this is one of the best programming helping tools available (ACA 2 :p). It has a very Human friendly interface and is very very easy to use.
A Picture:
http://i29.tinypic.com/sym5jp.jpg
II - Capturing The Client.
Ok So now we need to Get the client picture (Runescape Interface) to plot the DDTM
MainPoints and Subpoints, For this I would use the Screen Captcha that Sumilion sent me:
program RS_ScreenCaptcha;
var
bmpScreen, x, y: Integer;
begin
ActivateClient;
wait(1800+Random(200))
Disguise('Dont touch');
GetClientDimensions(x, y);
bmpScreen := BitmapFromString(x, y, '');
CopyClientToBitmap(bmpScreen, 0, 0, x, x);
SaveBitmap(bmpScreen, ScriptPath + 'RS Screenshot.bmp');
Disguise('Done!');
end.
Not: 'You must save this to your desktop as that is where the picture will be saved aswell
;)'
^ Just Specify the Client to where you want to walk to and it will capture it in a .Bmp
form^
So you ask why do I Need this? You need this becuase Nielsie's DDTM editor goes of co-ords from about 100 pixels to 500, you need to capture the Screen exactally or it won't Find the DDTM when we go to the end.
Ok so we should now have the picture ready on which to Make the DDTM, Now comes the Hard Part j/k....
III - Getting To Grips with the DDTM Edit0r!
Now the DDTM Editor is just like the DTM editor that SCAR has built in, but with a few extra Functions :
Create, edit, view and delete points
Adjustable colors for the lines to the points.
Yellow pointers to see which point you're editing.
Load / save DTM's (supports the SCAR format) :D
Load DTM's from strings.
Load images from a .bmp file.
Load images from clipboard
Show the matching pixels (similar to cts 1).
Generate a DDTM or DTM which you can use in SCAR.
Now we go to Image ( in the taskbar! ) --> Browse Image.
You should now see a screen like this:
http://i32.tinypic.com/15f6f7k.jpg
Go onto the desktop and select this .bmp image called 'RS Screenshot', Open it and proceed.
Now we have the Image Open. My Image Looks Like this:
http://i26.tinypic.com/2yjx8k3.jpg
Now we make the DDTM, just like you would do with the Normal DTM Editor you make a mainpoint and a subpoint. As your plotting the points you should notice these Boxes called Tolerance, Color, Area Size, Area Shape, x and y.
You might want to play about with these values to find the right DDTM for you.
My DDTM Looks like this :
http://i26.tinypic.com/2aa0djb.jpg
As you see my mouse is hovering over the DDTM to Text option you might want to do this after you have made your DDTM.
When you are finished click that Option and a window should pop up with the DDTM:
http://i25.tinypic.com/23hrfgm.jpg
Use this Copy to Clip Board Function and close the DDTM Editor.
IV - Using the DDTM[s] In Your Script!
Open Scar you should see:
program New;
begin
end.
Now This is what my DDTM looks Like and this is How you should Paste it
Program New;
function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 633;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 8355209;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 633;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 8355209;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 620;
dtmSubPoints[1].y := 67;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 8355209;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 648;
dtmSubPoints[2].y := 67;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 8355209;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 645;
dtmSubPoints[3].y := 38;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 8355209;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 600;
dtmSubPoints[4].y := 22;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8355209;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
Begin
end.
Now as we want scar to Find the DDTM we must specify it as so:
Program New;
Var
DTM1 : Integer;
function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 633;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 8355209;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 633;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 8355209;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 620;
dtmSubPoints[1].y := 67;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 8355209;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 648;
dtmSubPoints[2].y := 67;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 8355209;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 645;
dtmSubPoints[3].y := 38;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 8355209;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 600;
dtmSubPoints[4].y := 22;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8355209;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
Begin
end.
^ As you can see I have added an Integer called 'DTM1' I want my script to walk to this place so what I must now do is to Make scar associate that DTM1 with the SetDDTM :
Program New;
{.include srl/srl.scar}
Var
DTM1, x, y : Integer;
function SetDDTM: Integer;
var
dtmMainPoint: TDTMPointDef;
dtmSubPoints: Array [0..4] of TDTMPointDef;
TempTDTM: TDTM;
begin
dtmMainPoint.x := 633;
dtmMainPoint.y := 55;
dtmMainPoint.AreaSize := 0;
dtmMainPoint.AreaShape := 0;
dtmMainPoint.Color := 8355209;
dtmMainPoint.Tolerance := 0;
dtmSubPoints[0].x := 633;
dtmSubPoints[0].y := 55;
dtmSubPoints[0].AreaSize := 0;
dtmSubPoints[0].AreaShape := 0;
dtmSubPoints[0].Color := 8355209;
dtmSubPoints[0].Tolerance := 0;
dtmSubPoints[1].x := 620;
dtmSubPoints[1].y := 67;
dtmSubPoints[1].AreaSize := 0;
dtmSubPoints[1].AreaShape := 0;
dtmSubPoints[1].Color := 8355209;
dtmSubPoints[1].Tolerance := 0;
dtmSubPoints[2].x := 648;
dtmSubPoints[2].y := 67;
dtmSubPoints[2].AreaSize := 0;
dtmSubPoints[2].AreaShape := 0;
dtmSubPoints[2].Color := 8355209;
dtmSubPoints[2].Tolerance := 0;
dtmSubPoints[3].x := 645;
dtmSubPoints[3].y := 38;
dtmSubPoints[3].AreaSize := 0;
dtmSubPoints[3].AreaShape := 0;
dtmSubPoints[3].Color := 8355209;
dtmSubPoints[3].Tolerance := 0;
dtmSubPoints[4].x := 600;
dtmSubPoints[4].y := 22;
dtmSubPoints[4].AreaSize := 0;
dtmSubPoints[4].AreaShape := 0;
dtmSubPoints[4].Color := 8355209;
dtmSubPoints[4].Tolerance := 0;
TempTDTM.MainPoint := dtmMainPoint;
TempTDTM.SubPoints := dtmSubPoints;
Result := AddDTM(TempTDTM);
end;
Begin
DTM1 := SetDDTM;
If DTMRotated(DTM1, X, Y, MMX1, MMY1, MMX2, MMY2) Then
WriteLn('Found DTM1');
end.
What I have done is used the Procedure DTMROtated to search for the DTM1 in the Minimap, If it finds it then it will write in the DebugBox : Found DTM1.
This is just a glimpse of How smex-eh the DDTM Editor is.
Good Night!
[Note Some of the Example Might'nt Work]
V - LINKS!
http://www.villavu.com/forum/showthread.php?t=26968?t=29398&highlight=ddtm+tuts
http://www.villavu.com/forum/showthread.php?t=19162?t=20941&highlight=ddtm+tuts
http://www.villavu.com/forum/showthread.php?t=12584
Use the search Button to Find More!
Credits:
Nielsie
Sumilion
THANKS FOR READING!!!
:garfield: