Results 1 to 6 of 6

Thread: [First Script][RS3]Brose's Gnome Basic Agility

  1. #1
    Join Date
    Nov 2014
    Posts
    56
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default [First Script][RS3]Brose's Gnome Basic Agility

    This is my first script and there are a few things to take note for it to work.
    I have never coded anything before so... this is pretty much my first work =)

    1. Please setup the interface as per the default settings
    2. Please set camera type to RS3 - It only works with RS3 at the moment
    3. Set minimap north and zoom all the way out
    4. If you want to be able to track your xp, then please put it at the position above the chatbox...
    5. Position your player 1 square north of the balancing log before you start
    6, Please babysit the script when it is running.

    Edit: Finally figured out why that paintStatus procedure isnt working
    Edit: Updated to v1.1. It should run for a very very very long time now. More failsafes included.

    Code:
    program Brose_Gnome_Basic_Agility;
    {$DEFINE SMART} // comment this line out if you don't want to use SMART
    {$i srl-6/srl.simba}
    {$I SPS/lib/SPS-RS3.Simba}
    
    //////////////         Setup the usual stuff here      ////////////////////////
    procedure declarePlayers();
    begin
      setLength(players, 1);
      with players[0] do
        begin
        loginName := '';
        password  := '';
        isActive  := true;
        isMember  := true;
        world     := 99;
        end;
      currentPlayer := 0;
    end;
    {////////////                 Read Me Please?          ////////////////////////
    
    1. Please setup the interface as per the default settings
    2. Please set camera type to RS3 - It only works with RS3 at the moment
    3. Set minimap north and zoom all the way out before you start the script
    4. If you want to be able to track your xp, then please put it at the position
       above the chatbox...
    5. Position your player 1 square north of the balancing log before you start
    6, Please babysit the script when it is running.
    
    //////////////////////////////////////////////////////////////////////////////}
    //This progress report is stolen from Ashaman's Advanced Gnome Agility with minor modifications
    const
      SCRIPT_VERSION = '1.1'; // updated on 7 Dec 2014
    
    var
      lapCount, XP, startingXP, lapsPH, XPH, antibanCount, actAfkCount: integer;
    
    procedure progressReport;
    begin
    
      XP := (chatBox.getXPBar - startingXP);
      XPH := round(XP * (3600.0 / (getTimeRunning / 1000.0)));
      lapsPH := round((lapCount * (3600.0 / (getTimeRunning / 1000.0))));
    
      writeln('|===========================================================|');
      writeln('|             Brose Basic Gnome Agility v' + padR(toStr(SCRIPT_VERSION), 19), '|');
      writeln('|===========================================================|');
      writeln(padR('| Running For: ' + timeRunning, 60) + '|');
      writeln(padR('| Laps: ' + groupDigits(lapCount, ','), 40) + padR('Laps/H: ' + groupDigits(lapsPH, ','), 20) + '|');
      writeln(padR('| Exp Earned: ' + groupDigits(XP, ','), 40) + padR('Exp/Hour: ' + groupDigits(XPH, ','), 20) + '|');
      writeln(padR('| Antibans performed: ' + groupDigits(antibanCount, ','), 40) + padR('AFK Count: ' + groupDigits(actafkcount, ','), 20) + '|');
      writeln('|___________________________________________________________|');
      writeln('|___________________________________________________________|');
    
    end;
    
    /////////////////////////////////////////////////////////////////////////
    procedure paintStatus(status: string);
    begin
      {$IFDEF SMART}
        try
          smartImage.clear();
          smartImage.drawText('Status: ' + status, point(chatbox.x2 - 320, chatbox.y2 - 19), smallChars, false, 255);
        except
        end;
      {$ENDIF}
    end;
    
    procedure antiBan();
    var
    i: integer;
    begin
    
    if not isLoggedIn then
    exit;
    
    i := random(100);
    
    if i < 9 then
        begin
          writeln('[   Activating antiban   ]');
          paintStatus('Activating antiban...');
        case i of
              0: wait(randomrange(5000,12000));//RandomRClickItem();
              1: begin
                  MouseOffClient(Random(5));
                  wait(randomrange(3000,7000));
                 end;
              2: PickUpMouse;
              3: MouseMovingObject();
              4: SleepAndMoveMouse(200 + Random(50));
              5: begin
                  Boredhuman;
                  wait(randomrange(1000,7000));
                  minimap.clickCompass();
                  mainScreen.setAngle(MS_ANGLE_HIGH);
                 end;
              6: hoverRandomSkill();
              7: begin
                  randomCameraAngle(MS_ANGLE_HIGH);
                  minimap.clickCompass();
                  mainScreen.setAngle(MS_ANGLE_HIGH);
                 end;
              8: begin
                  tabStats.getSkillLevel(SKILL_AGILITY);
                  hoverSkill(SKILL_AGILITY);
                  wait(gaussRangeInt(3000,5000));
                 end;
          end;
            inc(antibanCount);
      end;
    end;
    
    procedure actAFK();
    var
      i,k : integer;
    begin
      i:= gaussRangeInt(60000,360000);
      k:= round (i/1000)
      case Random(100) of
      0..1: begin
              writeln(padR('[     Acting AFK For: ' + inttostr(k), 1) + 'secs     ]');
              paintStatus(padR('Going AFK for: ' + inttostr(k), 1) + 'secs...');
              wait (i);
              inc (actafkCount);
            end;
      end;
    end;
    
    procedure logBalance();
    var
      logBalance: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      logBalance := intToBox(280, 216, 299, 241);
      Repeat
        mouseBox(logBalance, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['og balance']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the balancing log - Terminating Script');
      terminateScript();
      end else
      begin
        case random(8) of
          0:  begin
                mouseBox(logBalance, MOUSE_right);
                chooseoption.select(['alk-across']);
              end;
          1..7: mouseBox(logBalance, MOUSE_LEFT);
        end;
      end;
    
      writeln('1. Walking across log balance');
      paintStatus('1. Walking across log balance');
      wait(randomrange(6300,7300));
      antiBan();
    end;
    
    procedure obstacleNet1();
    var
      obstacleNet1: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      obstacleNet1 := intToBox(247, 325, 288, 331);
      Repeat
        mouseBox(obstacleNet1, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['bstacle']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the obstacle net - Terminating Script');
      terminateScript();
      end else
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['limb-over']);
              end;
        1..7: fastClick(mouse_left);
        end;
      writeln('2. Climbing up the obstacle net');
      paintStatus('2. Climbing up the obstacle net');
      wait(randomrange(4300,5200));
      antiBan();
    end;
    
    procedure treeBranch1();
    var
      treeBranch1: TBox;
      x, y, i, j, k, m: integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    begin;
      if not isLoggedIn() then
      exit;
    
      mousespeed :=(randomrange(20,40));
      treeBranch1 := intToBox(289, 235, 295, 257);
      mouseBox(treeBranch1, MOUSE_Move);
      if isMouseOverText(['ree branch']) then
      begin
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['limb']);
              end;
        1..7: fastClick(mouse_left);
        end;
      end else
        begin;
          findColorsSpiralTolerance(x, y, TPA, 3428455, mainScreen.getbounds(), 4, colorSetting(2, 0.06, 0.38));
          if length(TPA) < 1 then
          exit;
    
          smartImage.clearArea(mainScreen.getBounds());
          mouseSpeed := randomRange(20, 40);
          ATPA := TPA.toATPA(5, 15);
          ATPA.sortFromMidPoint(mainscreen.playerPoint);
          smartImage.debugATPA(ATPA);
    
          for i := 0 to high(ATPA) do
          begin
            mouse(middleTPA(ATPA[i]), MOUSE_MOVE);
            wait(randomRange(1000, 2000));
            inc(j);
            if isMouseOverText(['ree branch']) then
            begin
              case random(8) of
                 0: begin
                     fastClick(mouse_right);
                     chooseoption.select(['limb']);
                    end;
              1..7: fastClick(mouse_left);
              end;
              writeln('3. Climbing up the tree branch');
              paintStatus('3. Climbing up the tree branch');
            end;
          break;
          end;
    
      if (j > 60) then
      begin
        writeln('Cannot find the damn tree branch - terminating script');
        terminateScript();
      end;
    
      Repeat
      wait(randomrange(3000,4000));
      antiBan();
      inc(k);
      until chatbox.findTextOnLines(['climb the', 'platform abov'], [0..2]) or (k > 30);
    end;
    end;
    
    procedure balancingRopeMethod1();
    var
      balancingRopeMethod1: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      balancingRopeMethod1 := intToBox(431, 202, 440, 202);
      Repeat
        mouseBox(balancingRopeMethod1, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['alancing']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the balancing rope - Terminating Script');
      terminateScript();
      end else
    
      if isMouseOverText(['alancing']) then
      begin
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['alk-on']);
              end;
        1..7: fastClick(mouse_left);
        end;
      end;
    
      antiBan();
      writeln('4. Walking across balancing rope - Method 1');
      paintStatus('4. Walking across balancing rope - Method 1');
      wait(randomrange(7500,8500));
      antiBan();
    end;
    
    procedure balancingRopeMethod2();
    var
      platform, balancingRopeMethod2: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      platform := intToBox(1521, 218, 1533, 227);
      balancingRopeMethod2 := intToBox(1418, 228, 1426, 229);
    
      mouseBox(platform, MOUSE_Move);
        if isMouseOverText(['trainer']) then
        begin
          fastclick(Mouse_right);
          wait(randomrange(500,800));
          chooseoption.select(['alk here']);
        end else fastclick(mouse_left);
    
      wait(randomRange(2000,3000));
    
      Repeat
        mouseBox(balancingRopeMethod2, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['alancing']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the balancing rope - Terminating Script');
      terminateScript();
      end else
    
      if isMouseOverText(['alancing']) then
      begin
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['alk-on']);
              end;
        1..7: fastClick(mouse_left);
        end;
      end;
    
      antiBan();
      writeln('4. Walking across balancing rope - Method 2');
      paintStatus('4. Walking across balancing rope - Method 2');
      wait(randomrange(7400,8400));
      antiBan();
    end;
    
    procedure balancingRope();
    begin;
      case random(6) of
      0..5: balancingRopeMethod1();
      6: balancingRopeMethod2();
      end;
    end;
    
    procedure treeBranch2();
    var
      treeBranch2: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      treeBranch2 := intToBox(420, 187, 421, 212);
      Repeat
        mouseBox(treeBranch2, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['ree branch']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the tree branch - Terminating Script');
      terminateScript();
      end else
    
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['limb-down']);
              end;
        1..7: fastClick(mouse_left);
        end;
    
      writeln('5. Climbing down tree branch');
      paintStatus('5. Climbing down tree branch');
      wait(randomrange(3000,4000));
      antiBan();
    end;
    
    procedure obstacleNet2();
    var
      obstacleNet2: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      minimap.clickCompass();
      obstacleNet2 := intToBox(200, 38, 225, 75);
    
      Repeat
        mouseBox(obstacleNet2, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['bstacle']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the obstacle net - Terminating Script');
      terminateScript();
      end else
    
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['limb-over']);
              end;
        1..7: fastClick(mouse_left);
        end;
    
      mouseBox(obstacleNet2, MOUSE_LEFT);
      writeln('6. Climbing over the obstacle net');
      paintStatus('6. Climbing over the obstacle net');
      wait(randomrange(6500,7500));
      //antiBan();
    end;
    
    procedure obstaclePipeLeftMethod1();
    var
      obstaclePipeLeftMethod1: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      obstaclePipeLeftMethod1 := intToBox(255, 112, 271, 128);
    
      Repeat
        mouseBox(obstaclePipeLeftMethod1, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['pipe']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the obstacle pipe - Terminating Script');
      terminateScript();
      end else
    
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['queeze']);
              end;
        1..7: fastclick(mouse_left);
        end;
    
      writeln('7. Squeezing through obstacle pipe - method 1');
      paintStatus('7. Squeezing through obstacle pipe - method 1');
      wait(randomrange(7100,8100));
      antiBan();
    end;
    
    procedure obstaclePipeLeftMethod2();
    var
      obstaclePipeLeftMethod2: TBox;
      j: integer;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      obstaclePipeLeftMethod2 := intToBox(247, 57, 272, 85);
      mainScreen.setAngle(MS_ANGLE_HIGH);
    
      Repeat
        mouseBox(obstaclePipeLeftMethod2, MOUSE_Move);
        wait(randomRange(300, 800));
        inc(j);
        if isMouseOverText(['trainer']) then
        wait(5000);
      until isMouseOverText(['pipe']) or  (j>= 60);
    
      if  (j>= 60) then
      begin
      writeln('Sorry... I cannot find the obstacle pipe - Terminating Script');
      terminateScript();
      end else
    
        case random(8) of
           0: begin
               fastClick(mouse_right);
               chooseoption.select(['queeze']);
              end;
        1..7: fastClick(mouse_left);
        end;
    
      writeln('7. Squeezing through obstacle pipe - method 2');
      paintStatus('7. Squeezing through obstacle pipe - method 2');
      wait(randomrange(7100,8100));
      antiBan();
    end;
    
    procedure obstaclePipe();
    begin;
      case random(2) of
      0: begin
          obstaclePipeLeftMethod1();
          mainScreen.setAngle(MS_ANGLE_HIGH);
         end;
      1: obstaclePipeLeftMethod2();
      end;
    end;
    
    procedure walkToStarting();
    var
      walkToStarting: TBox;
    begin;
      if not isLoggedIn then
      exit;
    
      mousespeed :=(randomrange(20,40));
      walkToStarting := intToBox(3, 220, 13, 233);
      mouseBox(walkToStarting, MOUSE_MOVE);
        if isMouseOverText(['trainer']) then
        begin
          fastclick(Mouse_right);
          wait(randomrange(500,800));
          chooseoption.select(['alk here']);
        end else fastclick(mouse_left);
      writeln('Lap completed! Walking to the starting point');
      paintStatus('Lap completed! Walking to the starting point');
      inc(lapCount);
      wait(randomrange(5000,6000));
      antiBan();
    end;
    
    procedure mainloop();
    begin
      if not isLoggedIn() then
      exit;
      claimTicket();
      logBalance();
      obstacleNet1();
      treeBranch1();
      balancingRope();
      treeBranch2();
      obstacleNet2();
      obstaclePipe();
      walkToStarting();
      actAFK();
      clearDebug();
      progressReport();
    end;
    
    begin
      clearDebug();
      {$IFDEF SMART}
        smartEnableDrawing := true;
      {$ENDIF}
      setupSRL();
      declarePlayers();                       // Set up your username/pass
    
      if not isLoggedIn() then                // If player isn't logged in then
      begin
        players[currentPlayer].login();       // Log them in
        exitTreasure();
        claimTicket();
        mainScreen.setZoom(true);
        minimap.setAngle(MM_DIRECTION_NORTH);  // Make compass north and angle high
        mainScreen.setAngle(MS_ANGLE_HIGH);
      end;
      minimap.clickCompass();
      mainScreen.setAngle(MS_ANGLE_HIGH);
      startingXP := chatBox.getXPBar;
      disableSRLDebug := true;
      clearDebug();
      repeat
        mainloop();
      Until not isLoggedIn();
      terminateScript();
    end.
    Last edited by Brose; 12-07-2014 at 03:42 PM.

  2. #2
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    Congrats on releasing your first script!
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Badâ„¢ before everyone gets laser pistols

  3. #3
    Join Date
    Nov 2014
    Posts
    56
    Mentioned
    1 Post(s)
    Quoted
    22 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    Congrats on releasing your first script!
    Thank you

  4. #4
    Join Date
    Aug 2014
    Posts
    172
    Mentioned
    2 Post(s)
    Quoted
    77 Post(s)

    Default

    testing out your script now ... will give some feedback when I find stuff that could be fixed

  5. #5
    Join Date
    Aug 2014
    Posts
    172
    Mentioned
    2 Post(s)
    Quoted
    77 Post(s)

    Default

    Script runs very nicely. However, sometimes when chaging camera angle, it doesn't move into the correct space and so the script executed. Perhaps placing in a backup in the script. That if it fails an obstacle because of camera issue. It should place the camera back to north (by just clicking compass) and then moving the camera into the place it needs to be . also perhaps as another antiban measure, it should click in a few different places when traversing obstacles. As it seems as though it will only click in 1 space around the course. Also the bot is sometimes a bit slow getting to the next obstacle. I know this would be better for people who may have lower fps while playing, but for me it seems slightly bot-like because the bot doesn't move quickly enough. The xp/hr and xp gained doesn't seem to be working when I use the script. Hopefully that will be fixed, cause its always a lovely feature to have . I do like the afk sessions that happen every now and then as antiban.... HOWEVER... not moving for like 3 minutes every now and then does seem a bit odd and I don't think that many humans would be doing that when playing the game. But its a nice feature that might work better if the mini breaks were shorter.. maybe 30seconds, instead of 180 seconds. Or if implementing breaks have it as breaks where the clients logs the player out and then logs them back in once break is finished.

    Hope those give a few ideas to help make your bot better. and again, very nice bot. already gotten me to lvl 38 I will be using until ape atoll. maybe even longer so that I don't fall at ape atoll lol. so I will definitely give some more ideas if I get any that might help make the bot better .. I'm not a scripter so I can't give you any scripting advice on any of the script, so sorry I can't help you in that sense.

  6. #6
    Join Date
    Aug 2014
    Posts
    172
    Mentioned
    2 Post(s)
    Quoted
    77 Post(s)

    Default

    little proogy for you guys

    |================================================= ==========|
    | Brose Basic Gnome Agility v1.1 |
    |================================================= ==========|
    | Running For: 5 Hours, 11 Minutes and 50 Seconds |
    | Laps: 292 Laps/H: 56 |
    | Exp Earned: 0 Exp/Hour: 0 |
    | Antibans performed: 192 AFK Count: 3 |
    |_________________________________________________ __________|
    |_________________________________________________ __________|

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
  •