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

Thread: RyGuy's Advanced Gnome Agility

  1. #1
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default RyGuy's Advanced Gnome Agility

    MOVED TO AGILITY SCRIPTS SECTION, ANY NEW UPDATES WILL BE ONLY THERE
    Link: http://villavu.com/forum/showthread.php?t=72785





    RyGuy's Advanced Gnome Agility!

    STATUS: Working!!!

    About This Script.

    This is my first script. I know it has it's bugs that need to be worked out, but i thought i'd get an initial release out to see what you guys thought. EDIT: Not many bugs left, if you find any please post them!

    You can begin running the course at level 85 agility, however you have a chance at failing the signpost until level 89. There is no support for failing the signpost as i did not have an account with a low enough agility to test it. EDIT: However, the way i have it coded, the script may work with failing the signpost, just a bit slower. If you have 85-88 agility please test it and let me know

    So, if you have 89+ agility try out my script, and let me know what you think. I'm very open to suggestions!

    Start it at the log balance, and please babysit! Not really needed anymore


    Make sure Game Chat is set to All!

    Versions

    0.10 - Initial Release

    0.15 - Some small changes made

    0.20 - Finds Branch#2 much better than before
    - Worked on some standards
    - More Stable than previous versions

    0.30 - SPS added to walk back to beginning
    - Failsafes added

    0.35 - Changed a DTM that would fail occasionally

    0.50 - Rewrote most parts of the script to try making it more reliable. I think i was successful for the most part :P

    0.60 - Fixed the barrier

    0.70 - Fixed the first branch

    0.80 - Added time running, xp, and xp/h

    Known Bugs:
    - Occasionally fails to detect when successfully completes log

    Progress Report:
    Time: 41 Minutes and 0 Seconds
    Laps done: 47
    Exp Gained: 34075
    Exp/Hr: 49865


    Simba Code:
    program AdvancedGnomeAgility;
    //////////////////////////WRITTEN BY RYGUY//////////////////////////////

    ////////////////////////////VERSION 0.80////////////////////////////////
    {$DEFINE SMART}
    {$DEFINE SRL5}
    {$loadlib sps}
    {$i SRL/srl.simba}
    {$i sps/sps.simba}

    var
      Log, Branch1, Branch2, Post, Hurdle, TimeBegan, StartingXP: integer;
      aFound: extended;

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

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active:=True;
    end;
    ////////////////////DO NOT TOUCH BELOW THIS LINE/////////////////////////



    procedure SetDTMs;
    begin
      Log := DTMFromString('mlwAAAHicY2dgYFBjZGDgB2JpINYEYkUgVgViHSDeDJQ/BsSbgHgVEM8A4lNAvA2IixwFGHLiFRkKHPgZ0qz4GLwtxRnCnaQYcuz4GdiA8rgwIx4MBQAxWws7');
      Branch1 := DTMFromString('mbQAAAHicY2VgYNBjZGBQAmILIPYC4kQgngMUnwnEM5BwfqgSQ02KOUNxjDFDfqQhmOYHinOhYUYsGAwAfOwJcQ==');
      Branch2 := DTMFromString('mKgEAAHic42NgYOACYm4g9gRiOyA2YYAAViDmAWIZIBYBYkGoOnaoHBsQS0BpmBl8UD0wdSA5RgYEAOlL91dg8LaWYkjykWdI8JID4yhXGYYYd1mGOA85huwgJYbMAEWGwnBlhvxQCAbp4QDqJQczkolRAQDIyg2R');
      Hurdle := DTMFromString('mQwAAAHicY2ZgYJBlZGBQBmJtIK4A8quAuBKI/95dwfDr9jKG7zeWMHAB+TDMiISBAABdxglu');
      Post := DTMFromString('mQwAAAHicY2aAAA4g5oRiaajYxj4/hu6uVoaSknwGNiAfhhmRMBAAAKdUBMw=');
    end;



    procedure FreeDTMs;
    begin
      FreeDTM(Log);
      FreeDTM(Branch1);
      FreeDTM(Branch2);
      FreeDTM(Hurdle);
      FreeDTM(Post);
    end;



    procedure Report;
    var
      Exp, ExpHr, TimeRan: integer;
    begin
      TimeRan := (1+((GetSystemTime - TimeBegan) / 1000));
      Exp := (GetXPBarTotal - StartingXP);
      ExpHr := Round((Exp * 3600) / (TimeRan));
      WriteLn('Time: ' + TimeRunning);
      WriteLn('We have gained ' + IntToStr(Exp) + ' Agility Experience!');
      WriteLn('We are gaining ' + IntToStr(ExpHr) + ' Agility Experience per Hour!');
    end;




    procedure AntiBan;
    begin
      if not(LoggedIn)then
      Exit;
      FindNormalRandoms;
      LevelUpEx(True, True);
      case Random(300)of
        0: HoverSkill('Agility', false);
        1: PickUpMouse;
        2: RandomMovement;
        3: RandomRClick;
      end;
    end;



    procedure LogBalance;
    var
      x, y: integer;
    begin
      repeat
        if FindDTMRotated(Log, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
          WriteLn('Found Log');
          Mouse(x, y, 5, 5, True);
          Wait(500+random(50));
      until(IsMoving);
        while(IsMoving) do
          WaitNone;
          AntiBan;
    end;



    procedure ObstacleNet;
    var
      x, y: integer;
    begin
      x := MSCX;
      y := MSCY;
      if FindObjTPA(x, y, 466484, 5, 1, 50, 150, 200, ['over'])then
      begin
        ClickMouse2(True);
        WriteLn('Found Net');
        AntiBan;
        Wait(4000+random(100));
      end;
    end;



    procedure TreeBranch1;
    var
      x, y: integer;
    begin
      x := MSCX;
      y := MSCY;
      FindDTMRotated(Branch1, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)
      Mouse(x, y, 4, 4, True);
      if DidRedClick then
      begin
        WriteLn('Found Branch 1');
        AntiBan;
        SetAngle(SRL_ANGLE_LOW);
      end;
    end;



    procedure TreeBranch2;
    var
      x, y: integer;
    begin
      if FindDTM(Branch2, x, y, MSX1, MSY1, MSX2, MSY2)then
      Mouse(x, y, 4, 4, True);
      WriteLn('Found Branch 2');
      AntiBan;
      Wait(3000+random(50));
    end;



    procedure Signpost;
    var
      x, y: integer;
    begin
      if FindDTMRotated(Post, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
      Mouse(x, y, 4, 4, True);
      WriteLn('Found Signpost');
      AntiBan;
      Wait(3000+random(50));
    end;



    procedure Pole;
    var
      x, y: integer;
    begin
      ClickNorth(SRL_ANGLE_NONE);
      Wait(100+random(50));
      if FindObjTPAMulti(x, y, [4541520, 2566185], 4, 1, 220, 7, 200, ['Swing'])then
      ClickMouse2(True);
      WriteLn('Found Pole');
      AntiBan;
      Wait(12000+random(100));
    end;



    procedure Barrier;
    var
      x, y: integer;
    begin
      if FindDTM(Hurdle, x, y, MSX1, MSY1, MSX2, MSY2)then
      begin
        MMouse(x, y, 3, 4);
        ClickMouse2(True);
        if DidRedClick then
        begin
          WriteLn('Found Barrier');
          AntiBan;
          Wait(6500+random(100));
          Report;
        end;
      end;
    end;



    procedure BackToLog;
    begin
      repeat
        case Random(3) of
          0: SPS_WindWalk(Point(1736, 2910));
          1: SPS_WindWalk(Point(1736, 2912));
          2: SPS_WindWalk(Point(1734, 2910));
        end;
        WriteLn('Attempting To Run Back To Log')
      until (IsMoving);
        begin
          MakeCompass('E');
          SetAngle(SRL_ANGLE_HIGH);
        end;
    end;



    procedure WhereAreWe;
    var
      x, y: integer;
    begin

      if FindDTMRotated(Log, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
      begin
        WriteLn('Trying Balence');
        LogBalance;
      end;

      if FindBlackChatMessage('other')then
      begin
        WriteLn('Trying Net');
        ObstacleNet;
      end;

      if FindBlackChatMessage('netting')then
      begin
        WriteLn('Trying First Branch');
        TreeBranch1;
      end;

      if FindBlackChatMessage('above')then
      begin
        WriteLn('Trying Second Branch');
        TreeBranch2;
      end;

      if FindDTMRotated(Post, x, y, MSX1, MSY1, MSX2, MSY2, -Pi, Pi, Pi/30, aFound)then
      begin
        WriteLn('Trying Signpost');
        Signpost;
      end;

      if FindColoredAreaTolerance(x, y, 6270424, MSX1, MSY1, MSX2, MSY2, 600, 5)then
      begin
        WriteLn('Trying Pole');
        Pole;
      end;

      if FindDTM(Hurdle, x, y, MSX1, MSY1, MSX2, MSY2)then
      begin
        WriteLn('Trying Barrier');
        Barrier;
      end;

      if FindColoredAreaTolerance(x, y, 10129284, MMX1, MMY1, MMX2, MMY2, 100, 10)then
      begin
        WriteLn('Trying Walk Back To Log')
        BackToLog;
      end;
    end;



    begin
      Smart_Server := 86;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetUpSRL;
      SPS_Setup(RUNESCAPE_SURFACE, ['4_7']);
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      TimeBegan := GetSystemTime;
      ToggleXPBar(True);
      StartingXP := (GetXPBarTotal);
      WriteLn('We are starting with ' + IntToStr(StartingXP) + ' xp');
      ClickNorth(SRL_ANGLE_HIGH);
      MakeCompass('E');
      repeat
        SetDTMs;
        WhereAreWe;
        FreeDTMs;
      until(false);
    end.
    Last edited by RyGuy; 01-19-2012 at 06:55 PM.

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

    Default

    You should paste it into the main body of the thread in [ SIMBA] tags.

    You should work on your standards a bit:
    Simba Code:
    Wait(500+random(100));
      until
        IsMoving;
        begin
          MakeCompass('E');
          Flag;
          AntiBan;
          Wait(1900+random(100));
        end;
    should be:
    Simba Code:
    Wait(500+random(100));
      until (IsMoving);
      begin
        MakeCompass('E');
        Flag;
        AntiBan;
        Wait(1900+random(100));
      end;
    but that isn't really a big deal.


    Here:
    Simba Code:
    x :=MSCX;
          y :=MSCY;
          if FindObjTPA(x, y, 932970, 10, 1, 40, 20, 300, ['across'])then
    Why are you setting x and y then changing then on the third line without doing anything with them?

    Simba Code:
    ClickMouse2(True);
        WriteLn('Attempting pole!');
        Wait(50+random(50));
      until
        DidClick(True, 500);
    On a laggy computer that DidClick might return false because of that wait, I would move the wait to the start of the loop.

    Change this
    Simba Code:
    WriteLn('Time: ' + TimeRunning);
    to:
    Simba Code:
    WriteLn('Time: ' + GetTimeRunning);
    that way it nicely formats it into minutes and seconds for you.

    It won't compile for me but I guess that is because you use SRL 5.

    Overall good but you have no checks that you actually reached the end of an obstacle, you need to do this or it could go crazy

  3. #3
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Here:
    Simba Code:
    x :=MSCX;
          y :=MSCY;
          if FindObjTPA(x, y, 932970, 10, 1, 40, 20, 300, ['across'])then
    Why are you setting x and y then changing then on the third line without doing anything with them?
    Doesn't setting x and y to the center of the screen make it search the center of the screen first? If i get rid of that in my TreeBranch1 procedure, it finds the colors on the left side of the screen first, but with them, it finds the branch first.

    Simba Code:
    ClickMouse2(True);
        WriteLn('Attempting pole!');
        Wait(50+random(50));
      until
        DidClick(True, 500);
    On a laggy computer that DidClick might return false because of that wait, I would move the wait to the start of the loop.
    Ah i did not know this. Thanks! will remove when next version is uploaded.

    Change this
    Simba Code:
    WriteLn('Time: ' + TimeRunning);
    to:
    Simba Code:
    WriteLn('Time: ' + GetTimeRunning);
    Tried that and got an error. Maybe it's SRL5?

    Overall good but you have no checks that you actually reached the end of an obstacle, you need to do this or it could go crazy
    Yeah, it happens sometimes. I'm not sure how to add checks though. Any advice on this is greatly appreciated!

    Thank you for looking over my script!

  4. #4
    Join Date
    May 2011
    Location
    In an Island.
    Posts
    1,413
    Mentioned
    2 Post(s)
    Quoted
    149 Post(s)

    Default

    Elah! Nice to see an advanced gnome script! Now to get strange rock will be a piece of cake. well done! Hope to see improvements on the script!

    ~onilika
    ''If you want something you've never had, you have to do something you've never done''


    total leve 2715/1b exp +... exterminated.

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

    Default

    Quote Originally Posted by RyGuy View Post
    Doesn't setting x and y to the center of the screen make it search the center of the screen first? If i get rid of that in my TreeBranch1 procedure, it finds the colors on the left side of the screen first, but with them, it finds the branch first.
    This may well be true sorry.

    Ah i did not know this. Thanks! will remove when next version is uploaded.
    You are welcome


    Tried that and got an error. Maybe it's SRL5?
    Yeah maybe

  6. #6
    Join Date
    Dec 2011
    Location
    Belgium
    Posts
    623
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    maybe you can make a file of the script. I'll test it soon and post a proggy

    Made by P1ng

  7. #7
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    I'll have version 0.30 up soon.. uses sps to walk back to the log... helps a bug where it would not begin running

  8. #8
    Join Date
    Dec 2011
    Location
    Windsor Locks, CT
    Posts
    99
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    how do i paste so its not all on one line?

  9. #9
    Join Date
    Dec 2011
    Location
    Belgium
    Posts
    623
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by ministone28 View Post
    how do i paste so its not all on one line?
    same problem...
    thats why you should make a file of it
    E: thx for the file mate, I'll try this script tomorrow and will post a proggy.
    Last edited by LemonHaze; 01-02-2012 at 10:33 PM.

    Made by P1ng

  10. #10
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by lordvolt View Post
    same problem...
    thats why you should make a file of it
    E: thx for the file mate, I'll try this script tomorrow and will post a proggy.
    Np.. new one is version .30.. added some failsafes. still gets caught in a loop sometimes.. still trying to learn new methods and improve it. this script gets about 45-50k an hour as of right now

  11. #11
    Join Date
    Dec 2011
    Location
    Belgium
    Posts
    623
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Exception in Script: Unable to find file 'SRL/srl.simba' used from ''
    I need some help

    Made by P1ng

  12. #12
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    It uses SRL5.. how to convert is in the first post

  13. #13
    Join Date
    Dec 2011
    Location
    Belgium
    Posts
    623
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by RyGuy View Post
    It uses SRL5.. how to convert is in the first post
    still doesn't work
    It gives the same error.

    Made by P1ng

  14. #14
    Join Date
    Jan 2012
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    EDIT: Errors fixed, will post proggies.

    Suggestion: Humanlike camera movement. The 90 degree camera pivots look very botlike. Also fails to click next object very often.
    Last edited by Destined2bGreat; 01-09-2012 at 04:44 AM.

  15. #15
    Join Date
    Jan 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I will test this out after i run out of runes at the livid farm xD
    Will post any bugs, errors or compliments within the night.

  16. #16
    Join Date
    Jan 2012
    Posts
    21
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am getting this error and can't seem to fix it.

    [Error] (67:10): Unknown identifier 'SPS_WindWalk' at line 66
    Compiling failed.

    Any suggestions? I've looked all over the forums and can't find what is exactly wrong with it.

  17. #17
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

  18. #18
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Version 0.50 is out! Rewrote most parts of the script. Took out the report because of how I wrote it. I plan on adding exp gained and xp/h using the xp counter, but i am not yet sure how to do this. Should be added in a later version. Try it out or check out the code and leave a comment!

  19. #19
    Join Date
    Jan 2012
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    This script really has trouble running longer than 1-5 laps. It will get stuck on an obstacle and keep trying to click in the wrong spot.

  20. #20
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by Destined2bGreat View Post
    This script really has trouble running longer than 1-5 laps. It will get stuck on an obstacle and keep trying to click in the wrong spot.
    Thank you for trying it out I've been doing a little bit more testing/tweaking on this script and the version that is on here mainly gets stuck at the barrier and the first tree branch. I've fixed the barrier issue, but i am still having trouble getting the first tree branch to work correctly. Looking for some advice on how to find it from anyone...otherwise i'll keep experimenting and see what i can come up with.

  21. #21
    Join Date
    Jan 2012
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Those are the two obstacles id get stuck on, besides it repeating the log over and over.

  22. #22
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by Destined2bGreat View Post
    Those are the two obstacles id get stuck on, besides it repeating the log over and over.
    I haven't run into it repeating the log over and over, but it is probably a problem with finding the net. I'll mess around with the first branch and try to release a fix tonight, as im guessing people will want this with the skoll boots being released today.

  23. #23
    Join Date
    Jan 2012
    Posts
    137
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Yeah I'm currently stuck using ape atoll with skoll lol.

  24. #24
    Join Date
    Feb 2011
    Location
    Wisconsin
    Posts
    398
    Mentioned
    1 Post(s)
    Quoted
    10 Post(s)

    Default

    Version 0.70 up! Ran for 30 minutes and is stable! If using the skoll boots, the first time through will do the log balance twice because of the black chat message. Enjoy and post any bugs you find!

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

    Default

    Too bad my skoll boots are already wasted Looking forward to trying this out, I hope it can be stable for multiple hours at a time.

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
  •