Results 1 to 9 of 9

Thread: ObjDTM

  1. #1
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default ObjDTM

    So, I'm having trouble to get ObjDTM's to work.
    I created the path, but it keeps saying it can't find node 0, and if I set that extra failsafe, it says not in area, and terminates, which it always is in.
    Here's the code....
    Simba Code:
    program new;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SPS/SPS.simba}
    {$i ObjectDTM/ObjDTMInclude.Simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Nick := ''; // 3-4 lowercase letters from username; used for random event detection
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;
    procedure WalkToLineThere;
    var
      ToLineThere:TPointArray;
    begin
      SPS_Setup(RUNESCAPE_SURFACE,['10_6','11_6']);
      ToLineThere := [Point(4219, 2658), Point(4212, 2640),
                     Point(4193, 2630), Point(4194, 2591), Point(4220, 2567)];
      SPS_WalkPath(ToLineThere);
    end;
    procedure WalkToDungeon;
    var
      ToDungeonThere:TStringArray;
      x,y:Integer;
    begin
      ToDungeonThere := ['53:36:6:1:7:90:38:1:7:70:71:1:7:41:67:1:7:74:104:1:7:25:100:1:7:90:104:4:96:56:40:68:50:101:120:95',
       '47:15:3:1:7:111:63:1:7:49:87:1:7:94:116:4:89:30:31:75:87:119:144:82',
        '31:25:4:2:7:119:72:2:7:37:68:2:7:25:80:2:7:70:76:4:76:41:42:82:95:121:131:64',
         '69:10:4:2:7:106:124:2:7:50:112:2:7:102:52:2:7:42:60:4:82:53:58:70:74:101:113:87',
         '87:17:4:2:7:138:88:2:7:54:96:2:7:118:88:2:7:54:80:4:113:54:43:53:79:128:123:109',
         '75:9:4:5:7:72:99:5:7:48:115:5:7:44:99:5:7:68:91:4:90:53:52:75:92:113:118:95',
         '87:11:4:5:7:88:63:5:7:60:52:5:7:37:83:5:7:51:115:4:113:35:36:76:98:121:150:85',
         '95:35:3:5:7:88:99:5:7:53:99:5:7:57:122:9:107:19:27:29:25:122:77:146:126:126:145:95:147:47:131:28:115:13']
      FFlag(0);
      Wait(1000+random(100));
      if(FindObj(x,y,'wall',3950414,5)) then
      Mouse(x,y,3,3,True);
      Wait(5000+random(500))
      ObjDTM_WalkPath(ToDungeonThere,0,100,80,True,False)
    end;
    begin
      // These 4 lines HAVE to be set BEFORE you call SetupSRL;
      Smart_Server := 25;
      Smart_Members := False;
      Smart_Signed := True;
      Smart_SuperDetail := False;

      ClearDebug;
      SetupSRL;
      ObjDTM_Setup;
      DeclarePlayers; // Calls the procedure, you can't forget this!
      LoginPlayer; // You want your player to login, right?
      WalkToLineThere;
      WalkToDungeon;
    end.

  2. #2
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you include the debug box?
    And I'm pretty sure this is not the problem, but you're missing some semicolons near the end of the "WalkToDungeon" function.

  3. #3
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Progress Report:
    Object DTM Include: Not at beginning of path.  Exiting.
    Successfully executed.

    That's one of the errors, let me get the second.
    Progress Report:
    Did not find path node 0.
    Did not find path node 0.
    Did not find path node 0.
    Did not find path node 0.
    Failed to walk to path node 0, trying to step forward or back one node.
    Error: Out Of Range at line 1768
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]
    Last edited by NKN; 03-26-2012 at 07:57 PM.

  4. #4
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Apparently one of the errors is that it won't find the initial "node". Are you sure you're starting it at a place where it can see all of the Objects that you used when creating the ObjectDTM? Were any of the objects on the edge of the minimap?

  5. #5
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Nope... I'll try to remake it with only one object

  6. #6
    Join Date
    Feb 2012
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    One object won't be enough - too many false ID's. I'd suggest making it with three or four objects that are easily visible from the point you're starting at.

  7. #7
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    I tried, still failed.
    Doesn't like the wilderness...

  8. #8
    Join Date
    Jul 2008
    Location
    NSW, Australia
    Posts
    881
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    function ObjDTM_Walk(ObjDTMToWalk: String; FlagDistance, PollRate,
    Tries: Integer; GroundLevel: Boolean): Boolean;

    Change ObjDTM_WalkPath(ToDungeonThere,0,100,80,True,False ) to:
    ObjDTM_WalkPath(ToDungeonThere,0,100,80,True)

    if(FindObj(x,y,'wall',3950414,5)) then this could be wrong to because Uptext is case sensitive
    Last edited by Sir Ducksworthy; 03-27-2012 at 12:42 AM.

  9. #9
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

    Quote Originally Posted by leetsxc View Post
    function ObjDTM_Walk(ObjDTMToWalk: String; FlagDistance, PollRate,
    Tries: Integer; GroundLevel: Boolean): Boolean;

    Change ObjDTM_WalkPath(ToDungeonThere,0,100,80,True,False ) to:
    ObjDTM_WalkPath(ToDungeonThere,0,100,80,True)

    if(FindObj(x,y,'wall',3950414,5)) then this could be wrong to because Uptext is case sensitive
    My walkPath was right, Walk has one less Boolean, WalkPath has two.
    I got the uptext right, don't worry. ^^

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
  •