Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onStart() {
- log("walking to woodcutting area");
- final Area area = new Area(3230, 3509, 3239, 3515);
- if (area.contains(myPosition())) {
- }
- else getWalking().walk(area);
- log("Starting to woodcut");
- }
- @Override
- public int onLoop() throws InterruptedException {
- final Area area = new Area(3230, 3509, 3239, 3515);
- if (area.contains(myPosition())) {
- }
- else log("returning to woodcuttingarea");
- getWalking().walk(area);
- sleep(500);
- Entity tree = getObjects().closest("Tree");
- if (getInventory().isFull()) {
- getInventory().dropAll();
- sleep(500);
- } else if (tree != null && !myPlayer().isAnimating() && !myPlayer().isMoving()) {
- tree.interact("Chop down");
- sleep(500);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement