Results 1 to 24 of 24

Thread: RadialWalking

  1. #1
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default RadialWalking

    Well, i'm trying RadialWalk in my script to walk down to the guthix portal area in Soul Wars and it isn't working. I think the auto color might not be working. I also tried color finding and it didn't work:
    SCAR Code:
    procedure BankItems;
    begin
      WalkToChest;
      FFlag(random(10));
      if OpenBankChest then
      begin
        wait(5000+random(5000));
        if BankScreen then
        begin
          DepositAll;
          CloseWindow;
          wait(1000+random(1000));
          if FindColorTolerance(x, y, FindWaterColor, MMX1, MMY1, MMX2, MMY2, 70) then Mouse(x, y, 5, 5, true);
        end;
      end else TerminateScript;
    end;
    I was thinking of making some sort of ddtm, but because autocolor seems to not be working, i don't know how to do so. Can anyone help me with this?

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    I don't see any Radial Walking?

    and also, if the auto coloring is failing the DDTM is probably not the best bet as all that is really is a DTM with autocoloring.

  3. #3
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    well, i changed it around before i posted it. I just have no clue how i can do this!

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    take a screen shot of the place your trying to click?

  5. #5
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

  6. #6
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Set start radial from about 180, then end rad. to 190 ish' and make ur autocolor or us aca, or try radialwalkex with the clr and some tol

    if u need anymore help add me on msn:
    wowplayermaster@hotmail.com
    Last edited by Smarter Child; 08-11-2009 at 03:20 AM.

  7. #7
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    You could easily make a DDTM of that crossing using the AutoRoadColors from AutoColor.scar
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  8. #8
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    You could easily make a DDTM of that crossing using the AutoRoadColors from AutoColor.scar
    If you fail to make a perfect ddtm in that area 0.o...
    ~Hermen

  9. #9
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by noidea View Post
    You could easily make a DDTM of that crossing using the AutoRoadColors from AutoColor.scar
    Good idea, i'll get onto it.

    Edit: Nevermind, i noticed that in a crowded area, ddtms don't work great.
    Edit: I'm guessing RadialWalk isn't working? I tried and it found the color, but never clicked it.
    Last edited by DeSnob; 08-11-2009 at 07:15 AM.

  10. #10
    Join Date
    Jan 2008
    Location
    NC, USA.
    Posts
    4,429
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    Good idea, i'll get onto it.

    Edit: Nevermind, i noticed that in a crowded area, ddtms don't work great.
    Edit: I'm guessing RadialWalk isn't working? I tried and it found the color, but never clicked it.
    RadialWalking is working fine for me.
    Hmm. Last night I was having trouble with some custom RW stuff, though I have forgotten the fix.
    Quote Originally Posted by irc
    [00:55:29] < Guest3097> I lol at how BenLand100 has become noidea
    [01:07:40] <@BenLand100> i'm not noidea i'm
    [01:07:44] -!- BenLand100 is now known as BenLand42-
    [01:07:46] <@BenLand42-> shit
    [01:07:49] -!- BenLand42- is now known as BenLand420
    [01:07:50] <@BenLand420> YEA

  11. #11
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by DeSnob View Post
    Good idea, i'll get onto it.

    Edit: Nevermind, i noticed that in a crowded area, ddtms don't work great.
    Edit: I'm guessing RadialWalk isn't working? I tried and it found the color, but never clicked it.
    As far as I know Radial Walking is working fine, post your procedure when the Radial Walking and we can see if the problem is in your code.

  12. #12
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program New;
    {.include SRL\SRL\Misc\Smart.scar}
    {.include srl/srl.scar}
    var
    x, y: integer;

    const
      LoadsToDo = 50;
      SmartWorld= 89;  //Smart World?
      SignedC= False;  //Use signed client?

    Procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      CurrentPlayer:= 0;
      NumberOfPlayers(HowManyPlayers);

      Players[0].Name:= '';
      Players[0].Pass:= '';
      Players[0].Nick:= '';
      Players[0].Active:= True;
    end;

    procedure FindNormalRandom;
    begin
      LampSkill := 'strength';
      if FindNormalRandoms then UseRewardBox;
      solvesrlrandoms:=true;
    end;

    procedure AntiBan;
    begin
      case random(8) of
      0: MouseBox(MSX1, MSY1, MSX2, MSY2,3);
      1: RandomMovement;
      2: RandomRClick;
      3: BoredHuman;
      4: PickUpMouse;
      5: SleepAndMoveMouse(50);
      6: HoverSkill('random', false);
      7: Exit;
      end;
    end;

    function OpenBankChest: boolean;
    begin
      MakeCompass('S');
      SetAngle(True);
      if  FindObjCustom(x, y, ['ank', 'hest'], [4676201, 8750479, 2634299], 10) then
      begin
        Mouse(x, y, 5, 5, true);
        Result := True;
      end else Exit;
    end;

    procedure WalkToChest;
    begin
      if FindSymbol(x, y, 'bank') then Mouse(x, y, 5, 5, True) else
      if FindSymbol(x, y, 'minigame') then
      begin
        MakeCompass('W');
        Fflag(random(10));
      end;
    end;

    function DetectedCape: boolean;
    begin
      if WearingItem(2) then
      begin
        TakeOff(2);
        Result := True;
      end else Result := False;
    end;

    function SWRoadColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      R, G, B: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.53, 0.17);

      FindColorsSpiralTolerance(MMCX, MMCY, arP, 6122868, MMX1, MMY1, MMX2, MMY2, 5);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the road color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToRGB(arC[i], R, G, B);

        if (R >= 102) and (R <= 131) and (G >= 96) and (G <= 123) and (B >= 81) and (B <= 104) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 11.37) and (X <= 18.39) and (Y >= 12.02) and (Y <= 19.41) and (Z >= 9.68) and (Z <= 15.58) then
          begin
            Result := arC[i];
            Writeln('RoadColor = ' + IntToStr(arC[i]));
            Break;
          end;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('Failed in finding the color.');
    end;

    procedure BankItems;
    begin
      WalkToChest;
      FFlag(random(10));
      if OpenBankChest then
      begin
        wait(5000+random(5000));
        if BankScreen then
        begin
          DepositAll;
          CloseWindow;
          wait(1000+random(1000));
          MakeCompass('N');
          RadialWalk(SWRoadColor, 180, 190, 65, -1, 0);
        end;
      end else TerminateScript;
    end;

    begin
      Smart_Server:= (SmartWorld);
      Smart_Members:= True;
      Smart_Signed:= (SignedC);
      Smart_SuperDetail:= false;
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LogInPlayer;
      Wait(10000+random(25000));
      repeat
        if (DetectedCape) then BankItems;
      until (True);
    end.
    Take a look, help me with anything you see and I'll be thankful.

  13. #13
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    You Antiban way too much, you should Antiban once every 10 times, so..

    SCAR Code:
    case Random(80) of

    Will do the trick.

    I don't see right now why it wouldn't click the Radial Walk other than maybe it doesn't find the cape because in your mainloop, it will only Bank the items if it finds the cape.

    I have to go, so sorry if that sounded rushed, I'll look closer at it later.

    I hope that helped a little.

    Cheers!
    Last edited by Coh3n; 08-11-2009 at 10:22 AM.

  14. #14
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks for the feedback
    And to be honest, i didn't understand why it didn't click either; which is why I'm asking here.

  15. #15
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Okay, taking a more thorough look, I have the following comments/suggestions.

    SCAR Code:
    function OpenBankChest: boolean;
    begin
      MakeCompass('S');
      SetAngle(True);
      if  FindObjCustom(x, y, ['ank', 'hest'], [4676201, 8750479, 2634299], 10) then
      begin
        Mouse(x, y, 5, 5, true);
        Result := True;
      end else Exit;
    end;

    You do not need to say "end else Exit" as there is no loop to exit out of. The commands "Exit, Continue, and Break" are used for loops, and since you don't have a loop in your function, there is no need. It will exit out of the procedure regardless.
    __________________________________________________ _________

    SCAR Code:
    function DetectedCape: boolean;
    begin
      if WearingItem(2) then
      begin
        TakeOff(2);
        Result := True;
      end else Result := False;
    end;

    Here, you don't have to say "end else Result := False" as, by default, the Boolean is set to false. So, if it doesn't take the cape off, it automatically sets Result to false.

    I would also suggest using a failsafe in your DetectedCape procedure. If it's the same cape, than using a DTM or Bitmap would work I think, and even if that fails, a FindColorsTolerance as a third failsafe.
    __________________________________________________ _______________

    Maybe think about adding in some Writeln's so if the script does terminate, you'll know why. For example, here is your banking procedure with some Writeln's:

    SCAR Code:
    procedure BankItems;
    begin
      WalkToChest;
      FFlag(Random(10));
      if OpenBankChest then
      begin
        Wait(5000+random(5000));
        if BankScreen then
        begin
          DepositAll;
          CloseWindow;
          wait(1000+random(1000));
          MakeCompass('N');
          if RadialWalk(SWRoadColor, 180, 190, 65, -1, 0) then
            Writeln('Walking to destination using Radial Walking!')
          else
            Writeln('Radial walking failed.');
        end else
          Writeln('Couldn''t find the bank screen.');
      end else
      begin
        Writeln('Couldn''t open the bank chest.');
        TerminateScript;
      end;
    end;

    You obviously don't have to do this, but I find it useful for debugging, and it also helps out the people using your script because it doesn't leave them asking the question "Why did the script stop? Sadface.". Know what I mean?

    Those Writeln's may also tell you why the Radial Walking wasn't working. The only thing I can think of is that it's not finding the Road Color. What I would do is, make a DDTM of the road, then use Radial Walking as a failsafe, and then Symbol finding as a second failsafe (if there is a usable symbol around, of course).
    __________________________________________________ _________

    I realize I didn't really answer your question because well, I don't exactly know why it's not clicking the road, other than maybe your color's wrong. You can do tests to see if it's actually finding the color, just break the procedures down bit by bit, and using Writeln's is a great, simple debugging tool.

    I hope I helped a little.

  16. #16
    Join Date
    Dec 2008
    Location
    Québec
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yess !! ill have some competition
    im making a soul war script too but im using relfection.

    if you want you can check my old (shitty) soulwar script all in color for help and/or idea.
    http://www.villavu.com/forum/showthread.php?t=44256

    Hermen:
    If you fail to make a perfect ddtm in that area 0.o...
    you can make a perfect ddtm in that area but it will still fail alot of time, this place have ALOT of people wich make white dot on minimap.


    well for answering u, i suggest rw will be your best option, if you dont find color its maybe in your autocolor you didnt add all posible color of the road.


    Good luck making it all in color.
    Last edited by Phran6; 08-11-2009 at 01:22 PM.

  17. #17
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by francishelie View Post
    Yess !! ill have some competition
    im making a soul war script too but im using relfection.

    if you want you can check my old (shitty) soulwar script all in color for help and/or idea.
    http://www.villavu.com/forum/showthread.php?t=44256

    Hermen:

    you can make a perfect ddtm in that area but it will still fail alot of time, this place have ALOT of people wich make white dot on minimap.


    well for answering u, i suggest rw will be your best option, if you dont find color its maybe in your autocolor you didnt add all posible color of the road.


    Good luck making it all in color.
    -.- Seriously never use roads to make a ddtm use places people can't walk!
    If you are using roads then use walkpath if you want me to make one tell me... where to walk exactly.
    ~Hermen

  18. #18
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Which SRL revision are you using? SRL Public or SRL OpenDev? Which Revision?
    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  19. #19
    Join Date
    Mar 2007
    Posts
    4,810
    Mentioned
    3 Post(s)
    Quoted
    3 Post(s)

    Default

    @Coh3n Exit isn't necessarily used only for loops..

    @Desnob try and raise the tolerance of the auto color, instead of 5 have 15 or such.

  20. #20
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    @Nauman Here's my debug:
    SCAR Code:
    SRL Compiled in 16 msec
    SMART Initialized.
    Loaded: Server 91, Members: True, Signed: False, Super Detail: False.
    ******
    Creating the NickTPA.
    RoadColor = 6386554
    Successfully executed
    As you can see, it finds the color, it jus doesn't click.

    @Dan The Man I have OpenDev SRL.

  21. #21
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by NaumanAkhlaQ View Post
    @Coh3n Exit isn't necessarily used only for loops..
    I should have said it's usually used for loops, and in his case, he didn't need it there, am I wrong?

  22. #22
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I found out that my autocolor works, but when i use findcolor to find it, it clicks the compass. Can anybody help me with making it searching within the minimap?
    SCAR Code:
    program New;
    {.include SRL\SRL\Misc\Smart.scar}
    {.include srl/srl.scar}
    var
    x, y: integer;

    const
      LoadsToDo = 50;
      SmartWorld= 91;  //Smart World?
      SignedC= False;  //Use signed client?

    Procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      CurrentPlayer:= 0;
      NumberOfPlayers(HowManyPlayers);

      Players[0].Name:= '';
      Players[0].Pass:= '';
      Players[0].Nick:= '';
      Players[0].Active:= True;
    end;

    procedure FindNormalRandom;
    begin
      LampSkill := 'strength';
      if FindNormalRandoms then UseRewardBox;
      solvesrlrandoms:=true;
    end;

    procedure AntiBan;
    begin
      case random(80) of
      0: MouseBox(MSX1, MSY1, MSX2, MSY2,3);
      1: RandomMovement;
      2: RandomRClick;
      3: BoredHuman;
      4: PickUpMouse;
      5: SleepAndMoveMouse(50);
      6: HoverSkill('random', false);
      7: Exit;
      end;
    end;

    function OpenBankChest: boolean;
    begin
      MakeCompass('S');
      SetAngle(True);
      if  FindObjCustom(x, y, ['ank', 'hest'], [4676201, 8750479, 2634299], 10) then
      begin
        Mouse(x, y, 5, 5, true);
        Result := True;
      end;
    end;

    procedure WalkToChest;
    begin
      if FindSymbol(x, y, 'bank') then Mouse(x, y, 5, 5, True) else
      if FindSymbol(x, y, 'minigame') then
      begin
        MakeCompass('W');
        Fflag(random(10));
      end;
    end;

    function DetectedCape: boolean;
    begin
      if WearingItem(2) then
      begin
        TakeOff(2);
        Result := True;
      end;
    end;

    function SWRoadColor: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
      R, G, B: Integer;
      X, Y, Z: Extended;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.53, 0.17);

      FindColorsSpiralTolerance(MMCX, MMCY, arP, 6122868, MMX1, MMY1, MMX2, MMY2, 5);
      if (Length(arP) = 0) then
      begin
        Writeln('Failed to find the road color, no result.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      arC := GetColors(arP);
      ClearSameIntegers(arC);
      arL := High(arC);

      for i := 0 to arL do
      begin
        ColorToRGB(arC[i], R, G, B);

        if (R >= 102) and (R <= 131) and (G >= 96) and (G <= 123) and (B >= 81) and (B <= 104) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 11.37) and (X <= 18.39) and (Y >= 12.02) and (Y <= 19.41) and (Z >= 9.68) and (Z <= 15.58) then
          begin
            Result := arC[i];
            Writeln('RoadColor = ' + IntToStr(arC[i]));
            Break;
          end;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
        Writeln('Failed in finding the color.');
    end;

    procedure BankItems;
    begin
      WalkToChest;
      FFlag(random(10));
      Writeln('We have arrived at the banking chest.');
      if OpenBankChest then
      begin
        Writeln('We found the bank chest!');
        wait(5000+random(5000));
        if BankScreen then
        begin
          Writeln('I think we just found the banking screen.');
          DepositAll;
          CloseWindow;
          wait(1000+random(1000));
          MakeCompass('N');
          if (FindColor(x, y, SWRoadColor, MMX1, MMY1, MMX2, MMY2)) then Mouse(x, y, 0, 0, True) else
          begin
            Writeln('We couldn''t walk back to the portal area, so we are terminating.');
            Wait(1000+random(500));
            LogOut;
            TerminateScript;
          end;
        end else
        begin
          Writeln('Something went Wrong! We couldn''t find the bankscreen!');
          TerminateScript;
        end;
      end else
      begin
        Writeln('We couldn''t open the bank chest.');
        TerminateScript;
      end;
    end;

    begin
      Smart_Server:= (SmartWorld);
      Smart_Members:= True;
      Smart_Signed:= (SignedC);
      Smart_SuperDetail:= false;
      SetupSRL;
      ActivateClient;
      DeclarePlayers;
      LogInPlayer;
      Wait(10000+random(25000));
      repeat
        if (DetectedCape) then BankItems;
      until (True);
    end.

  23. #23
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    You could try changing it too...
    SCAR Code:
    (FindColor(x, y, SWRoadColor, MMX1 + Random(2), MMY1 - Random(2), MMX2 - Random(2), MMY2 + Random(2)))

    That would just make the search box a bit smaller, but already it should only search within the minimap...

  24. #24
    Join Date
    Mar 2008
    Location
    Look behind you.
    Posts
    795
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Okay, thanks. Mind doing me one quick favor? I suck at dimensions, and when i tried it would click further then i expected it to. Mind getting me the dimensions of a box similar to this? Many thanks.

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
  •