@Override public void walkToMine(Area... destL) { LocatableEntityQueryResults<GameObject> doors = GameObjects.getLoaded(exit); if (doors.size() > 0) { GameObject door = doors.nearestTo(new Coordinate(1040, 4576, 0)); if (door.getVisibility() <= 10) { Camera.turnTo(door); } else { door.click(); if (Camera.getPitch() <= 0.3) { if (Random.nextBoolean()) { Camera.concurrentlyTurnTo(Random.nextDouble(0.4, 0.7)); } else { Camera.concurrentlyTurnTo(Random.nextInt(0, 360)); } } Timer timer = new Timer(Random.nextInt(2000, 4000)); timer.start(); while (timer.getRemainingTime() > 0 && !inMine()) { Execution.delay(10); } } } }
@Override public void walkToBank(boolean walk, Area... destL) { LocatableEntityQueryResults<GameObject> doors = GameObjects.getLoaded(entrance); if (doors.size() > 0) { GameObject door = doors.nearestTo(new Coordinate(3033, 9772, 0)); if (door.getVisibility() <= 10) { Camera.turnTo(door); } else { door.click(); if (Camera.getPitch() <= 0.3) { Camera.concurrentlyTurnTo(Random.nextDouble(0.4, 0.7)); } Timer timer = new Timer(Random.nextInt(3000, 5000)); timer.start(); while (timer.getRemainingTime() > 0 && !inBank()) { Execution.delay(10); } } } }