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.

Example Draynor Chopper Script

Featured Replies

I don't understand why your code is on one line it's rather silly. Not sure if it's the website but I've structured the code.

 

@ScriptManifest(name = "DraynorChopperPro", author = "Maxi", version = 1.0D, info="")
class DraynorChopperPro extends Script {
 
int bankId = 2213;
int[] treeIds = [5551, 5552, 5553, 1308];
enum State {
IDLE, CHOPPING, WALK_TO_BANK, PIN, BANKING, WALK_TO_WILLOWS
};
def state = State.IDLE;
def currentTree = null;
 
void onStart() {
if (client.getInventory().isFull())
state = State.WALK_TO_BANK;
}
 
int onLoop() {
switch (state) {
case State.IDLE:
return onIdle();
case State.CHOPPING:
return onChopping();
case State.WALK_TO_BANK:
return walkToBank();
case State.BANKING:
return bank();
case State.WALK_TO_WILLOWS:
return walkToWillows();
}
return 3000 + random(2000);
}
 
int onIdle() {
if (client.getInventory().isFull()) {
state = State.WALK_TO_BANK;
return 800 + gRandom(800, 400);
}
 
currentTree = closestObject(treeIds)
if(currentTree != null) {
log("Closest willow tree : (${currentTree.getX()}, ${currentTree.getY()})");
selectEntityOption(currentTree, "Chop down", "Willow");
if (random(5) == 0) {
client.moveCameraToEntity(currentTree);
sleep(700 + gRandom(500, 200));
}
}
return 1500 + gRandom(2000, 500);
}
 
int onChopping() {
if (client.getInventory().isFull()) {
state = State.WALK_TO_BANK;
return 800 + gRandom(800, 400);
}
 
if (random(30) == 0 && currentTree != null && currentTree.exists())
client.moveCameraToEntity(currentTree);
 
if (currentTree == null) {
state = State.IDLE;
log("Chopped down Willow!");
return 500 + gRandom(1000, 500);
}
 
if (!currentTree.exists()) {
state = State.IDLE;
currentTree = null;
log("Chopped down Willow!");
}
return 500 + gRandom(1000, 500);
}
 
int walkToBank() {
selectEntityOption(closestObject(bankId), "Bank", "Bank booth")
if (myX() <= 3087 && myX() >= 3096 && myY() >= 3248 && myY() <= 3240) {
return 800 + gRandom(500, 200);
}
sleep(1000 + gRandom(300, 50));
if (client.getBank().isOpen())
state = State.BANKING;
return 500 + gRandom(1000, 400);
}
 
int bank() {
client.getBank().depositAll();
state = State.WALK_TO_WILLOWS;
def tree = closestObject(treeIds);
return 500 + gRandom(700, 300);
}
 
int walkToWillows() {
log("Walking to Willow Trees");
currentTree = closestObject(treeIds);
if (currentTree != null) {
log("Closest willow tree : (${currentTree.getX()}, ${currentTree.getY()})");
selectEntityOption(currentTree, "Chop down", "Willow");
client.moveCameraToEntity(currentTree);
}
return 2000 + gRandom(800, 300);
}
 
void onMessage(String message) {
if (message == "You swing your axe at the tree.") {
log("Chopping down tree!");
state = State.CHOPPING;
} else if (message == "You get some logs.") {
state = State.IDLE;
} else if (message == "Your inventory is too full to hold any more logs.") {
state = State.WALK_TO_BANK;
}
}
 
}
  • 6 months later...

Outdated. If the author wishes to update, they can PM. I'm closing the thread and moving it to the outdated scripts section.

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.