Page 1 of 2 12 LastLast
Results 1 to 25 of 44

Thread: Complete DDTM Walking Tutorial.

  1. #1
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default Complete DDTM Walking Tutorial.

    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


    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:


    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.

    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:


    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:


    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:

    SCAR Code:
    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:

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

    Ends up looking like this:
    SCAR Code:
    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.

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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
    ~Hermen

  3. #3
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    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...)

  4. #4
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    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

  5. #5
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    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...

  6. #6
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    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.

  7. #7
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Could someone explain what hermpie just said about increasing the area of the subpoints? What would that do.

  8. #8
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    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.

  9. #9
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    Wow thanks for this tutorial man! Finally a descriptive ddtm tutorial. I dont normally do this....but ima rep you.
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

  10. #10
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

  11. #11
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default



    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?

  12. #12
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    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..

  13. #13
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    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)/

  14. #14
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Ye that should work, but remember to have your AreaSize 3-4 for the point thats on the dirt.

  15. #15
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by BobboHobbo View Post
    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

  16. #16
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by deathscytex View Post
    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.

  17. #17
    Join Date
    Nov 2007
    Posts
    184
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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...

  18. #18
    Join Date
    Jun 2008
    Location
    Somewhere
    Posts
    117
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Nice tut man, I have been trying to learn DDTMs and you helped out

    I rep you

  19. #19
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    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!

  20. #20
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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
    “Ignorance, the root and the stem of every evil.”

  21. #21
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Post the code or PM w/e. Have to see how you done and what you done it on.

  22. #22
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks
    E: Sent you a PM hope you can help me out
    “Ignorance, the root and the stem of every evil.”

  23. #23
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

  24. #24
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    oh sorry Ill resend it ive been on holidays for a while now
    “Ignorance, the root and the stem of every evil.”

  25. #25
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    Hey BH, i just noticed that

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

    What if i got another DDTM but with 5 dtmSubPoints

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Complete Form Tutorial
    By BobboHobbo in forum OSR Advanced Scripting Tutorials
    Replies: 10
    Last Post: 05-29-2012, 01:36 PM
  2. Complete forms tutorial
    By tim46 in forum OSR Advanced Scripting Tutorials
    Replies: 29
    Last Post: 06-12-2009, 11:43 PM
  3. ddtm walking need help...
    By joery in forum OSR Help
    Replies: 5
    Last Post: 11-06-2008, 11:18 PM
  4. Help With DDTM Walking
    By Blumblebee in forum OSR Help
    Replies: 11
    Last Post: 09-02-2008, 11:07 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •