Results 1 to 10 of 10

Thread: About RadialWalk. I need help o_o

  1. #1
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default About RadialWalk. I need help o_o

    So...
    What is radialwalk good for, when the autocolor functions for the roads dont work ...

    I'm Currently Working on Script... One that collects stuff and banks it.
    It was just supposed to be some practice bla +-+ . But now it became quite huge... about 700 rows already...

    Only one thing that bugs me is the walking...

    I'm using... as you might have guessed ... that "radialwalk" function...
    And since the road autocolors dont work, im filling it with colors i grabbed with an extra script that watched the road for one hour to get all possible road colors...

    In one hour the road i observed changed his color about 10 times ... WTF +-+... So Jagex probably got hundrets of colors for one road....

    So... The Question is ....

    Is there a Possibility to get ColorTolerance work with Radialwak?... Or some way, to make the Road Autocolors work... I'd need the "Autocolor" of the road, that leads to the cooking guild, and the road that leads from Varrock west bank to the GE ( Theyr'e both the same color );

    ~caused

  2. #2
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  3. #3
    Join Date
    Mar 2007
    Location
    <3
    Posts
    2,683
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Are you sure that you're using RadialWalk correct?
    Last time i checked most of the AutoColoring road functions worked.

    Please post the walking part of your script so i can see and sort out if it's a bug.


    Shuttleu: I think they're already works, but are used incorrectly.

  4. #4
    Join Date
    Aug 2007
    Location
    in a random little world
    Posts
    5,778
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

  5. #5
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    Thanks for the replies...

    The function works... but only if I use the exact Road-Color(Picking it with scar ie...).
    When i try to use the AutoColor Functions for the Road i get the message "Road Color not found".

    Gotta try the RadialWalkex function =)... Whats aca :O ?

    Thats what my walking function looks like .. yeah messy .. I dont watch standards sometimes o-o.. iguess D':.

    It works fine, when i set the road color manually.

    Code:
    procedure gotoguild;
    var
    x,y,i,y1: integer;
    changedroom:boolean;
    changedroom2:boolean;
    begin
    
    WriteLn('Initializing');
     SetRun(True);
     wait(500);
     MakeCompass('n');
     wait(1000);
     SetAngle(True);
     wait(1000);
    i :=0;
    
    WriteLn('Initializing Completed');
    
    WriteLn('First Section Walking');
    repeat
    i := i+1;
    Radialwalk(Broad[i],270,360,60,2,2);
    wait(2000);
    until(i = 6);
    
    WriteLn('Second Section .. walking');
    RunTo('w', True);
    wait(2000);
    //first rad walk
    i := 0;
    WriteLn('Third Section Walking');
    repeat
    i := i+1;
    Radialwalk(Broad[i],250,290,55,2,2);
    wait(2000);
    until(i = 6);
    
    
    
    
    
    
    if(FindSymbol(x,y,'Cookery shop'))then
    begin
    WriteLn('Reached the Guild');
    end else
    begin
    Runto('w',false);
    end;
    //Radialwalk(8225671,0,180,30,2,2);
      wait(2000);
    //Reached The Guild
    WriteLn('Reached the Guild.. Trying to stand in front of the door');
    
    wait(1000);
    SendArrowSilentWait(1, 150);
    
      if(findcolorTolerance(x,y,4739454,568,74,692,146,20))then
    Mouse(x-25,y-10,0,0,true);
    
    wait(1000);
    
    Writeln('Hopefully standing in front of the door... Attempting to open the door');
    
    //opening door

  6. #6
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Where are you trying to autocolor? Remember that FindRoadColor is for common found roads, but for Varrock you use FindVarrockRoadColor, for Falador use FindFallyRoadColor and for Lumbridge use FindLumbyRoadColor. You can also look at AutoColoring.scar for more info. And if you want RadialWalk with tolerance you can use this:
    scar Code:
    function RadialWalkTol(TheColor, Tol: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    var
      tpa: TPointArray;
      i: Integer;
    begin
      Result := False;
      if RadialWalkEx(tpa, MMCX, MMCY, TheColor, Tol, StartRadial, EndRadial, Radius) then
        for i := 0 to High(tpa) do
          if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
          begin
            FFlag(10);
            Result := True;
            Break;
          end;
    end;
    It's just a modified version RadialWalk but with the parameter tolerance. And btw ACA is an autocoloring aid program, which I don't recommend you to use because you need to learn all the basic stuff first.


  7. #7
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    That's looking pretty awesome.. What excactly does it do.

    It looks like its calling Radialwalkex multiple times, until its true.. or otherwise end;

    ah... yeah, think i got it . Gotta try that tommorow.

    Good night : )

    EDIT: Oh... One more question :').
    What tolerance is required to get a true result for all those colors(see below)? Cause, those where some of the road colors i found... all from the same road. The Tolerance would need to find at least those .

    Broad[1] := 6256523;
    Broad[2] := 6058887;
    Broad[3] := 6389134;
    Broad[4] := 6124937;
    Broad[5] := 6059911;
    Broad[6] := 6125961;
    Broad[7] := 5927300;
    Last edited by caused; 06-07-2009 at 08:48 AM.

  8. #8
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try it out with "similarColors"

    SCAR Code:
    if SimilarColors( color1, Color2, Tolerance) then
      Writeln('The Tolerance Worked') else
      Writeln('The Tolerance was too low!');

    Btw, if you want to get into autocoloring in a more advanced way, feel free to check out the tut in my signature... it's quite "advanced" for a "newcomer", but since you seem to be a very talented "newcomer", you may want to check it out.
    There is nothing right in my left brain and there is nothing left in my right brain.

  9. #9
    Join Date
    Nov 2007
    Location
    Chile
    Posts
    1,901
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    scar Code:
    RGB Information:
    Min Values: |R:132|G:113|B:90
    Max Values: |R:142|G:125|B:97
    Mid Values: |R:137|G:107|B:93
    RGB Mid Color: 6125449
    RGB Tolerance: 12

    HSL Information:
    Min Values: |H:8,91472697257996|S:18,8034206628799|L:43,5294151306152
    Max Values: |H:10,6060586869717|S:19,1304355859756|L:46,8627452850342
    Mid Values: |H:9,76039282977581|S:18,9669281244278|L:45,1960802078247
    HSL Mid Color: 6125449
    Smod/HMod: 0,0981045704885201 / 0,507399998211859
    HSL Tolerance: 19

    XYZ Information:
    Min Values: |X:17,266310158764|Y:17,453973295283|Z:12,1317807821359
    Max Values: |X:20,6466131398862|Y:21,2810817136491|Z:14,32872685472
    Mid Values: |X:18,9564616493251|Y:19,3675275044661|Z:13,230253818428
    XYZ Mid Color: 6190985
    XYZ Tolerance: 7
    Sensitivity: ?
    RGB tolerance is 12, but that's too low for MM colors. Use between 20-25. Good Luck


  10. #10
    Join Date
    May 2009
    Posts
    799
    Mentioned
    2 Post(s)
    Quoted
    16 Post(s)

    Default

    function RadialWalkTol(TheColor, Tol: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;
    var
    tpa: TPointArray;
    i: Integer;
    begin
    Result := False;
    if RadialWalkEx(tpa, MMCX, MMCY, TheColor, Tol, StartRadial, EndRadial, Radius) then
    for i := 0 to High(tpa) do
    if MFNF(tpa[i].x, tpa[i].y, Xmod, Ymod) then
    begin
    FFlag(10);
    Result := True;
    Break;
    end;
    end;
    That function IS genius .. Why isnt it included in SRL yet?

    Everything works soo great now =).

    I guess i gotta release that script soon... Need to clean it up though :x.. It gathers stuff.. and so makes some rsgp.. Dunno how much per hour xD... Not that much though =)...

    Anyways Thanks everyone for your help.

    Pure: I definately gonna check out your tutorial.. Autocoloring seems to be quite essential to write stable scripts for runescape

    ~caused

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
  •