@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; }
@Override public boolean apply() { return Players.getLocal().isMoving(); }
@Override public boolean activate() { return !Inventory.isFull() && Methods.hasHatchet() && Players.getLocal().getAnimation() == -1; }
@Override public boolean apply() { return Players.getLocal().isMoving() || Players.getLocal().getAnimation() != -1; }