Results 1 to 3 of 3

Thread: Trouble with RadialRoadWalk, or maybe FindColor, or maybe both

  1. #1
    Join Date
    Oct 2009
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question Trouble with RadialRoadWalk, or maybe FindColor, or maybe both

    Hello all,

    Having trouble implementing a routine to walk from the Falador Furnace to a mining site. I cannot get the simplest RadialRoadWalk routine to work. I'm standing at the statue like half a minimap northwest of the Falador furnace, and the script tries to walk straight east using autocolors.

    I know it's not here, but I have also eyedropped the color and tried that, with inconsistent success.

    To make sure my coordinate system doesn't get jacked up, I retarget the window during the wait(3000) command when I run the script, and I've checked the coordinates by hovering over the minimap and comparing values to MMX1, MMY1, etc.

    (by the way, I eventually plan to also make a script that does the same thing using DTMs or bitmaps, which can serve as a backup. I tried DTMs and BMPs first since I have a routine that flawlessly locates the furnace and starts to smelt, using BMPs. Had trouble walking along the road using BMPs and DTMs also, though. I figure one thing at a time...)

    I know there's no antibans. I manually do antiban while testing.

    Script is here: (sorry, can't find a "script" button so I'll use "quote")


    program New;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Misc/FaladorColorFinder.scar}

    var x, y : integer;

    //------------------------------ RRWFailSafe --------------------------------//
    // DESCRIPTION: calls RadialRoadWalk for about 11 seconds or until a Road
    // is found and clicked. Returns false if time runs out, and
    // true if road is found and clicked.
    // INPUTS:
    // TheColor - int color
    // StartRadial - int radial 0 - 720 (360 degrees in a circle)
    // EndRadial - int radial 0 - 720
    // Radius - how far from minimap center to search for the color to walk to
    // Xmod, Ymod - don't understand these yet. use 2, 2.
    // NOTES:
    // ~ No antibans implemented yet
    // ~ EndRadial should be greater than Start Radial
    //------------------------------ RRWFailSafe --------------------------------//
    function RRWFailsafe(TheColor: Integer; StartRadial, EndRadial: Integer;
    Radius: Integer; Xmod, Ymod: Integer) : boolean;
    var Start : integer;
    begin
    MarkTime(Start);
    Result := false;
    repeat
    Result := RadialRoadWalk(TheColor, StartRadial, EndRadial, Radius, Xmod, Ymod);
    wait(125 + random(40));
    until ((TimeFromMark(Start)>=(10000+random(2500))) or Result);
    end;


    /////////////////////////////////////////////////////////////////////////////
    { MAIN PROCEDURE }
    /////////////////////////////////////////////////////////////////////////////
    begin

    wait(3000); // retarget window if necessary.
    setupsrl;

    if (RRWFailsafe(FindFaladorRoadColor, 81, 85, 70, 2, 2)) then
    writeln('RRW successful w/ FaladorRoadColor')
    else
    writeln('RRW failed w/ FaladorRoadColor ');

    if (RRWFailsafe(FindRoadColor, 81, 85, 70, 2, 2)) then
    writeln('RRW successful w/ RoadColor')
    else
    writeln('RRW failed w/ RoadColor ')

    end.

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

    Default

    Your radians are extremely small.. Only 4 degrees? Try making the radians bigger and see if that helps. Also, FindFallyRoadColor might not work, so if larger radians do not fix the problem, try picking the color really quick to see if it works. If that works, then you are going to need to find your own way to auto color the road.

    Let me know if you need any more help.
    ~JAD

  3. #3
    Join Date
    Jul 2008
    Location
    US
    Posts
    104
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    use scar tags

    use these, but use []'s instead of ()'s

    (SCAR)(/SCAR)

    Don't Forget to put the slash.

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
  •