@Override
  public void onBypassFeedback(Player player, String command) {
    if (!canBypassCheck(player, this)) {
      return;
    }

    if (command.equalsIgnoreCase("request_coralg")) {
      ReflectionUtils.simpleEnterInstancedZone(player, CrystalCaverns.class, 10);
    } else {
      super.onBypassFeedback(player, command);
    }
  }
示例#2
0
  @Override
  public void onBypassFeedback(Player player, String command) {
    if (command.equals("teleport")) {
      showChatWindow(player, "event/monastyre/minigame_instructor006.htm");
    } else if (command.equals("teleport1")) {
      switch (getAISpawnParam()) {
        case 1:
          player.teleToLocation(110705, -81328, -1600);
          break;
        case 2:
          player.teleToLocation(114866, -71627, -560);
          break;
      }
    } else if (command.equals("teleport2")) {
      player.teleToLocation(110712, -81352, -2688);
    } else if (command.equals("start")) {
      if (player.getInventory().getCountOf(15540) == 0) {
        showChatWindow(player, "event/monastyre/minigame_instructor005.htm");
      } else if (c_ai1 != player) {
        showChatWindow(player, "event/monastyre/minigame_instructor004.htm");
      } else if (c_ai1 == player) {
        switch (getAISpawnParam()) {
          case 1:
            if (HURRY_UP_1 != null) {
              HURRY_UP_1.cancel(false);
              HURRY_UP_1 = null;
            }
            if (HURRY_UP2_1 != null) {
              HURRY_UP2_1.cancel(false);
              HURRY_UP2_1 = null;
            }
            break;
          case 2:
            if (HURRY_UP_2 != null) {
              HURRY_UP_2.cancel(false);
              HURRY_UP_2 = null;
            }
            if (HURRY_UP2_2 != null) {
              HURRY_UP2_2.cancel(false);
              HURRY_UP2_2 = null;
            }
            break;
        }

        player.getInventory().destroyItemByItemId(15540, 1);
        player.getInventory().addItem(15485, 1);
        Functions.npcShout(this, NpcString.FURNFACE1);
        i_ai1 = Rnd.get(9) + 1;
        i_ai2 = Rnd.get(9) + 1;
        i_ai3 = Rnd.get(9) + 1;
        i_ai4 = Rnd.get(9) + 1;
        i_ai5 = Rnd.get(9) + 1;
        i_ai6 = Rnd.get(9) + 1;
        i_ai7 = Rnd.get(9) + 1;
        i_ai8 = Rnd.get(9) + 1;
        i_ai9 = Rnd.get(9) + 1;
        c_ai0 = player;
        if (i_quest9 == 1) {}

        switch (getAISpawnParam()) {
          case 1:
            HURRY_UP_1 = ThreadPoolManager.getInstance().schedule(new HURRY_UP(), 2 * 60 * 1000);
            break;
          case 2:
            HURRY_UP_2 = ThreadPoolManager.getInstance().schedule(new HURRY_UP(), 2 * 60 * 1000);
            break;
        }
        GAME_TIME =
            ThreadPoolManager.getInstance().schedule(new GAME_TIME(), 3 * 60 * 1000 + 10 * 1000);
        TIMER_0 = ThreadPoolManager.getInstance().schedule(new TIMER_0(), 1 * 1000);
      } else if (command.equals("restart")) {
        i_quest1 = 1;
        i_ai1 = Rnd.get(9) + 1;
        i_ai2 = Rnd.get(9) + 1;
        i_ai3 = Rnd.get(9) + 1;
        i_ai4 = Rnd.get(9) + 1;
        i_ai5 = Rnd.get(9) + 1;
        i_ai6 = Rnd.get(9) + 1;
        i_ai7 = Rnd.get(9) + 1;
        i_ai8 = Rnd.get(9) + 1;
        i_ai9 = Rnd.get(9) + 1;
        c_ai0 = player;
        if (i_quest9 == 1) {}
        TIMER_0 = ThreadPoolManager.getInstance().schedule(new TIMER_0(), 1 * 1000);
      }
    } else {
      super.onBypassFeedback(player, command);
    }
  }