Results 1 to 3 of 3

Thread: DDTM walking tutorial help xD Noob :D

  1. #1
    Join Date
    Nov 2007
    Posts
    236
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DDTM walking tutorial help xD Noob :D

    Ok so i followed the tutorial from the DDTM site

    This is my script, its a script where i walk from the bank in lumby in the castle to the stairs.

    When i run this script it just loggsout and say:

    Could not find Falador Road Color!
    Walk Backup 1. - Failed. Logging Out.
    Successfully executed

    so i got it working yay, but still doh!

    Here are the pictures from the DDTM program:



    Now i alsow found the Radial walk numbers, but nvm thos they are in the script.

    So tell me am i dumb or is there somthing wrong with the script? i did like the tutorial sayed, but i changed the numbers, and names so it should be correct?

    help

    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 the stairs beings here
      dtmMainPoint.x := 877;
      dtmMainPoint.y := 284;
      dtmMainPoint.AreaSize := 0;
      dtmMainPoint.AreaShape := 0;
      dtmMainPoint.Color := 16777215;
      dtmMainPoint.Tolerance := 0;

      dtmSubPoints[0].x := 877;
      dtmSubPoints[0].y := 284;
      dtmSubPoints[0].AreaSize := 0;
      dtmSubPoints[0].AreaShape := 0;
      dtmSubPoints[0].Color := 16777215;
      dtmSubPoints[0].Tolerance := 0;

      dtmSubPoints[1].x := 863;
      dtmSubPoints[1].y := 325;
      dtmSubPoints[1].AreaSize := 0;
      dtmSubPoints[1].AreaShape := 0;
      dtmSubPoints[1].Color := 8686734;
      dtmSubPoints[1].Tolerance := 0;

      dtmSubPoints[2].x := 865;
      dtmSubPoints[2].y := 327;
      dtmSubPoints[2].AreaSize := 0;
      dtmSubPoints[2].AreaShape := 0;
      dtmSubPoints[2].Color := 8686734;
      dtmSubPoints[2].Tolerance := 0;

      dtmSubPoints[3].x := 867;
      dtmSubPoints[3].y := 326;
      dtmSubPoints[3].AreaSize := 0;
      dtmSubPoints[3].AreaShape := 0;
      dtmSubPoints[3].Color := 8686734;
      dtmSubPoints[3].Tolerance := 0;

      dtmSubPoints[4].x := 870;
      dtmSubPoints[4].y := 324;
      dtmSubPoints[4].AreaSize := 0;
      dtmSubPoints[4].AreaShape := 0;
      dtmSubPoints[4].Color := 8686734;
      dtmSubPoints[4].Tolerance := 0;

      TempTDTM.MainPoint := dtmMainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
          end;
      end;
    end;
    function WalkToStairs: 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, 190, 550, 44, 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;
      WalkToStairs;
    end.

  2. #2
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    Use this guide, the problem is that your capturing the whole screen . Hence making the co-ords offset by a huge margin.

    http://www.villavu.com/forum/showthr...highlight=ddtm

  3. #3
    Join Date
    Nov 2007
    Posts
    236
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

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
  •