Jump to content

1-20 Woodcutting [Tree's]


Imthabawse

Recommended Posts

Simple Woodcutter

 

- Start script right off Tutorial Island once you've banked everything and are wielding Bronze Axe

- Script will get you 1-20 Woodcutting and then Log Out

- Runs to safe spot to continue to cut trees if attacked

- Banks logs for burning later

Download

ChopnBank

Source

Spoiler

import org.osbot.rs07.api.map.Area;
import org.osbot.rs07.api.map.constants.Banks;
import org.osbot.rs07.api.model.RS2Object;
import org.osbot.rs07.api.ui.Skill;
import org.osbot.rs07.script.Script;
import org.osbot.rs07.script.ScriptManifest;
import org.osbot.rs07.utility.ConditionalSleep;


@ScriptManifest(author = "Imthabawse", info = "Chop N Bank Tree's for burning later!", logo = "", name = "Chop N Burn", version = 1)

public class ChopnBurn extends Script { // Overwrote my ChopnBurn


    private Area treeArea = new Area(3158, 3230, 3179, 3213);
    private Area escapeArea = new Area(3136, 3259, 3156, 3240);


    @Override
    public int onLoop() throws InterruptedException {
    RS2Object tree = getObjects().closest("Tree");

        if(!myPlayer().isAnimating() && !getInventory().isFull() && tree != null && !myPlayer().isUnderAttack() && tree.hasAction("Chop down") && !Banks.LUMBRIDGE_UPPER.contains(myPlayer()) && getMap().canReach(tree) && !getDialogues().isPendingContinuation() && getSkills().getStatic(Skill.WOODCUTTING) < 20) {
            log("Chopping!");
            tree.interact("Chop down");
            new ConditionalSleep(5000) {
                @Override
                public boolean condition() {
                    return myPlayer().isAnimating();
                }
            }.sleep();
        }else if(getInventory().isFull() && !myPlayer().isAnimating() && !Banks.LUMBRIDGE_UPPER.contains(myPlayer())) {
            log("Walking to bank logs for burning later!");
            getWalking().webWalk(Banks.LUMBRIDGE_UPPER);
            new ConditionalSleep(10000) {
                @Override
                public boolean condition() {
                    return Banks.LUMBRIDGE_UPPER.contains(myPlayer());
                }
            }.sleep();
        }else if(Banks.LUMBRIDGE_UPPER.contains(myPlayer()) && getInventory().isFull()) {
            log("Banking logs!");
            getBank().open();
            sleep(random(345,450));
            getBank().depositAll("Logs");
            sleep(random(355,455));
            getBank().close();
            sleep(random(255,300));
        }else if(!getInventory().contains("Logs") && Banks.LUMBRIDGE_UPPER.contains(myPlayer())) {
            log("Let's get back to cutting!");
            getWalking().webWalk(treeArea);
        }else if(myPlayer().isUnderAttack()) {
            log("Escaping attacker!");
            getWalking().webWalk(escapeArea);
        }else if(getDialogues().isPendingContinuation()) {
            log("Level'd up!");
            getDialogues().clickContinue();
            sleep(random(200,225));
        }else if(getSkills().getStatic(Skill.WOODCUTTING) == 20) {
           sleep(random(250,500));
            log("Level 20 reached! Stopping script.");
            stop();
        }

        return(random(500,1000));
    }
}

 

Edited by Imthabawse
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...