Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Amazing] RangingGuild script [30k+ xp/hour]

Featured Replies

load of interlog in the bottom with the script failing, unknown, when i had this working was much better then the sdn script, was flawless

Its working fine for me. Just need to update the ID's. I've done it myself and here is how you can. Download the original script. Right click the script and select open with Notepad. Delete everything there. You will want to paste this instead:

import java.io.IOException;
 import java.net.URL;
 import org.osbot.script.ScriptManifest;
 import org.osbot.script.rs2.map.Position;
 import org.osbot.script.rs2.model.NPC;
 import org.osbot.script.rs2.model.RS2Object;
 import org.osbot.script.rs2.ui.RS2Interface;
 import org.osbot.script.rs2.ui.RS2InterfaceChild;
 import org.osbot.script.rs2.utility.Area;
 import org.osbot.script.rs2.Client;

 import javax.imageio.ImageIO;

 import java.awt.*;

 @ScriptManifest(name = "RangeGuilder", author = "Rapidz", version = 1.1D, info = "Next generation 07 RuneScape RangeGuilding script, stable and almost flawless.")

 public class RangeGuilder extends Script {

 Image background = getImage("http://i.imgur.com/Or2kp76.png");
     public long startTime; // Bot starting time
 private final static int JUDGE = 5963;
 private final static int TARGET = 19209;
 private final static int BRONZE_ARROW = 882;
 private final static int LADDER_UP = 2511;
 private final static int LADDER_DOWN = 2512;
 private final static int CAMELOT_TELEPORT = 8010;
 private final static Position RETURN_POSITION = new Position(2670, 3418, 0);
 public int startRangedExp;
 public int lastRangedExpPerHour;
 public int rangedExpToLvl;
     public long lastExpCheck;

 private enum State {
 SHOOT, EQUIP_ARROWS, TALK_TO_JUDGE, RETURNING, ESCAPE
 }

 private State state = State.SHOOT;
    
     private int xpToLvl(int level, int currentExp) {
         return Math.round(Math.round((((level+1)*(level)/8)+75*((Math.pow(2, (level+1)/7)-Math.pow(2, 1/7))/(Math.pow(2, 1/7)-1)))-currentExp));
     }
    
     private int xpPerHour(int currentExp, int startExp) {
         return Math.round((((currentExp-startExp)*3600)/((System.currentTimeMillis()-this.startTime)/1000)));
     }

 public void onStart() {
     positionScreen();
 log("Rapidz RangeGuilder - Version 1.1 Running");
 int rangedLvl = this.client.getSkills().getLevel(Skill.RANGED);
         int rangedExp = this.client.getSkills().getExperience(Skill.RANGED);
 this.startRangedExp = this.client.getSkills().getExperience(Skill.RANGED);
         this.startTime = System.currentTimeMillis();
         this.rangedExpToLvl = xpToLvl(rangedLvl, rangedExp);
 this.lastRangedExpPerHour = 0;
 this.lastExpCheck = System.currentTimeMillis();
 }

 public int onLoop() {
 switch(state) {
 case State.SHOOT:
 onShoot();
 break;
 case State.EQUIP_ARROWS:
 onEquip();
 break;
 case State.TALK_TO_JUDGE:
 onTalk();
 break;
 case State.ESCAPE:
 onEscape();
 break;
 case State.RETURNING:
 onReturning();
 break;
 }
 return 0;
 }

 public void onMessage(String message) {
 if (message == "You should probably be behind the hay bales." || message == "You've fired all your arrows, maybe you should talk to the Judge." || message == "Maybe you should ask before using those.") {
 state = State.RETURNING;
 }
 }

 private void onShoot() {
 if (searchInterfacesForText("Sorry, you may").isEmpty() && searchInterfacesForText("I suggest").isEmpty() && searchInterfacesForText("Well done").isEmpty()) {
 if (client.getMyPlayer().isUnderAttack()) {
 state = State.ESCAPE;
 return;
 } else if (client.getInterface(325) == null) {
 selectEntityOption(closestObject(TARGET), "Fire-at", true, false);
 sleep(1 + random(5));
 } else {
 selectInterfaceOption(325, 88, "Close", true);
 }
 }
 if (searchInterfacesForText("Sorry, you may").size() >= 1 || searchInterfacesForText("Well done").size() >= 1 ) {
 state = State.TALK_TO_JUDGE;
 } else if (searchInterfacesForText("I suggest").size() >= 1) {
 state = State.EQUIP_ARROWS;
 }
 }

 private void onTalk() {
 selectEntityOption(closestNPC(JUDGE), "Talk-to", false);
 sleep(300 + random(50));
 waitForClickContinue();
 sleep(600 + random(100));
 waitForAccept();
 sleep(600 + random(100));
 waitForClickContinue();
 sleep(600 + random(100));
 waitForClickContinue();
 sleep(500 + random(50))
 if (searchInterfacesForText("Oops,").size() >= 1) {
 log("Ran out of coins, stopped the script.")
 stop();
 }
 state = State.SHOOT;
 }

 private void onEquip() {
 selectInventoryOption(client.getInventory().getSlotForId(BRONZE_ARROW),"Wield");
 state = State.SHOOT;
 }

 private void onEscape() {
 selectEntityOption(closestObject(LADDER_UP), "Climb-up");
 while (client.getMyPlayer().getZ() == 0) {
 selectEntityOption(closestObject(LADDER_UP), "Climb-up");
 sleep(3000);
 }
 sleep(6000);
 while (client.getMyPlayer().getZ() == 2) {
 selectEntityOption(closestObject(LADDER_DOWN), "Climb-down")
 sleep(2000);
 }
 state = State.RETURNING;
 }

 private void onReturning() {
 while (walkExact(RETURN_POSITION, 0) == false) {
 sleep(6000);
 }
 state = State.SHOOT;
 }

 private void waitForClickContinue() {
 int i = 0;
 sleep(300);
 while (searchInterfacesForText("Click here to continue").isEmpty()) {
 if (client.getMyPlayer().isUnderAttack()) {
 state = State.ESCAPE;
 return;
 }
 if (i >= 20) {
 return;
 }
 sleep(100);
 i++;
 }
 while (clickContinue() == false) {
 if (client.getMyPlayer().isUnderAttack()) {
 state = State.ESCAPE;
 return;
 }
 if (i > 25) {
 return;
 }
 sleep(500);
 i++
 }
 }

 private void waitForAccept() {
 int i = 0;
 sleep(300);
 while (searchInterfacesForText("Sure, I'll give it a go").isEmpty()) {
 if (client.getMyPlayer().isUnderAttack()) {
 state = State.ESCAPE;
 return;
 }
 if (i >= 20) {
 return;
 }
 sleep(100);
 i++;
 }
 while (accept() == false) {
 if (client.getMyPlayer().isUnderAttack()) {
 state = State.ESCAPE;
 return;
 }
 if (i >= 25) {
 return;
 }
 sleep(600);
 i++
 }
 }

 private boolean clickContinue() {
 return searchInterfacesForText("Click here to continue").get(0).interact("Continue");
 }

 private boolean accept() {
 return searchInterfacesForText("Sure, I'll give it a go").get(0).interact("Continue");
 }

 private void positionScreen() {
 while (!walkExact(RETURN_POSITION)) {
 sleep(500);
 }
 client.rotateCameraToAngle(330);
 client.rotateCameraPitch(22);
 }
        
         private Image getImage(String url) {
             try { return ImageIO.read(new URL(url)); }
 catch(IOException e) { return null; }
 }
     private String format(long totalSeconds) {
         long hours = totalSeconds/3600;
         long minutes = (totalSeconds-hours*3600)/60;
         long seconds = totalSeconds-(hours*3600+minutes*60);
        
         String hoursS = String.valueOf(hours);
         if (hours < 10)
             hoursS = "0" + hoursS;
        
         String minutesS = String.valueOf(minutes);
         if (minutes < 10)
             minutesS = "0" + minutesS;
        
         String secondsS = String.valueOf(seconds);
         if (seconds < 10)
             secondsS = "0" + secondsS;
        
         return hoursS+":"+minutesS+":"+secondsS;
     }
        
     public void onPaint(Graphics g) {
         g.drawImage(background, 8, 345, null);
 int rangedLvl = this.client.getSkills().getLevel(Skill.RANGED);
 int rangedExp = this.client.getSkills().getExperience(Skill.RANGED);       
        
 if ((System.currentTimeMillis()-this.lastExpCheck)>2000) {
 this.lastRangedExpPerHour = xpPerHour(rangedExp, this.startRangedExp);
 }
             if ((System.currentTimeMillis()-this.lastExpCheck)>2000) {
 this.rangedExpToLvl = xpToLvl(rangedLvl, rangedExp);
 }
         long runing = (System.currentTimeMillis()-this.startTime)/1000;
 long timeToRangedLevel = 0;
             if (this.lastRangedExpPerHour>0)
                 timeToRangedLevel = (this.rangedExpToLvl/this.lastRangedExpPerHour)*3600;
 g.setColor(Color.WHITE);
 g.setFont(g.getFont().deriveFont(10.0f));
 g.drawString("Rapidz' RangingGuilder - Version 1.1", 25, 365);
                  g.drawString("Ranged level: " + rangedLvl, 25, 395);
                  g.drawString("Time till next level: " + format(timeToRangedLevel), 25, 410);
                  g.drawString("Exp til next level: " + this.rangedExpToLvl, 25, 425);
                  g.drawString("XP/Hour: " + this.lastRangedExpPerHour, 25, 440);
                  g.drawString("Script has been running for: " + format(runing), 25, 455);
         }
         public void onExit() {
         long totalSeconds = (System.currentTimeMillis()-this.startTime)/1000;
         int hours = (int) (totalSeconds/360);
         int minutes = (int) ((totalSeconds-(hours*360))/60);
         int seconds = (int) (totalSeconds-((hours*360)+(minutes*60)));
         log("Thank you for using Rapidz' RangingGuilder!");
     }
 }

 

 

Save the script once replaced. Run script as normal.

 

 

*Should work as of now: Aug 12th, 2013.

 

I take no credit for anything done here. Just trying to help you guys out. Take care!

 

 

 

 

hmm i seem to gettin like 7k less exp an hour than i think I should be and i'm not sure why really.

 

Slowed down for anybody else? Would be nice to get it spam clicking properly 

Hey man sorry to be a noob, but how do i get this to work? when i download it its not in .jar form so it's not working. please help?

Its working fine for me. Just need to update the ID's. I've done it myself and here is how you can. Download the original script. Right click the script and select open with Notepad. Delete everything there. You will want to paste this instead:

import java.io.IOException;

 import java.net.URL;

 import org.osbot.script.ScriptManifest;

 import org.osbot.script.rs2.map.Position;

 import org.osbot.script.rs2.model.NPC;

 import org.osbot.script.rs2.model.RS2Object;

 import org.osbot.script.rs2.ui.RS2Interface;

 import org.osbot.script.rs2.ui.RS2InterfaceChild;

 import org.osbot.script.rs2.utility.Area;

 import org.osbot.script.rs2.Client;

 import javax.imageio.ImageIO;

 import java.awt.*;

 @ScriptManifest(name = "RangeGuilder", author = "Rapidz", version = 1.1D, info = "Next generation 07 RuneScape RangeGuilding script, stable and almost flawless.")

 public class RangeGuilder extends Script {

 Image background = getImage("http://i.imgur.com/Or2kp76.png");

     public long startTime; // Bot starting time

 private final static int JUDGE = 5963;

 private final static int TARGET = 19209;

 private final static int BRONZE_ARROW = 882;

 private final static int LADDER_UP = 2511;

 private final static int LADDER_DOWN = 2512;

 private final static int CAMELOT_TELEPORT = 8010;

 private final static Position RETURN_POSITION = new Position(2670, 3418, 0);

 public int startRangedExp;

 public int lastRangedExpPerHour;

 public int rangedExpToLvl;

     public long lastExpCheck;

 private enum State {

 SHOOT, EQUIP_ARROWS, TALK_TO_JUDGE, RETURNING, ESCAPE

 }

 private State state = State.SHOOT;

    

     private int xpToLvl(int level, int currentExp) {

         return Math.round(Math.round((((level+1)*(level)/8)+75*((Math.pow(2, (level+1)/7)-Math.pow(2, 1/7))/(Math.pow(2, 1/7)-1)))-currentExp));

     }

    

     private int xpPerHour(int currentExp, int startExp) {

         return Math.round((((currentExp-startExp)*3600)/((System.currentTimeMillis()-this.startTime)/1000)));

     }

 public void onStart() {

     positionScreen();

 log("Rapidz RangeGuilder - Version 1.1 Running");

 int rangedLvl = this.client.getSkills().getLevel(Skill.RANGED);

         int rangedExp = this.client.getSkills().getExperience(Skill.RANGED);

 this.startRangedExp = this.client.getSkills().getExperience(Skill.RANGED);

         this.startTime = System.currentTimeMillis();

         this.rangedExpToLvl = xpToLvl(rangedLvl, rangedExp);

 this.lastRangedExpPerHour = 0;

 this.lastExpCheck = System.currentTimeMillis();

 }

 public int onLoop() {

 switch(state) {

 case State.SHOOT:

 onShoot();

 break;

 case State.EQUIP_ARROWS:

 onEquip();

 break;

 case State.TALK_TO_JUDGE:

 onTalk();

 break;

 case State.ESCAPE:

 onEscape();

 break;

 case State.RETURNING:

 onReturning();

 break;

 }

 return 0;

 }

 public void onMessage(String message) {

 if (message == "You should probably be behind the hay bales." || message == "You've fired all your arrows, maybe you should talk to the Judge." || message == "Maybe you should ask before using those.") {

 state = State.RETURNING;

 }

 }

 private void onShoot() {

 if (searchInterfacesForText("Sorry, you may").isEmpty() && searchInterfacesForText("I suggest").isEmpty() && searchInterfacesForText("Well done").isEmpty()) {

 if (client.getMyPlayer().isUnderAttack()) {

 state = State.ESCAPE;

 return;

 } else if (client.getInterface(325) == null) {

 selectEntityOption(closestObject(TARGET), "Fire-at", true, false);

 sleep(1 + random(5));

 } else {

 selectInterfaceOption(325, 88, "Close", true);

 }

 }

 if (searchInterfacesForText("Sorry, you may").size() >= 1 || searchInterfacesForText("Well done").size() >= 1 ) {

 state = State.TALK_TO_JUDGE;

 } else if (searchInterfacesForText("I suggest").size() >= 1) {

 state = State.EQUIP_ARROWS;

 }

 }

 private void onTalk() {

 selectEntityOption(closestNPC(JUDGE), "Talk-to", false);

 sleep(300 + random(50));

 waitForClickContinue();

 sleep(600 + random(100));

 waitForAccept();

 sleep(600 + random(100));

 waitForClickContinue();

 sleep(600 + random(100));

 waitForClickContinue();

 sleep(500 + random(50))

 if (searchInterfacesForText("Oops,").size() >= 1) {

 log("Ran out of coins, stopped the script.")

 stop();

 }

 state = State.SHOOT;

 }

 private void onEquip() {

 selectInventoryOption(client.getInventory().getSlotForId(BRONZE_ARROW),"Wield");

 state = State.SHOOT;

 }

 private void onEscape() {

 selectEntityOption(closestObject(LADDER_UP), "Climb-up");

 while (client.getMyPlayer().getZ() == 0) {

 selectEntityOption(closestObject(LADDER_UP), "Climb-up");

 sleep(3000);

 }

 sleep(6000);

 while (client.getMyPlayer().getZ() == 2) {

 selectEntityOption(closestObject(LADDER_DOWN), "Climb-down")

 sleep(2000);

 }

 state = State.RETURNING;

 }

 private void onReturning() {

 while (walkExact(RETURN_POSITION, 0) == false) {

 sleep(6000);

 }

 state = State.SHOOT;

 }

 private void waitForClickContinue() {

 int i = 0;

 sleep(300);

 while (searchInterfacesForText("Click here to continue").isEmpty()) {

 if (client.getMyPlayer().isUnderAttack()) {

 state = State.ESCAPE;

 return;

 }

 if (i >= 20) {

 return;

 }

 sleep(100);

 i++;

 }

 while (clickContinue() == false) {

 if (client.getMyPlayer().isUnderAttack()) {

 state = State.ESCAPE;

 return;

 }

 if (i > 25) {

 return;

 }

 sleep(500);

 i++

 }

 }

 private void waitForAccept() {

 int i = 0;

 sleep(300);

 while (searchInterfacesForText("Sure, I'll give it a go").isEmpty()) {

 if (client.getMyPlayer().isUnderAttack()) {

 state = State.ESCAPE;

 return;

 }

 if (i >= 20) {

 return;

 }

 sleep(100);

 i++;

 }

 while (accept() == false) {

 if (client.getMyPlayer().isUnderAttack()) {

 state = State.ESCAPE;

 return;

 }

 if (i >= 25) {

 return;

 }

 sleep(600);

 i++

 }

 }

 private boolean clickContinue() {

 return searchInterfacesForText("Click here to continue").get(0).interact("Continue");

 }

 private boolean accept() {

 return searchInterfacesForText("Sure, I'll give it a go").get(0).interact("Continue");

 }

 private void positionScreen() {

 while (!walkExact(RETURN_POSITION)) {

 sleep(500);

 }

 client.rotateCameraToAngle(330);

 client.rotateCameraPitch(22);

 }

        

         private Image getImage(String url) {

             try { return ImageIO.read(new URL(url)); }

 catch(IOException e) { return null; }

 }

     private String format(long totalSeconds) {

         long hours = totalSeconds/3600;

         long minutes = (totalSeconds-hours*3600)/60;

         long seconds = totalSeconds-(hours*3600+minutes*60);

        

         String hoursS = String.valueOf(hours);

         if (hours < 10)

             hoursS = "0" + hoursS;

        

         String minutesS = String.valueOf(minutes);

         if (minutes < 10)

             minutesS = "0" + minutesS;

        

         String secondsS = String.valueOf(seconds);

         if (seconds < 10)

             secondsS = "0" + secondsS;

        

         return hoursS+":"+minutesS+":"+secondsS;

     }

        

     public void onPaint(Graphics g) {

         g.drawImage(background, 8, 345, null);

 int rangedLvl = this.client.getSkills().getLevel(Skill.RANGED);

 int rangedExp = this.client.getSkills().getExperience(Skill.RANGED);       

        

 if ((System.currentTimeMillis()-this.lastExpCheck)>2000) {

 this.lastRangedExpPerHour = xpPerHour(rangedExp, this.startRangedExp);

 }

             if ((System.currentTimeMillis()-this.lastExpCheck)>2000) {

 this.rangedExpToLvl = xpToLvl(rangedLvl, rangedExp);

 }

         long runing = (System.currentTimeMillis()-this.startTime)/1000;

 long timeToRangedLevel = 0;

             if (this.lastRangedExpPerHour>0)

                 timeToRangedLevel = (this.rangedExpToLvl/this.lastRangedExpPerHour)*3600;

 g.setColor(Color.WHITE);

 g.setFont(g.getFont().deriveFont(10.0f));

 g.drawString("Rapidz' RangingGuilder - Version 1.1", 25, 365);

                  g.drawString("Ranged level: " + rangedLvl, 25, 395);

                  g.drawString("Time till next level: " + format(timeToRangedLevel), 25, 410);

                  g.drawString("Exp til next level: " + this.rangedExpToLvl, 25, 425);

                  g.drawString("XP/Hour: " + this.lastRangedExpPerHour, 25, 440);

                  g.drawString("Script has been running for: " + format(runing), 25, 455);

         }

         public void onExit() {

         long totalSeconds = (System.currentTimeMillis()-this.startTime)/1000;

         int hours = (int) (totalSeconds/360);

         int minutes = (int) ((totalSeconds-(hours*360))/60);

         int seconds = (int) (totalSeconds-((hours*360)+(minutes*60)));

         log("Thank you for using Rapidz' RangingGuilder!");

     }

 }

 

 

Save the script once replaced. Run script as normal.

 

 

*Should work as of now: Aug 12th, 2013.

 

I take no credit for anything done here. Just trying to help you guys out. Take care!

omfg your a life saver love you!!!!!!!!!!!!!

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.