Results 1 to 9 of 9

Thread: DTM Question

  1. #1
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default DTM Question

    I hit run and it just ends....why? I had it working two hours ago and then I added the third DTM Q2 and not it doesn't work. I just made these DTMs at 5:15 so they are new.

    Simba Code:
    Program ClanToGuild;
    //{$DEFINE SMART}
    {$i srl/srl.simba}

    Var
     X, Y: Integer;
     Q: Array [0..2] of Integer;//DTM Declaring procedure.
      aFound: Extended;

    Procedure SetDTM;//DTM Defining procedure.  //DTM for walking
    Begin
     Q[0] := DTMFromString('mlwAAAHicY2dgYIhlYmBIAuJKIM4C4kQg9gHiUCC+A5Q/AcRPgfg/EP8D4u9AfA6Ig8IDGKwcVIAsRgaDZDEGMwdZhhBnGbA4SC0/DsyIB0MBAL+YDuU=');
     Q[1] := DTMFromString('mlwAAAHicY2dgYOhnYmDoAOJ1QLwCiDOAeD4QlwExDyMDw2Wgmt1AzM4IwbZA7ADEYWGBDBFOsgxzZ09lCPZRZ/jCysIQH6bD8PbtB4b/QPX8ODAjHgwFAAI7EHk=');
     Q[2] := DTMFromString('mlwAAAHicY2dgYPBjYmBIB+JsIPYBYncmiFgSEP8HyjMzMjAcBNJiQJoRiO8D2bxAOig8gCHEWYZh5pwpDF/ZmBkUIoXAYmHBmmB9/DgwIx4MBQDoow1s');
    End;

    Procedure FrDTM;//DTM Freeing procedure.
    Begin
      FreeDTM(Q[0]);
      FreeDTM(Q[1]);
      FreeDTM(Q[2]);
    End;



    Begin
    SetupSRL;
    ActivateClient;
    SetDTM;


    If FindDTMRotated(Q[0], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
        Begin
          Mouse(x, y, 3, 3, True);
          Writeln('Walking to point');
          FFlag(6);
          Repeat
            Wait(50 + Random(25));
          Until FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
        End;
         If FindDTMRotated(Q[1], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
        Begin
         Mouse(x, y, 3, 3, True);
         Writeln('Walking to point');
         FFlag(6);
         Repeat
            Wait(50 + Random(25));
         Until FindDTMRotated(Q[2], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound);
        End;
        If FindDTMRotated(Q[2], X, Y, MMX1, MMY1, MMX2, MMY2, -Pi/4, Pi/4, Pi/60, aFound) Then
        Begin
          Mouse(x, y, 3, 3, True);
          Writeln('Walking to point');
          FFlag(6);
        End;
    FrDTM;
    end.

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Does it Writeln('Walking to point'); ?
    If not, then the DTM Q[0] is not being found, so re-make it and try again.

    I suggest you look into ObjectDTMs for minimap walking, they are AMAZING!

  3. #3
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Does it Writeln('Walking to point'); ?
    If not, then the DTM Q[0] is not being found, so re-make it and try again.

    I suggest you look into ObjectDTMs for minimap walking, they are AMAZING!
    I totally agree. You also don't get those stupid SPS errors and they are so much more accurate. I know Abu_Jwka has a great tutorial, and so does Euphenism.

  4. #4
    Join Date
    Mar 2012
    Location
    Over there
    Posts
    840
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Use the DTM Editor and convert your DTMs from string(DTM>DTM From String in DTM editor) and copy the code in between the '' and paste it in there, then see if you can match the DTM still. There may be something in the way or something else.

  5. #5
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Does it Writeln('Walking to point'); ?
    If not, then the DTM Q[0] is not being found, so re-make it and try again.

    I suggest you look into ObjectDTMs for minimap walking, they are AMAZING!

    I've used ObjectDTMs before and I tired with to earlier with them but they weren't working. I will try again, just frustrating at times having some methods work for me sometimes and other times not so.

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Yeah MiniMap walking is pretty hit and miss and hard to get a prefect constantly working.
    Lots of trial and error, but once you get it it feelssogood!

  7. #7
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Haha that is true!

    Well I got this one point to work with ObjDTM
    Simba Code:
    procedure ClanToGuild;
    var
      cx, cy: Integer;
    begin
      if ObjDTM_Find('26:39:4:1:7:27:75:1:7:14:97:10:7:66:49:10:7:92:62:4:20:36:41:32:43:51:17:53', cx, cy, True) then
      begin
        Writeln('Found point');
        ObjDTM_Walk('26:39:4:1:7:27:75:1:7:14:97:10:7:66:49:10:7:92:62:4:20:36:41:32:43:51:17:53', 2, 100, 5, True);
      end else
        Writeln('Could not find point');
    end;

    begin
    SetUpSRL;
    ObjDTM_Setup;
    ClanToGuild;
    end.

    Anyway to add a failsafe in there? Like a DTM or something? Never added failsafe's to walking procedures before.

  8. #8
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    Quote Originally Posted by 14578 View Post
    Anyway to add a failsafe in there? Like a DTM or something? Never added failsafe's to walking procedures before.
    Erm isn't quite obvious? You can put the failsafe after end else!
    So if it didn't find it then it will try your backup method...

  9. #9
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    *Face-palm* yeah..haha thanks! Also thanks for answering back my PM.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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