Page 1 of 2 12 LastLast
Results 1 to 25 of 28

Thread: Grim's GnomeAgility

  1. #1
    Join Date
    Nov 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default Grim's GnomeAgility

    This is my first script written with no previous scripting knowledge, so please be gentle with me! I wanted to create something that is not overly done such as Mining, Chopping etc so decided to try script the Gnome Agility Course. I would greatly appreciate any feedback/help with this, I'm trying to learn and become better.

    It's an easy way to get level 1-35+ Agility on members accounts without doing all the repetitive clicking.
    Current script works on my 24th Dec update. I'm pretty much done testing this for now as it's in a working state, although not perfect. Please post feedback and i'll try to keep updating it after christmas/new year.

    Simba Code:
    ********************************************
                Grims Gnome Agility
    ********************************************
    Script Ran For: 29 Minutes and 42 Seconds
    ********************************************

    NOTE: It is advised to babysit if you're going to use this at the moment.

    Updated v1.3:
    Re-written procedures with TPA's to make them more reliable, this is now running pretty smoothly (currently watching it run for 30 minutes plus)
    Multiple color/search/random timing tweaks to make it better, may still need a little tweaking![/U])

    Update log:
    Antiban, Antirandom [added]
    Failsafes [added, possibly needs more?]
    Progress Report [added]
    Declare Players [added]
    TPA's [added]
    Suggestions/help please!

    Enjoy!

    Simba Code:
    program GrimsGnomeAgility;
    {$I SRL/SRL/misc/smart.scar}
    {$I SRL/SRL.scar}

    //Start the script standing within a few squares of Balancing log
    //Quiet world and minimal lag is best for this to work

    var
    x, y, i, Time, StartTime:Integer;
    LoopBegin:Integer;ClickRed : Boolean;
    MyTPA : TPointArray;
    MyPoint : TPoint;

    Const
     NumbOfPlayers= 1;
     StartPlayer=   0;
     Version=       '1.3';

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

      Players[0].Name := 'name here';
      Players[0].Pass := 'pass here';
      Players[0].Active := True;
    end;

    procedure SetupLogin;
    begin
      ClearDebug;
      Smart_Server := 10;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;

    procedure ProgressReport;
    begin
      ClearDebug;
      WriteLn('********************************************');
      WriteLn('            Grims Gnome Agility');
      WriteLn('********************************************');
      WriteLn('Script Ran For: ' + TimeRunning);
      WriteLn('********************************************');
    end;

    procedure AntiBan;
    begin
      case random(250) of //Increase number for less AntiBans
          0: RandomRClick;
          1: PickUpMouse;
          2: HoverSkill('strength', False);
          3: HoverSkill('attack', False);
          4: HoverSkill('agility', False);
          5: HoverSkill('thieving', False);
          6: HoverSkill('constitution', False);
          7: HoverSkill('mining', False);
          8: ExamineInv;
      end;
    end;

    procedure AntiRandoms;
    begin
      FindNormalRandoms;
    end;


    function RopeColor: 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.02, 0.12);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 5140878, MSX1, MSY1, MSX2, MSY2, 9);
      if (Length(arP) = 0) 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
        ColorToRGB(arC[i], R, G, B);

        if (R >= 115) and (R <= 169) and (G >= 91) and (G <= 135) and (B >= 63) and (B <= 94) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 11.94) and (X <= 26.67) and (Y >= 11.72) and (Y <= 26.19) and (Z >= 6.47) and (Z <= 14.02) then
          begin
            Result := arC[i];
            Break;
          end;
        end;
      end;

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

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

    Procedure Log;
    Begin
      SetAngle(True);
      MarkTime(LoopBegin);
        begin
          FindColorsTolerance(MyTPA, 999018, 150, 129, 363, 272, 10);
          for i := 0 to High(MyTPA)do
          begin
            MyPoint := MyTPA[i]
            MMouse (MyPoint.x, MyPoint.y, 5, 5);
              begin
                GetMousePos(x, y);
                Mouse(x, y, 0, 0, True);
                ClickRed := DidRedClick;
                if ClickRed then
                Wait(6500+Random(500));
                WriteLn('Log done..');
                Break;
              end;
           end;
         end;
    End;

    Procedure Net;
    Begin
      FindColorsTolerance(MyTPA, 1064812, 118, 312, 158, 336, 10);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 5, 5);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                  Wait(4500+Random(500));
                  WriteLn('Net done..');
                  Break;
              end;
          end;
    End;

    Procedure BranchUp;
    Begin
      FindColorsTolerance(MyTPA, 2051430, 326, 180, 351, 207, 7);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 2, 2);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                  Wait(4000+Random(500));
                  WriteLn('Branch up done..');
                  Break;
              end;
         end;
    End;

    Procedure Rope;
    Begin
      Mouse(456,157,10,10, true);
      wait(2000 + random(500));
        begin
          FindColorsTolerance(MyTPA, 5733788, 283, 165, 307, 190, 10);
          for i := 0 to High(MyTPA)do
            begin
              MyPoint := MyTPA[i]
              MMouse (MyPoint.x, MyPoint.y, 0, 0);
                begin
                  GetMousePos(x, y);
                  Mouse(x, y, 0, 0, True);
                  ClickRed := DidRedClick;
                    if ClickRed then
                    Wait(6000+Random(500));
                    WriteLn('Rope walk done..');
                    Break;
              end;
           end;
          end;
    End;

    Procedure BranchDown;
    Begin
      FindColorsTolerance(MyTPA, 1919327, 359, 202, 384, 221, 10);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 5, 5);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                  Wait(5500+Random(500));
                  WriteLn('Branch down done..');
                  Break;
              end;
           end;
    End;

    Procedure Net2;
    Begin
      SetAngle(False);
      Wait(1500+Random(250));
        begin
          FindColorsTolerance(MyTPA, 932969, 277, 6, 307, 35, 10);
          for i := 0 to High(MyTPA)do
            begin
              MyPoint := MyTPA[i]
              MMouse (MyPoint.x, MyPoint.y, 3, 3);
                begin
                  GetMousePos(x, y);
                  Mouse(x, y, 0, 0, False);
                  ChooseOption('net');
                  ClickRed := DidRedClick;
                    if ClickRed then
                    Wait(5000+Random(500));
                    WriteLn('Net2 done..');
                    Break;
              end;
           end;
          end;
    End;

    Procedure Pipe;
    Begin
      FindColorsTolerance(MyTPA, 7763579, 235, 64, 286, 96, 10);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 5, 5);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                Wait(6000+Random(500));
                WriteLn('Pipe done..');
                Break;
            end;
        end;
    End;

    Procedure WalkToStart;
    Begin
      FindNormalRandoms;
      Mouse(576, 93, 2, 2, True);
      SetAngle(True);
      Wait(4000+Random(500));
      WriteLn('Walk to start done.. Yay!');
    End;


    Begin
      SetupLogin;
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      StartTime:= GetSystemTime;
      Time := (GetSystemTime-StartTime);
      repeat
        MarkTime(LoopBegin);
        Log;
        Net;
        BranchUp;
        Rope;
        BranchDown;
        Net2;
        Pipe;
        WalkToStart;
        ProgressReport;
        if TimeFromMark(LoopBegin) > 90000 then
        TerminateScript;
      until(false);
    End.
    Last edited by Grimtoker; 12-25-2011 at 02:24 AM.

  2. #2
    Join Date
    Dec 2011
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nice^^
    I'll try it later and let you know what happened

  3. #3
    Join Date
    Nov 2011
    Posts
    59
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    will test soon!

  4. #4
    Join Date
    Jul 2010
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    will test soon!

  5. #5
    Join Date
    Oct 2011
    Location
    Canada
    Posts
    192
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hmm, you based yours off finding objects instead of colors like mine, wish I knew about that before! Haha.

    Also, before you Mouse(x, y, 5, 5, True); I'm pretty sure you should have MMouse(x,y,5,5);
    So it would look like this

    MMouse(x,y,5,5);
    Mouse(x, y, 5, 5, True);

    Doing that makes your mouse appear more human than without. Unless GetMousePos(x, y); makes it look human? I don't know, I've never tried...

    You should possibly add your "waits" in your individual procedures instead of the main begin/end. It would be easier to read.

    Here is a link to my gnome agility. It is currently down because it isn't working the way I want it to but I think I know the problem.
    http://villavu.com/forum/showthread.php?t=68861
    Not to be a thread jack but here is how I did mine (Script doesn't work fully anyway)
    Simba Code:
    program Uz3sGnomeAgility;
    {$include srl/srl/misc/smart.scar}
    {$include srl/srl.scar}

    var
      x,y,lap,laps,exp,Tempx,Tempy: integer;


      procedure TotalExp;
    begin
      laps:= lap + 1;
      laps:= lap - 1;
      exp:= lap * 86;
    end;

     procedure ProgressReport;
    begin
      ClearDebug;
      WriteLn('--------------------------------------');
      WriteLn('      Uz3s Gnome Agility v1.2.2');
      WriteLn('--------------------------------------');
      WriteLn('Script Ran For: ' + TimeRunning);
      WriteLn('Laps: ' + IntToStr(laps));
      WriteLn('Experience gained...'+ IntToStr(exp));
      WriteLn('Multiply laps by .5 and add it to experience gained for real exp');
      WriteLn('--------------------------------------');
    end;

    procedure AntiBan;
    begin
      case random(300) of //do a random number so it won't always perform the antiban
          0: RandomRClick;
          1: PickUpMouse;
          2: RandomRClick;
          3: HoverSkill('agility', False);
          4: ExamineInv;
      end;
    end; //Antiban

    procedure AntiRandoms;
    begin
      FindNormalRandoms; // Whenever this is called, the script will check to see if your character is in a random event
      LampSkill := 'agility'; // If you set the script to choose an experience lamp from a random event box, it will use the exp on the woddcutting skill
      LevelUp; // This is an Antiban procedure, but I find it more useful when called here because AntiRandoms is usually called more often than Antiban
    end; //antirandoms

    procedure LogBalance;
    begin
      MakeCompass('N');
      repeat
        wait(500 + random(100));
        if (FindColorSpiralTolerance(x,y,732235, 182, 212, 360, 271, 3))
          then
            MMouse(x,y,3,5);
      until (IsUpText('Log'));
      begin
        WriteLn('Walking across log balance!');
        if (IsUpText('Log'))
          then
            Mouse(x,y,3,5, true);
            if (FindColorSpiralTolerance(x,y,65278, msx1, msy1, msx2, msy2, 1)) // begin misclick failsafe (What I did here is it checks for when you don't click any object in particular so it gives you a yellow 'X' where you clicked. If I clicked on an object, it would be red)
              then
                repeat
                  WriteLn('Misclick, readjusting!');
                  wait(500 + random(100));
                  if (FindColorSpiralTolerance(x,y,998761, msx1, msy1, msx2, msy2, 5))
                    then
                      MMouse(x,y,5,5);
                      if (IsUpText('Log'))
                        then
                          Mouse(x,y,5,5, true);
                until (IsUpText('Log')); // end misclick failsafe
            wait(25 + random(50));
            MakeCompass('S');
            wait(1000 + random (255));
            AntiRandoms;
            AntiBan;
            wait(3500+random(50));
      end;
    end;//Logbalance

    procedure ObstacleNet1;
    begin
      repeat
      wait(100 + random(50));
        if (FindColorSpiralTolerance(x,y,2043192, 245, 37, 313, 50, 10))
          then
            MMouse(x,y,5,5);
      until (IsUpText('net'));
      begin
        WriteLn('Climbing up obstacle net!');
        if (IsUpText('net'))
          then
            Mouse(x,y,5,5, true);
            MakeCompass('E');
            wait(1000 + random (255));
            MakeCompass('E');
            AntiRandoms;
            AntiBan;
            wait(2500+random(100));
      end;
    end; //Obstacle Net

    procedure ClimbBranchUp;
    begin
      repeat
      wait(100 + random(50));
        if (FindColorSpiralTolerance(x,y,1323328, 301, 140, 338, 290, 3))
          then
            MMouse(x,y,10,10);
      until (IsUpText('branch'));
      begin
        WriteLn('Climbing up tree branch!');
        if (IsUpText('branch'))
          then
            Mouse(x,y,5,5, true);
            wait(500 + random (255));
            MMouse(543,25,5,5);
            Mouse(543,25,5,5, true);
            AntiRandoms;
            AntiBan;
            wait(1500+random(100));
      end;
    end; // climb branch up

    procedure BalancingRope;
    begin
        wait(100 + random(10));
        if (FindColorSpiralTolerance(x,y,1255991, 495, 191, 511, 195, 3))
          then
            MMouse(x,y,5,3);
            Mouse(x,y,5,3, true);
      repeat
        wait(3000 + random(100));
        MMouse(304,196,10,1);
      until (IsUpText('rope'));
      begin
        if (IsUpText('rope'))
          then
              repeat
                wait(100 + random (50));
                Mouse(304,196,5,0, true);
              until(FindBlackChatMessage('carefully'));
        WriteLn('Walking across rope!');
            wait(500 + random (255));
      end;
      AntiRandoms;
      AntiBan;

    end; //obstacle rope

    procedure ClimbBranchDown;
    begin
     repeat
        wait(500 + random(100));
        if (FindColorSpiralTolerance(x,y,2183786, 472, 192, 504, 208, 3))
          then
            MMouse(x,y,5,5);
      until (IsUpText('branch'));
      begin
        WriteLn('Walking across log balance!');
        if (IsUpText('branch'))
          then
            Mouse(x,y,5,5, true);
            AntiRandoms;
            AntiBan;
            wait(2500+random(100));
      end;
    end;

    procedure ObstacleNet2;
    begin
      repeat
      wait(100 + random(50));
        if (FindColorSpiralTolerance(x,y,2636103, 193, 26, 220, 40, 5))
          then
            MMouse(x,y,5,5);
      until (IsUpText('net'));
      begin
        WriteLn('Climbing up obstacle net!');
        if (IsUpText('net'))
          then
            Mouse(x,y,15,5, true);
            wait(1000 + random (255));
            AntiRandoms;
            AntiBan;
            wait(5000+random(100));
      end;
    end; //Obstacle Net 2

    procedure ObstaclePipe;
    begin
      repeat
        if (FindColorSpiralTolerance(x,y,855309, 126, 72, 178, 108, 5))
          then
            MMouse(x,y,5,5);
      until (IsUpText('pipe'));
      begin
        WriteLn('Climbing in obstacle pipe!');
        if (IsUpText('pipe'))
          then
            Mouse(x,y,10,5, true);
      end;
            begin
              wait(500);
              if (FindBlackChatMessage('is being used'))
                then
                  WriteLn('Pipe in use, waiting!');
                  wait(1000 + random (100));
                  MMouse(256,132,15,15);
                  Mouse(x,y,5,5, true);
            end;

            wait(1500 + random (255));
            lap:= lap + 1;
            AntiRandoms;
            AntiBan;
            wait(4500+random(100));
            MMouse(589,89,5,5);
            Mouse(589,89,5,5, true);
    end;

    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1; // This is set to the total amount of players,  for now, just keep it set as 1
      NumberOfPlayers(HowManyPlayers); // Don't touch
      CurrentPlayer := 0; // This is the player to start with; the first player will always be 0

      Players[0].Name := ''; // Username
      Players[0].Pass := ''; // Password
      Players[0].Active := True; // Set to true if you want to use Player 0
      Players[0].Pin := ''; // Leave blank if the player doesn't have a bank pin
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
    end;// declare players

    procedure SetupLogin;
    begin
      ClearDebug;
      // Setting up SMART;
      Smart_Server := 123;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer; //  Logging in...
    end; // setup login

    begin //main function
      SetupLogin;
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      repeat
        LogBalance;
        ObstacleNet1;
        ClimbBranchUp;
        BalancingRope;
        ClimbBranchDown;
        ObstacleNet2;
        ObstaclePipe;
        TotalExp
        ProgressReport;
      until(false)
    end.//main function

    Best of luck to you sir!
    Last edited by uz3; 12-21-2011 at 02:24 PM.

  6. #6
    Join Date
    Nov 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Thank you very much for sharing your code with me uz3, I was eager to see it but noticed it was not currently in your thread. Will play with it shortly and hopefully smooth out some flaws in my script with the help of yours.

    Would be cool to chat and see how we can improve. PM or MSN me

  7. #7
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Try to think about fail safes, here:
    Simba Code:
    Procedure Pipe;
    Var
      x, y, LoopBegin:Integer;

    Begin
      MarkTime(LoopBegin);
        Repeat
          FindObjEx(x, y, ['bstacle', 'ipe'], [7763579, 6645098, 8684938], 5, 50, 235, 64, 286, 96)
          GetMousePos(x, y);
          Mouse(x, y, 5, 5, True);
        until (TimeFromMark(LoopBegin) > 250);
    End;
    You are going to spam click very quickly at lots of different locations on the Pipe for 0.25 seconds, if it can't find the pipe then it is stuck and if it does it is going to look very bot like, you then move onto the next procedure without checking if it succeeded, look into ObjectDTMs for checking location, if there is an ncp standing at the end of an obstacle that is wearing weirdly coloured clothes then maybe check for those colours.



    Try using:
    Simba Code:
    function DidRedClick: boolean;

    for example:

    Simba Code:
    Procedure Pipe;
    Var
      x, y, LoopBegin:Integer;
     ClickRed : Boolean;

    Begin
      MarkTime(LoopBegin);
        Repeat
          FindObjEx(x, y, ['bstacle', 'ipe'], [7763579, 6645098, 8684938], 5, 50, 235, 64, 286, 96)
          GetMousePos(x, y);
          Mouse(x, y, 5, 5, True);
          ClickRed := DidRedClick;
          Wait(200+Random(100));
        until ((TimeFromMark(LoopBegin) > 250) or ClickRed);
    End;
    This will make it stop after it finds that it clicks red
    Last edited by putonajonny; 12-21-2011 at 04:59 PM.

  8. #8
    Join Date
    Nov 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by putonajonny View Post
    Try to think about fail safes, here:
    Simba Code:
    Procedure Pipe;
    Var
      x, y, LoopBegin:Integer;

    Begin
      MarkTime(LoopBegin);
        Repeat
          FindObjEx(x, y, ['bstacle', 'ipe'], [7763579, 6645098, 8684938], 5, 50, 235, 64, 286, 96)
          GetMousePos(x, y);
          Mouse(x, y, 5, 5, True);
        until (TimeFromMark(LoopBegin) > 250);
    End;
    You are going to spam click very quickly at lots of different locations on the Pipe for 0.25 seconds, if it can't find the pipe then it is stuck and if it does it is going to look very bot like, you then move onto the next procedure without checking if it succeeded, look into ObjectDTMs for checking location, if there is an ncp standing at the end of an obstacle that is wearing weirdly coloured clothes then maybe check for those colours.
    Thanks for the feedback and I fully understand the problem you're pointing out, I will look into ObjectDTM's. At the moment it does not spam click because the loop is so small, definitely needs a failsafe or different approach though. I just highered the loop time when it was having difficulty finding the objects (so it would attempt more than once). Is there a better way for it to search multiple times?

  9. #9
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Grimtoker View Post
    Thanks for the feedback and I fully understand the problem you're pointing out, I will look into ObjectDTM's. At the moment it does not spam click because the loop is so small, definitely needs a failsafe or different approach though. I just highered the loop time when it was having difficulty finding the objects (so it would attempt more than once). Is there a better way for it to search multiple times?

    btw have a look at my edit

  10. #10
    Join Date
    Nov 2011
    Location
    In a house
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If I can grab sometime tonight I will test this, for future reference could you lose the gap between procedures, for example:

    Simba Code:
    Procedure WalkToStart;

    Begin
      MoveMouse(579, 90);
      Mouse(576, 93, 1, 1, True);
    End;

    Becomes...
    Simba Code:
    Procedure WalkToStart;
    Begin
      MoveMouse(579, 90);
      Mouse(576, 93, 1, 1, True);
    End;

    As it makes the script that tad bit more easier to read, but otherwise a very nice first script keep up the good work!

  11. #11
    Join Date
    Nov 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    New updated script thanks to the help of people posting above, updated the code in my OP. I think this new edit is much more reliable than it's beginning state now

    One problem I'm having is that it's struggling to find the Rope, since it needs a very accurate click on a very small area. Any help here would be greatly appreciated. Although it does work.
    Last edited by Grimtoker; 12-22-2011 at 03:40 AM.

  12. #12
    Join Date
    Nov 2011
    Posts
    59
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did a few runs, then just starts clicking off randomly..*sigh*
    Last edited by Im auz; 12-22-2011 at 01:16 PM.

  13. #13
    Join Date
    Nov 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Ok! Updated my OP main code again. Script is working well enough now.

    Simba Code:
    ********************************************
                Grims Gnome Agility
    ********************************************
    Script Ran For: 29 Minutes and 42 Seconds
    ********************************************

    It's still not perfect but it gets the job done. I'll probably start working on a Barbarian Course next for level 35+ Agility. Although I will try to update this one too as my scripting knowledge grows!

    Please post feedback or suggestions and let me know how this new script goes for you

  14. #14
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Hey mister
    I found it got to the second net, clicked on the very top, and then decided to run awawy. dany know whats up w/ dat

  15. #15
    Join Date
    Nov 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Dexx View Post
    Hey mister
    I found it got to the second net, clicked on the very top, and then decided to run awawy. dany know whats up w/ dat
    Hey sorry for the inconvenience. I noticed this happened to me too when I was playing around with lowering the timings on the procedures to speed the laps up. I have now increased the wait times around that procedure in the main code, try again and hopefully that will fix it. Remember to use a world with little lag

  16. #16
    Join Date
    Dec 2011
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Grimtoker View Post
    Hey sorry for the inconvenience. I noticed this happened to me too when I was playing around with lowering the timings on the procedures to speed the laps up. I have now increased the wait times around that procedure in the main code, try again and hopefully that will fix it. Remember to use a world with little lag
    oh kay thanks mister

  17. #17
    Join Date
    Dec 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I cannot see the download link?
    Or i'm just blind?

  18. #18
    Join Date
    Nov 2009
    Posts
    48
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Pro v Pker View Post
    I cannot see the download link?
    Or i'm just blind?
    There is no download link Cope/paste the code in the original post into your Simba and save/run.

  19. #19
    Join Date
    Dec 2011
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Awesome, thanks. Good luck with making more scripts.

  20. #20
    Join Date
    Nov 2011
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    little suggestion, make a adv option in setup like this kinda thing
    Simba Code:
    begin
        Name        := '';     //Player username.
        Pass        := '';     //Player password.
        Active      := ;
        Integers[1] := 2;   //1 for basic 2 for adv
      end;

    and then have
    Simba Code:
    If Players[CurrentPlayer].Integers[1]= 1 Then
     
    your script here

      end;


    and have

    Simba Code:
    If Players[CurrentPlayer].Integers[1]= 2 Then

    advanced script here

      end;





    i will be more than happy to get you the colours for advanced obsticles plus names for them, if you wish that is.




    if you need anything just let me know through pm
    Last edited by d34th20n; 12-26-2011 at 08:52 PM.

  21. #21
    Join Date
    Dec 2011
    Posts
    124
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Little late for the party, but here's my Proggy (I added in laps and xp)

    Code:
    ********************************************
                Grims Gnome Agility
    ********************************************
    Script Ran For: 16 Minutes and 57 Seconds
    Laps Made: 11
    XP Gained: 946
    ********************************************
    It messes up quite often when running to the start point. It would just click random places outside of the agility course, looking for the log, and even when not finding it, would output "Log done"

    I ran it a few times, and averaged out at about 1 lap per minute. Longest it's gone for was 40minutes or so.

  22. #22
    Join Date
    Nov 2011
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Could you add option to choose between easier and harder pipe obstacle?

  23. #23
    Join Date
    Nov 2011
    Location
    In your bed ;)
    Posts
    123
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    barb agility would be beast!

  24. #24
    Join Date
    Dec 2011
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It misclick after it crossed the robe and does not click on the tree to go down. I updated your script to SRL5 but search for "setangle" and i replaced the false with "set_angle_none" Maybe that is causing it?

    Simba Code:
    program GrimsGnomeAgility;
    {$I SRL/SRL/misc/smart.simba}
    {$I SRL/SRL.simba}

    //Start the script standing within a few squares of Balancing log
    //Quiet world and minimal lag is best for this to work

    var
    x, y, i, Time, StartTime:Integer;
    LoopBegin:Integer;ClickRed : Boolean;
    MyTPA : TPointArray;
    MyPoint : TPoint;

    Const
     NumbOfPlayers= 1;
     StartPlayer=   0;
     Version=       '1.3';

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

      Players[0].Name := 'name here';
      Players[0].Pass := 'pass here';
      Players[0].Active := True;
    end;

    procedure SetupLogin;
    begin
      ClearDebug;
      Smart_Server := 10;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;

    procedure ProgressReport;
    begin
      ClearDebug;
      WriteLn('********************************************');
      WriteLn('            Grims Gnome Agility');
      WriteLn('********************************************');
      WriteLn('Script Ran For: ' + TimeRunning);
      WriteLn('********************************************');
    end;

    procedure AntiBan;
    begin
      case random(250) of //Increase number for less AntiBans
          0: RandomRClick;
          1: PickUpMouse;
          2: HoverSkill('strength', False);
          3: HoverSkill('attack', False);
          4: HoverSkill('agility', False);
          5: HoverSkill('thieving', False);
          6: HoverSkill('constitution', False);
          7: HoverSkill('mining', False);
          8: ExamineInv;
      end;
    end;

    procedure AntiRandoms;
    begin
      FindNormalRandoms;
    end;


    function RopeColor: 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.02, 0.12);

      FindColorsSpiralTolerance(MSCX, MSCY, arP, 5140878, MSX1, MSY1, MSX2, MSY2, 9);
      if (Length(arP) = 0) 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
        ColorToRGB(arC[i], R, G, B);

        if (R >= 115) and (R <= 169) and (G >= 91) and (G <= 135) and (B >= 63) and (B <= 94) then
        begin
          ColorToXYZ(arC[i], X, Y, Z);

          if (X >= 11.94) and (X <= 26.67) and (Y >= 11.72) and (Y <= 26.19) and (Z >= 6.47) and (Z <= 14.02) then
          begin
            Result := arC[i];
            Break;
          end;
        end;
      end;

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

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

    Procedure Log;
    Begin
      SetAngle(SRL_ANGLE_HIGH);
      MarkTime(LoopBegin);
        begin
          FindColorsTolerance(MyTPA, 999018, 150, 129, 363, 272, 10);
          for i := 0 to High(MyTPA)do
          begin
            MyPoint := MyTPA[i]
            MMouse (MyPoint.x, MyPoint.y, 5, 5);
              begin
                GetMousePos(x, y);
                Mouse(x, y, 0, 0, True);
                ClickRed := DidRedClick;
                if ClickRed then
                Wait(6500+Random(500));
                WriteLn('Log done..');
                Break;
              end;
           end;
         end;
    End;

    Procedure Net;
    Begin
      FindColorsTolerance(MyTPA, 1064812, 118, 312, 158, 336, 10);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 5, 5);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                  Wait(4500+Random(500));
                  WriteLn('Net done..');
                  Break;
              end;
          end;
    End;

    Procedure BranchUp;
    Begin
      FindColorsTolerance(MyTPA, 2051430, 326, 180, 351, 207, 7);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 2, 2);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                  Wait(4000+Random(500));
                  WriteLn('Branch up done..');
                  Break;
              end;
         end;
    End;

    Procedure Rope;
    Begin
      Mouse(456,157,10,10, true);
      wait(2000 + random(500));
        begin
          FindColorsTolerance(MyTPA, 5733788, 283, 165, 307, 190, 10);
          for i := 0 to High(MyTPA)do
            begin
              MyPoint := MyTPA[i]
              MMouse (MyPoint.x, MyPoint.y, 0, 0);
                begin
                  GetMousePos(x, y);
                  Mouse(x, y, 0, 0, True);
                  ClickRed := DidRedClick;
                    if ClickRed then
                    Wait(6000+Random(500));
                    WriteLn('Rope walk done..');
                    Break;
              end;
           end;
          end;
    End;

    Procedure BranchDown;
    Begin
      FindColorsTolerance(MyTPA, 1919327, 359, 202, 384, 221, 10);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 5, 5);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                  Wait(5500+Random(500));
                  WriteLn('Branch down done..');
                  Break;
              end;
           end;
    End;

    Procedure Net2;
    Begin
      SetAngle(SRL_ANGLE_NONE);
      Wait(1500+Random(250));
        begin
          FindColorsTolerance(MyTPA, 932969, 277, 6, 307, 35, 10);
          for i := 0 to High(MyTPA)do
            begin
              MyPoint := MyTPA[i]
              MMouse (MyPoint.x, MyPoint.y, 3, 3);
                begin
                  GetMousePos(x, y);
                  Mouse(x, y, 0, 0, False);
                  ChooseOption('net');
                  ClickRed := DidRedClick;
                    if ClickRed then
                    Wait(5000+Random(500));
                    WriteLn('Net2 done..');
                    Break;
              end;
           end;
          end;
    End;

    Procedure Pipe;
    Begin
      FindColorsTolerance(MyTPA, 7763579, 235, 64, 286, 96, 10);
      for i := 0 to High(MyTPA)do
        begin
          MyPoint := MyTPA[i]
          MMouse (MyPoint.x, MyPoint.y, 5, 5);
            begin
              GetMousePos(x, y);
              Mouse(x, y, 0, 0, True);
              ClickRed := DidRedClick;
                if ClickRed then
                Wait(6000+Random(500));
                WriteLn('Pipe done..');
                Break;
            end;
        end;
    End;

    Procedure WalkToStart;
    Begin
      FindNormalRandoms;
      Mouse(576, 93, 2, 2, True);
      SetAngle(SRL_ANGLE_HIGH);
      Wait(4000+Random(500));
      WriteLn('Walk to start done.. Yay!');
    End;


    Begin
      SetupLogin;
      SetupSRL;
      DeclarePlayers;
      ActivateClient;
      StartTime:= GetSystemTime;
      Time := (GetSystemTime-StartTime);
      repeat
        MarkTime(LoopBegin);
        Log;
        Net;
        BranchUp;
        Rope;
        BranchDown;
        Net2;
        Pipe;
        WalkToStart;
        ProgressReport;
        if TimeFromMark(LoopBegin) > 90000 then
        TerminateScript;
      until(false);
    End.

  25. #25
    Join Date
    Jan 2012
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hhhzzzarn I love you right now Homo intended.

Page 1 of 2 12 LastLast

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
  •