Results 1 to 8 of 8

Thread: Need help with radial walking tolerance.

  1. #1
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with radial walking tolerance.

    OK, I'm threw learning radial walk (thanks a LOT Boreas ) but now I'm having one problem. Is there a way to use radial walking with Tolerance? because the colors of things such as grass or whatever change like every 30 minutes even if its only just a little, and if you don't have tolerance, you need the exact same color. And I know there are things like radial road walking..etc that can get update the color all the time like that. but I'm trying to radial walk on something thats not in the auto coloring thing. So yeah, if you could help me that'd be GREAT and I'll almost be done with my super secret script which I will be releasing, and many more (hopefully) thanks in advance.

  2. #2
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    You could use or RadialWalkEx, thats RadialWalk with tolerance..
    Hup Holland Hup!

  3. #3
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by nielsie95 View Post
    You could use or RadialWalkEx, thats RadialWalk with tolerance..
    Oh.. thanks.. didn't see that in the manual... what's with the ..'s thing? usually when somebody does that it means there thinking or the person they are talking too said/asked something really stupid..... thanks for the help though......... laterz..

  4. #4
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    Lol. I'm sorry! Didn't ment it like that. I .. all the time
    Hup Holland Hup!

  5. #5
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    function WalkToWillow: Boolean;
    begin
    if(FindColor(x,y,GrassColorOnMM,589,23,698,137))then
    begin
    Writeln('found it')
    RadialWalkEx(x,y,GrassColorOnMM,40,110,63,2,2,3);
    Result:=True;
    end else
    Writeln('did not find it :(');
    end;
    thats what I tried doing. When I pick the exact color and use radial walk, it works fine, but of course you need to pick it then the color will change in 5 mins then it wouln't work Now when I use the RadialWalkEx like that, it writeln's found it, so it finds the color on the mini map, thats no problem. but it doesn't radial walk after that.. do you see the problem?

  6. #6
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Hmm... I don't see a problem, but as for finding the color, I suggest using this:

    SCAR Code:
    {*******************************************************************************
    function AutoColorThis(Bitmap, MaxTol, X1, Y1, X2, Y2: Integer): Integer;
    By: Sumilion
    Description: Resturns exact color of a bmp with tol found on the screen.
    *******************************************************************************}


    function AutoColorThis(Bitmap, MaxTol, X1, Y1, X2, Y2: Integer): Integer;
    var
      lTol, Ax, Ay: Integer;
    begin
      repeat;
        if (FindBitmapToleranceIn(Bitmap, Ax, Ay, X1, Y1, X2, Y2, lTol)) then
        begin
          Result := GetColor(Ax, Ay);
          Exit;
        end;
        lTol := lTol + 5;
      until (lTol >= MaxTol);
      WriteLn('Color NOT found.');
    end;

    Here it is set up: (You still have to fetch the BMP)

    SCAR Code:
    GrassColor := AutoColorThis(GrassBMP, 50, MMX1, MMY1, MMX2, MMY2);

    Set GrassColor as a variable, and set the bitmap GrassBMP, and you'll be able to use "GrassColor" whenever you need to find the color for the grass.

    I would think AutoColorThis would be more reliable than the color with a tolerance. I could be wrong.

    Hope I've been of a help to you, bye!

  7. #7
    Join Date
    Sep 2006
    Posts
    6,089
    Mentioned
    77 Post(s)
    Quoted
    43 Post(s)

    Default

    You now have the place of the found place stored in your variables x,y. So use Mouse or MouseFindFlag after it. If I'm right, it should work now .

    Edit: I also think that you maybe used the Function wrong:

    SCAR Code:
    //RadialWalkEx
    function RadialWalkEx(var x, y: Integer; cx, cy, TheColor, tol: Integer;
      StartRadial, EndRadial: Integer; Radius: Integer): Boolean;
    //x and y are the variables where the color is found and is gonne be stored
    //cx and cy are variables for the center from where you are looking (Incase of MM use MMCX and MMCY
    //I think you understand the rest? =]

    Edit2 : This is how RadialWalk is used:

    SCAR Code:
    function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius:
      Integer; Xmod, Ymod: Integer): Boolean;
    var
      mx, my: Integer;
    begin
      if (radialwalkex(mx, my, 648, 83, thecolor, 0, startradial, endradial, radius)) //Note the 0 tol here, change the tol to what you need =] )
        then
      begin
        MouseFindNoFlag(MX, MY, Xmod, Ymod);
        Result := True;
        FFlag(10);
      end;
    end;
    Hup Holland Hup!

  8. #8
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for that. I put the tolerance in the wrong place too.. I put it at the end thanks for the help. I get how to use radial walk, RadialWalkEx isn't in the manual though, or at least I couldn't find it.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Radial Walking Help
    By Becks in forum OSR Help
    Replies: 2
    Last Post: 10-19-2007, 12:24 AM
  2. Need help with radial walking.
    By omfg2007 in forum OSR Help
    Replies: 6
    Last Post: 04-07-2007, 12:36 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
  •