Results 1 to 8 of 8

Thread: Doesn't walk?

  1. #1
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Doesn't walk?

    It finds and chops maples fine but when it logs in, it starts tryin to find maples right away, it doesn't walk to them first here it script:
    Code:
    {Zeta's Maple Chop}
    
    
    program ZetasMapleChop;
    
    {.include SRL\SRL.scar}
    {.include SRL\SRL\Skill\Woodcutting.SCAR}
    
    const
      Maple = 19058; //the color of the maple
      Maple2 = 16760;
      Maple3 = 9548;
      Tol = 12;
      RunDirection = 'S'; //the direction to run if in fight
      LogsToChop = 50; //how many logs to chop)
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; //Number of players to use
      NumberOfPlayers(HowManyPlayers); //Don't Touch
      CurrentPlayer := 0;  //Player to start with
      Players[0].Name := 'bronze godd'; //Players username
      Players[0].Pass := ''; //Players password
      Players[0].Nick := 'ronz'; //3-4 characters from players username(Lowercase and no spaces)
      Players[0].Active := True;     //Are you using this player?
    end;
    
    procedure WalkToMaples;
    begin
      if (not (LoggedIn)) then Exit;
      MakeCompass('N');
      RadialWalk(2377842 , 315, 355, 32, 0, 0);
    end;
    
    procedure ChopMaples;
    var
      x, y, ChopMark: Integer;
    begin
      if (not (LoggedIn)) then Exit;
      repeat
        if FindObjCustom(x, y, ['aple tree'], [Maple, Maple2, Maple3], Tol) then
        begin
          GetMousePos(X, Y);
          Wait(500 + Random(102));
          Mouse(X, Y, 1, 1, True);
          MarkTime(ChopMark);
          repeat
            Wait(500 + Random(250));
            FindNormalRandoms;
          until(TimeFromMark(ChopMark) >= (10000 + Random(5000))) or (InvFull) or (not (LoggedIn));
        end;
      until (InvFull) or (not (LoggedIn));
    end;
    
    procedure WalkToBank;
    begin
      if (not (LoggedIn)) then Exit;
      if (InvFull) then
      begin
        MakeCompass('N');
        RadialWalk( 9606557 , 218, 195, 50, 0, 0);
      end;
    end;
    
    
    begin
      ActivateClient;
      SetUpSRL;
      DeclarePlayers;
      repeat
        if not LoggedIn then loginplayer;
         WalkToMaples;
         ChopMaples;
         WalkToBank;
         if (not (LoggedIn)) then Exit;
       until (false);
    end.





  2. #2
    Join Date
    Mar 2007
    Posts
    3,042
    Mentioned
    1 Post(s)
    Quoted
    14 Post(s)

    Default

    I'd assume it's because it's not finding that color or that color within the radials. You'll probably have to use some tolerance or an autocolor function to get it working better.
    :-)

  3. #3
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i think it would be easier to find the woodcut symbol anyway, i forgot what it is like,

    if findsymbol('tree') then
    Mouse(x,y,1,1);

    or?





  4. #4
    Join Date
    Sep 2007
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    yeah find a figure easy to find on the mini map or map.

  5. #5
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    how do i use tolerance with radial walk?





  6. #6
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zeta View Post
    how do i use tolerance with radial walk?
    this might help ^^ but next time search first

    SCAR Code:
    function RadialToleranceWalk(TheColor: Integer; StartRadial, EndRadial: Integer;
      Radius: Integer; Xmod, Ymod, Tol: Integer): Boolean; // By Wizzup? and WT-Fakawi.
    var
      i, X1, Y1, x, y: Integer;
    begin
      if (RoadColorChecker) then
        if (DebugRadialRoad) then
          WriteLn(' THROUGH RADIALROADWALK=  ---> ' + IntToStr(RoadColor));
      if (StartRadial = EndRadial) then
      begin
        WriteLn('Using LinearRoadWalk, equal values.')
          if LinearRoadWalk(TheColor, StartRadial, Radius, Xmod, Ymod) then
          Result := True;
      end
      else if (StartRadial < EndRadial) then
      begin
        repeat
          for i := StartRadial to EndRadial do
          begin
            x1 := Round(Radius * Sine(i)) + 646;
            y1 := Round(-Radius * Cose(i)) + 84;
            if Not LoggedIn then Exit;
            if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
            begin
              MouseFindNoFlag(X,Y,Xmod,Ymod);
              Result := True;
              CountFlag(10);
              Exit;
            end;
          end;
          Radius := Radius - 4;
        until (Radius <= 1);
      end else
        if (StartRadial > EndRadial) then
        begin
          repeat
            for i := StartRadial downto EndRadial do
            begin
              x1 := Round(Radius * Sine(i)) + 646;
              y1 := Round(-Radius * Cose(i)) + 84;
              if Not LoggedIn then Exit;
              if (FindColorTolerance(x, y, TheColor, X1, Y1, X1 + 1, Y1 + 1, Tol)) then
              begin
                MouseFindNoFlag(X,Y,Xmod,Ymod);
                Result := True;
                CountFlag(10);
                Exit;
              end;
            end;
            Radius := Radius - 4;
          until (Radius <= 1);
        end
    end;

    Just put that in your script and use RadialToleranceWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod, Tol)

    XMod is the random, and Ymod is the y axis random,
    ....

  7. #7
    Join Date
    Jul 2007
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks dushii, i think it works now, but i have a question, do i need that whole function in my script or just RadialToleranceWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod, Tol)





  8. #8
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Zeta View Post
    thanks dushii, i think it works now, but i have a question, do i need that whole function in my script or just RadialToleranceWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod, Tol)
    add the whole function and use RadialToleranceWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod, Tol) when you want to radialwalk
    ....

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. which walk should i use?
    By TheChineseMan in forum OSR Help
    Replies: 4
    Last Post: 05-19-2008, 01:36 PM
  2. best way to walk
    By towinthiswar in forum OSR Help
    Replies: 4
    Last Post: 08-05-2007, 03:57 AM
  3. How to walk using map
    By nik999389 in forum OSR Help
    Replies: 3
    Last Post: 03-26-2007, 07:34 AM

Posting Permissions

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