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.

[HELP] Basic woodcutting script

Featured Replies

So I made a simple script that cuts oaks at Draynor, walks to the bank and banks the logs.

I'm trying to have the script chop Oak in my own defined area that only contains one Oak tree, the area I defined to chop Oak in also contains 2 normal tree's.

My goal is to have the script chop Oak but if the Oak is chopped down as a secondary task it will chop down the tree's within the area until the oak respawns.

Currently using the following code that does not work as I'm sure the order is completely wrong:

private void chop() throws InterruptedException {
    RS2Object Oak = getObjects().closest(choppingGround, "Oak");
    RS2Object Tree = getObjects().closest(choppingGround, "Tree");

    if (readyToCut() && Oak != null) {
        sleep(random(150, 3000));
        Oak.interact("Chop Down");
        log("Chopping oak.");
        sleep(random(650, 800));
        getMouse().moveOutsideScreen();
    } else if (readyToCut() && Oak == null && Tree != null) {
        sleep(random(150, 3000));
        Tree.interact("Chop Down");
        log("Chopping tree.");
        sleep(random(600, 800));
        getMouse().moveOutsideScreen();
        new ConditionalSleep(2300) {
            @Override
            public boolean condition() {
                return myPlayer().isAnimating();
            }
        }.sleep();
    } else if (!choppingGround.contains(myPlayer())) {
        log("walking back to tree's.");
        getWalking().webWalk(choppingGround);
    }

}

 

Edited by Vogelbekdier

If (!getbank.isopen) {

Getbank.open;

} else if (getbank.isopen && getinventory.contains ("Willow logs") {

Getbank.depositall ("Willow logs");

 

Something like this should work. If not remove the else and just use if. Writing off phone so can't confirm.

6 minutes ago, Vogelbekdier said:

So I made a simple script that cuts willows at Draynor, walks to the bank and banks the logs.

To bank the logs I'm using


if(getInventory().contains("Willow logs") && bank.isOpen()) {
    getBank().depositAll(); }

It opens the bank just fine and everything is working but for some reason, it won't bank the willow logs.

Have you remembered to click refresh before running it?

  • Author
3 minutes ago, FuryShark said:

Have you remembered to click refresh before running it?

I did but wasn't working however, I just deleted and recompiled the script and restarted the client and everything is working fine now! Thank you.

Just curious but why cut reg tree's past lvl 15 woodcutting? Look around for an unpopular spot that has 3 or more oaks with bank relatively close by and chop/bank for $'s and decent lvls.

Create an account or sign in to comment

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.