Jump to content

Bloody powerchopper


BloodyNoah

Recommended Posts

Chops normal trees and drops the logs, you need to have a axe equipped or in the inventory.

 

This is my first script so please dont expect anything good. 

 

Please report any bugs to me.

 

DOWNLOAD: https://github.com/BloodyNoah/Bloody-powerchopper

SOURCE: https://github.com/BloodyNoah/BloodyTreeChopperSource

Edited by BloodyNoah
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

1 hour ago, BloodyNoah said:

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

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

first number is max time to sleep before waking up, 2nd number is how often it checks so 600 is every game tick

 

  • Heart 1
Link to comment
Share on other sites

  • 5 months later...

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...