Results 1 to 4 of 4

Thread: ObjDTM walking

  1. #1
    Join Date
    Jun 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default ObjDTM walking

    I've been using ObjDtm walking for my script and it seems to work well everywhere else but when its used in this certain area (LLeyta) it always either works,sometimes fails or clicks in the wrong spot. A lot of the time, it won't find the areas or find 1 then go through all the other ones and not click (Because of the WriteLN it will say point 1 point 2 point 3 then retry again because of a check i have elsewhere). Am i doing something wrong or is there a better way?


    Simba Code:
    procedure WalkToPassTree;
        var
        cx, cy: Integer;
        begin



     ObjDTM_Walk('12:74:5:1:7:107:41:1:7:116:53:1:7:108:66:1:7:43:117:1:7:85:146:3:19:70:19:82:3:71', 2, 100, 5, True);
     writeLN('Starting our walk to PassTree Point 1');
      flag;


       ObjDTM_Walk('19:84:5:2:7:51:77:2:7:43:89:2:7:39:97:2:7:91:125:2:7:111:144:5:8:76:34:76:38:89:13:88:3:87', 2, 100, 5, True);
        writeLN('Found Point 2');
       flag;


        ObjDTM_Walk('51:22:7:1:7:70:27:1:7:70:43:1:7:72:119:1:7:44:128:1:7:28:116:1:7:27:68:1:7:30:44:3:46:29:60:27:47:9', 2, 100, 5, True);
          writeLN('Found Point 3');
         flag;


        ObjDTM_Walk('69:43:5:2:7:99:57:2:7:99:22:2:7:65:74:1:7:58:54:1:7:46:92:4:65:38:76:39:74:63:63:62', 2, 100, 5, True);
         SetAngle(SRL_Angle_High);
         MakeCompass('w');
          writeLN('Found Point 4');
        flag;
        end;

    Yes i know its ugly
    Last edited by jman1208; 07-30-2012 at 12:25 AM.

  2. #2
    Join Date
    Apr 2012
    Location
    Australia
    Posts
    1,252
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Well, first of all it is going to WriteLn point 1 .. point 3 regardless of whether or not it finds the area.
    Try making it
    Simba Code:
    if ObjDTM_Walk(...) then
      WriteLn(..);

  3. #3
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    ObjDTM_Walk is a function, so use that to know whether it works:

    Simba Code:
    procedure WalkToPassTree;
    var
      cx, cy: Integer;
    begin
      if (ObjDTM_Walk('12:74:5:1:7:107:41:1:7:116:53:1:7:108:66:1:7:43:117:1:7:85:146:3:19:70:19:82:3:71', 2, 100, 5, True)) then
        writeLN('Starting our walk to PassTree Point 1');
      flag;
      if (ObjDTM_Walk('19:84:5:2:7:51:77:2:7:43:89:2:7:39:97:2:7:91:125:2:7:111:144:5:8:76:34:76:38:89:13:88:3:87', 2, 100, 5, True)) then
        writeLN('Found Point 2');
      flag;
      if (ObjDTM_Walk('51:22:7:1:7:70:27:1:7:70:43:1:7:72:119:1:7:44:128:1:7:28:116:1:7:27:68:1:7:30:44:3:46:29:60:27:47:9', 2, 100, 5, True)) then
        writeLN('Found Point 3');
      flag;
      if (ObjDTM_Walk('69:43:5:2:7:99:57:2:7:99:22:2:7:65:74:1:7:58:54:1:7:46:92:4:65:38:76:39:74:63:63:62', 2, 100, 5, True)) then
        begin
          SetAngle(SRL_Angle_High);
          MakeCompass('w');
          writeLN('Found Point 4');
        end;
      flag;
    end;
    Now it will only do the WriteLn if it works

  4. #4
    Join Date
    Jun 2007
    Posts
    117
    Mentioned
    0 Post(s)
    Quoted
    16 Post(s)

    Default

    Oh wow i'm so stupid i can't believe i forgot that ^^ Thanks

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
  •