Results 1 to 8 of 8

Thread: RadialWalk/Autocolor?

  1. #1
    Join Date
    Jul 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default RadialWalk/Autocolor?

    SCAR Code:
    program compass;

    {.include SRL/SRL.scar}

    begin
      Wait(4000)
      SetupSRL;
      Makecompass('n')
      RadialWalk(6322302,240,210,70,-2,-2)
      Wait(2000)
      RadialWalk(6322302,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(6250599,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(6250599,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(6250599,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(214122,200,50,70,-2,-2)
    end.

    The Script works. . sometimes. Apparently the minimap color changes.

    I think I need to add this to line 9, but it doesn't work, I get a fail access error

    FindColor(x, y, 6322302, 0, 0, 600, 300) /line 9?

  2. #2
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    SCAR Code:
    program compass;
    {.include SRL/SRL.scar}

    procedure HeyLook;
    begin
      Wait(4000)
      SetupSRL;
      Makecompass('n')
      RoadColor := FindRoadColor; // RoadColor is a constant in a procedure...
      RadialWalk(RoadColor,240,210,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,50,70,-2,-2)
    end;

    begin
      SetupSRL;
      HeyLook;
    end;

    See what i did? First off, i made a constant in a procedure. FindRoadColor; is a SRL FUNCTION that searches for the road color and then gives the color to RoadColor. Simple as that.

    So if FindRoadColor picks the color from the road.......7809503, then it gives that color to RoadColor and ta-da! Like magic "it works".

  3. #3
    Join Date
    Jul 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program compass;

    {.include SRL/SRL.scar}

    begin
      Wait(4000)
      SetupSRL;
      Makecompass('n')
      RoadColor := FindRoadColor;
      RadialWalk(RoadColor,240,210,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RoadColor := FindRoadColor;
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(214122,200,50,70,-2,-2)
    end.

    Plugged in the Road := FindRoadColor;

    Now I get the error:
    Could not find Road Color!
    Could not find Road Color!

  4. #4
    Join Date
    Dec 2006
    Posts
    908
    Mentioned
    1 Post(s)
    Quoted
    17 Post(s)

    Default

    oh....well what is it basically ur walking on

  5. #5
    Join Date
    Jul 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm moving from road to road.

    Starting in Falador, to Falador South, to Open Grass, to Port Sarim Road, to Either Port Docks, or Different Shops in Port Sarim

  6. #6
    Join Date
    Jul 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    program compass;

    {.include SRL/SRL.scar}

    begin
      Wait(4000)
      SetupSRL;
      Makecompass('n')
      RoadColor := FindFallyRoadColor;
      RadialWalk(RoadColor,240,210,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RoadColor := FindRoadColor;
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(RoadColor,200,100,70,-2,-2)
      Wait(2000)
      RadialWalk(214122,200,50,70,-2,-2)
    end.

    Got It I changed my First Find Road to a Find Fally Road, and that got me Almost to the end of my Script. Just that Last Radial Walk needs to be tweaked

    RadialWalk(214122,200,50,70,-2,-2)

    I need to get the color of tree Trunks?

    This last function Is partially important, I could replace it with the same Road Color function, but I want to use it to test walking through Grass.

  7. #7
    Join Date
    Nov 2007
    Posts
    437
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Well you could do this:

    if (FindColorTolerance(x, y, 214122, MMx1, MMy1, MMx2, MMy2)) then
    begin
    GrassColor := GetColor(x, y);
    RadialWalk(214122,200,50,70,-2,-2)
    end else
    begin
    Writeln('Oh Well...');
    end;
    It is by no means at all the best method. It is just something simple if you really need to get by.

    Edit: Hmmm my standards aren't showing up. Meh...

  8. #8
    Join Date
    Jul 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tried that bit of code, but I'm still not getting the color returned.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Help with RadialWalk and AutoColor
    By Hatched.Egg in forum OSR Help
    Replies: 2
    Last Post: 05-23-2008, 04:34 PM
  2. AutoColor a NPC
    By Rikje in forum OSR Help
    Replies: 5
    Last Post: 06-08-2007, 05:06 AM
  3. AutoColor Help please
    By Adamb_135 in forum OSR Help
    Replies: 2
    Last Post: 05-14-2007, 01:42 PM
  4. autocolor,pls help
    By robeike in forum OSR Help
    Replies: 9
    Last Post: 02-17-2007, 02:50 PM

Posting Permissions

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