Results 1 to 5 of 5

Thread: radial walking

  1. #1
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default radial walking

    Im trying to do radial walking and so far i have made it click the first place i want, but when i try to make it walk to a second place it click the road but it doesnt click the correct place. It just clicks north of the last click even tho i want it to go east, here is what im trying to do:

    SCAR Code:
    procedure blablabla;
    begin
    RadialRoadWalk(FindVarrockRoadColor, 352, 374, 32, 1, -1);
    RadialRoadWalk(FindVarrockRoadColor, 347, 364, 49, 0, 0);
    end;

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    seems like the area it is searching is very small. Maybe make the area that it searches for the road colour a little bigger? Just in case the screen is off a little.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  3. #3
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i tried to do DDTM's instead so iv read a few tuts and came up with this. but i can only get it to click the first dtm and not any of the others? i tried changing SetWalkDtm(1); to try and load all the other DDTMs but i cant seem to get it too work.

    SCAR Code:
    var Roadcolour: Integer;
    Function SetWalkDtm(Number:Integer): Integer;
    var MainPoint: TDTMPointDef; dtmSubPoints: Array [0..4] of TDTMPointDef; TempTDTM: TDTM; i: Integer;
    begin
      RoadColour := FindVarrockRoadColor;
      case Number of
        0:
        begin
          with MainPoint do
          begin
            x := 1012;
            y := 102;
            AreaSize := 4;
            AreaShape := 0;
            Color := RoadColour;
            Tolerance := 5;
          end;
          dtmSubPoints[0].x := 1012;
          dtmSubPoints[0].y := 102;
          dtmSubPoints[1].x := 998;
          dtmSubPoints[1].y := 104;
          dtmSubPoints[2].x := 1014;
          dtmSubPoints[2].y := 74;
          dtmSubPoints[3].x := 1007;
          dtmSubPoints[3].y := 75;
          dtmSubPoints[4].x := 994;
          dtmSubPoints[4].y := 90;
        end;
        1:
        begin
          with MainPoint do
          begin
            x := 1021;
            y := 126;
            AreaSize := 1;
            AreaShape := 0;
            Color := Roadcolour;
            Tolerance := 5;
          end;
          dtmSubPoints[0].x := 1021;
          dtmSubPoints[0].y := 126;
          dtmSubPoints[1].x := 1014;
          dtmSubPoints[1].y := 113;
          dtmSubPoints[2].x := 1010;
          dtmSubPoints[2].y := 138;
          dtmSubPoints[3].x := 1027;
          dtmSubPoints[3].y := 147;
          dtmSubPoints[4].x := 1008;
          dtmSubPoints[4].y := 113;
        end;
        2:
        begin
          with MainPoint do
          begin
            x := 1011;
            y := 90;
            AreaSize := 7;
            AreaShape := 0;
            Color := Roadcolour;
            Tolerance := 5;
          end;
          dtmSubPoints[0].x := 1011;
          dtmSubPoints[0].y := 90;
          dtmSubPoints[1].x := 975;
          dtmSubPoints[1].y := 148;
          dtmSubPoints[2].x := 960;
          dtmSubPoints[2].y := 140;
          dtmSubPoints[3].x := 957;
          dtmSubPoints[3].y := 94;
          dtmSubPoints[4].x := 959;
          dtmSubPoints[4].y := 114;
        end;
      end;
      for i := 0 to High(dtmSubPoints) do
      begin
        dtmSubPoints[i].AreaSize := 1;
        dtmSubPoints[i].AreaShape := 0;
        dtmSubPoints[i].Color := RoadColour;
        dtmSubPoints[i].Tolerance := 5;
      end;
      TempTDTM.MainPoint := MainPoint;
      TempTDTM.SubPoints := dtmSubPoints;
      Result := AddDTM(TempTDTM);
    end;

    and heres the part to make it walk:
    SCAR Code:
    function WalkToPlankGuy: Boolean;
    var
      WalkDTM: integer;
    begin
      WalkDTM := SetWalkDtm(0); <<<<<<<<< i tried changing these
      if FindDTM(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then <<<< <<<
      begin
        Mouse(X, Y, 8, 8, True);
        WriteLn('Walk Successfull!');
        FFlag(3);
        Result := True;
          FreeDTM(WalkDTM);
          if not (Result) then
          begin
            Logout;
          end;
        end;
    end;

    The only way i have come up with to get it too work is to just do lots of walking functions :S takes up lots of lines but it works ^^ please tell me if there is a simpler way
    Last edited by pl0xmypl0x; 08-27-2009 at 12:04 AM.

  4. #4
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Well you wouldn't have to make separate functions. I would recommend just making a parameter, so you can choose which walk you want to perform. Something like this:
    SCAR Code:
    function WalkToPlankGuy(WalkNumber : Integer): Boolean;
    var
      WalkDTM: integer;
    begin
      WalkDTM := SetWalkDtm(WalkNumber);//See, no you can choose which walk you want to do.  Look below for more.
      if FindDTM(WalkDTM, X, Y, MMx1,MMy1,MMx2,MMy2) then
      begin
        Mouse(X, Y, 8, 8, True);
        WriteLn('Walk Successfull!');
        FFlag(3);
        Result := True;
        FreeDTM(WalkDTM);
        if not (Result) then
        begin
          Logout;
        end;
      end;
    end;

    //And in your main loop, you would do something like this:
    begin
      WalkToPlankGuy(0);
      WalkToPlankGuy(1);
      WalkToPlankGuy(2);
    end;
    Understand? This way you can use the same procedure for different walks, without having to have a whole bunch of useless code.

    EDIT: You could also check out my AIO Guide for small additions you can make to make finding your DDTMs more accurate and efficient.

  5. #5
    Join Date
    Jul 2007
    Location
    Pluto... Maybe?
    Posts
    198
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks that made it much simpler, and il check out your guide

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
  •