Jump to content

Bloody powerchopper


Recommended Posts

Posted (edited)

Looks good but you might want to add some conditional sleeps for cutting the tree, otherwise it looks like its going to keep randomly clicking on the tree even if its still chopping it down.

 

something like

else if(tree != null && !myPlayer().isAnimating()){
    log("Chopping...");
    if(tree.interact("Chop down")){
        new ConditionalSleep(10000, 600) {
            @Override
            public boolean condition() throws InterruptedException {
                return !myPlayer().isAnimating() && !myPlayer().isMoving() &&
                        !tree.exists();
            }
        }.sleep();
    }
}
Edited by skillerkidos1
Posted
56 minutes ago, skillerkidos1 said:

Looks good but you might want to add some conditional sleeps for cutting the tree, otherwise it looks like its going to keep randomly clicking on the tree even if its still chopping it down.

 

something like

else if(tree != null && !myPlayer().isAnimating()){
    log("Chopping...");
    if(tree.interact("Chop down")){
        new ConditionalSleep(10000, 600) {
            @Override
            public boolean condition() throws InterruptedException {
                return !myPlayer().isAnimating() && !myPlayer().isMoving() &&
                        !tree.exists();
            }
        }.sleep();
    }
}

 

if(getInventory().dropAll("logs")){
    new ConditionalSleep(10000, 600) {
        @Override
        public boolean condition() throws InterruptedException {
            return !getInventory().contains("logs");
        }
    }.sleep();
}

Yeah I saw that but I couldnt find out how to create them, thank you very much for your help :D

57 minutes ago, skillerkidos1 said:

Looks good but you might want to add some conditional sleeps for cutting the tree, otherwise it looks like its going to keep randomly clicking on the tree even if its still chopping it down.

 

something like

else if(tree != null && !myPlayer().isAnimating()){
    log("Chopping...");
    if(tree.interact("Chop down")){
        new ConditionalSleep(10000, 600) {
            @Override
            public boolean condition() throws InterruptedException {
                return !myPlayer().isAnimating() && !myPlayer().isMoving() &&
                        !tree.exists();
            }
        }.sleep();
    }
}

 

if(getInventory().dropAll("logs")){
    new ConditionalSleep(10000, 600) {
        @Override
        public boolean condition() throws InterruptedException {
            return !getInventory().contains("logs");
        }
    }.sleep();
}

So you type in the bigger value first and the lower as 2nd? kinda weird but thank you.

  • 5 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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