Results 1 to 6 of 6

Thread: Hey, having a few problems with RadialWalking

  1. #1
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default Hey, having a few problems with RadialWalking

    Hey, in the progress of making a rock crab killer which collects charms which will be located here: http://i.imgur.com/g9up8.png I have looked up several Radial Walking tuts and have the following points (Start from the left dungeon icon)

    Code:
    1. RadialWalk(4148298, 308, 321, 50, 1, 1);
    2. RadialWalk(4410447, 274, 286, 63, 1, 1);
    3. RadialWalk(4673876, 254, 274, 39, 1, 1);

    I am just wondering how to implement this into a script (I have tried the methods the tuts demonstrate but they do not seem to work. I have completed the attacking, looting and fail-safes for the script (The reason needed for the walk is that the crabs become non aggressive after ~8mins so walking away and back will reset that.

    Cheers, Mxtrix it should be complete soon and will be released to the public

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Instead of just using colors like you are now.
    Use ACA to autocolor whatever color you wish, MM colors change A LOT.
    http://www.youtube.com/watch?v=98wVrr6GwyU

  3. #3
    Join Date
    Feb 2007
    Location
    Estonia.
    Posts
    1,938
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I suggest using RadialWalkTolerance.
    Code:
    if RadialWalkTolerance(9144715, 200, 260, 68, 0, 0, 30) then
      begin
        DoSomeThing;
      end
      else
      begin
        BackUpYourRWT;
      end;
    RadialWalkTolerance works really well.
    ~Eerik.

  4. #4
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    I have done that and edited that into the script however I am still getting an error relating to the walking (Thanks for your help btw :P) The script is below:

    program CRABS;
    {$i SRL/SRL.simba}
    {$DEFINE SMART}

    function STEP1: Integer;
    var
    arP: TPointArray;
    arC: TIntegerArray;
    tmpCTS, i, arL: Integer;
    begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.89, 1.37);

    if not (FindColorsTolerance(arP, 3555393, MMX1, MMY1, MMX2, MMY2, 3)) then
    begin
    Writeln('Failed to find the color, no result.');
    ColorToleranceSpeed(tmpCTS);
    SetColorSpeed2Modifiers(0.2, 0.2);
    Exit;
    end;
    end;

    function STEP2: Integer;
    var
    arP: TPointArray;
    arC: TIntegerArray;
    tmpCTS, i, arL: Integer;
    begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.00, 0.13);

    if not (FindColorsTolerance(arP, 4213580, MMX1, MMY1, MMX2, MMY2, 1)) then
    begin
    Writeln('Failed to find the 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
    Result := arC[i];
    Writeln('AutoColor = ' + IntToStr(arC[i]));
    Break;
    end;

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

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

    function STEP3: Integer;
    var
    arP: TPointArray;
    arC: TIntegerArray;
    tmpCTS, i, arL: Integer;
    begin
    tmpCTS := GetColorToleranceSpeed;
    ColorToleranceSpeed(2);
    SetColorSpeed2Modifiers(0.55, 0.21);

    if not (FindColorsTolerance(arP, 4805975, MMX1, MMY1, MMX2, MMY2, 2)) then
    begin
    Writeln('Failed to find the 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
    Result := arC[i];
    Writeln('AutoColor = ' + IntToStr(arC[i]));
    Break;
    end;

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

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

    procedure WalkToCrabs;
    begin
    Setrun(true); //this turns run on
    for i:- 1 to 3
    case RadialWalking of
    1: RadialWalkTolerance(STEP1, 308, 321, 50, 5, 5, 20);
    2: RadialWalkTolerance(STEP2, 274, 286, 63, 5, 5, 20);
    3: RadialWalkTolerance(STEP3, 254, 274, 39, 5, 5, 20);
    end;

    begin
    WalkToCrabs
    end.
    The error is as following: [Error] (100:7): Unknown identifier 'i' at line 99
    Compiling failed.

    BTW the code above is solely relating to walking to the crabs, I think I can make it do the opposite to walk away (The reason for this is to reset them)

    EDIT: Implemented the colour tolerance (Hopefully it helps :P)
    Last edited by mxtrix; 02-03-2012 at 11:35 AM.

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

    Default

    Don't forget to initialise the variable, I.

    Also, your for..loop should be an equals (=), not a minus (-).
    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 |

  6. #6
    Join Date
    Oct 2011
    Posts
    100
    Mentioned
    1 Post(s)
    Quoted
    25 Post(s)

    Default

    EDIT 3: Fixed most of it, now getting the error [Error] (109:5): Invalid number of parameters at line 108 Compiling failed. Here is the lastest version of the walking: http://pastebin.com/LuZqu4i8 . Hopefully now it is just something simple which is wrong

    Cheers, Mxtrix looking at it now to see if I can figure out what is wrong
    Last edited by mxtrix; 02-03-2012 at 01:01 PM.

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
  •