Example #1
0
  @Override
  public void execute() {
    volunteer.interact("Lure");

    if (Execution.delayUntil(() -> ChatDialog.getContinue() != null, 1200, 1600)) {
      Keyboard.type(" ", false);

      Execution.delay(800, 1300);

      if (Execution.delayUntil(() -> ChatDialog.getContinue() != null, 1200, 1600)) {
        Keyboard.type(" ", false);
      } else {
        return;
      }
    } else {
      return;
    }

    CExecution.delayUntil(
        () -> volunteer.interact("Knock-out"), Random.nextInt(700, 1000), 3000, 4000);

    Execution.delayUntil(() -> volunteer.getAnimationId() == 12413, 3000, 4000);

    while (volunteer.getAnimationId() == 12413) {
      volunteer.interact("Loot");
      Execution.delay(580, 735);
    }
  }
  @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);
        }
      }
    }
  }
Example #3
0
  @Override
  public void execute() {
    timer = new Timer(Random.nextInt(120000, 220000));
    timer.start();

    GameObject harp = GameObjects.newQuery().models(1276535684).results().nearest();

    CMouse.fastInteract(harp, "Play");

    Execution.delay(600, 1000);
  }
  @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);
        }
      }
    }
  }