Beispiel #1
0
 @Override
 public int execute() {
   final GameObject g = Objects.get(TREE_PREDICATE);
   if (g != null) {
     if (g.isOnScreen()) {
       if (g.applyAction("Chop")) {
         Variables.status = "Chopping";
         Utilities.sleepNoException(500, 700);
         Utilities.sleepUntil(SLEEP, 2000);
       }
     } else {
       Variables.status = "Turning cam";
       Camera.turnTo(g);
       if (!g.isOnScreen()
           && Calculations.distance(Players.getLocal().getLocation(), MAPLE_TREE_TILE) >= 5) {
         Variables.status = "Walking tree";
         Walking.walkTo(MAPLE_TREE_TILE);
         Utilities.sleepNoException(500, 700);
         Utilities.sleepUntil(WALK_SLEEP, 2000);
       }
     }
   }
   return 1000;
 }