Advertisement
Guest User

Untitled

a guest
May 24th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. @Override
  2. public void onStart() {
  3. log("walking to woodcutting area");
  4. final Area area = new Area(3230, 3509, 3239, 3515);
  5. if (area.contains(myPosition())) {
  6. }
  7. else getWalking().walk(area);
  8. log("Starting to woodcut");
  9.  
  10. }
  11.  
  12. @Override
  13. public int onLoop() throws InterruptedException {
  14. final Area area = new Area(3230, 3509, 3239, 3515);
  15. if (area.contains(myPosition())) {
  16. }
  17. else log("returning to woodcuttingarea");
  18. getWalking().walk(area);
  19. sleep(500);
  20. Entity tree = getObjects().closest("Tree");
  21. if (getInventory().isFull()) {
  22. getInventory().dropAll();
  23. sleep(500);
  24. } else if (tree != null && !myPlayer().isAnimating() && !myPlayer().isMoving()) {
  25. tree.interact("Chop down");
  26. sleep(500);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement