예제 #1
0
  public void makeSubQuests() {
    Player player = getSelf();
    if (player == null) {
      return;
    }
    Quest q = QuestManager.getQuest(_234_FatesWhisper.class);
    QuestState qs = player.getQuestState(q.getClass());
    if (qs != null) {
      qs.exitCurrentQuest(true);
    }
    q.newQuestState(player, Quest.COMPLETED);

    if (player.getRace() == Race.kamael) {
      q = QuestManager.getQuest("_236_SeedsOfChaos");
      qs = player.getQuestState(q.getClass());
      if (qs != null) {
        qs.exitCurrentQuest(true);
      }
      q.newQuestState(player, Quest.COMPLETED);
    } else {
      q = QuestManager.getQuest("_235_MimirsElixir");
      qs = player.getQuestState(q.getClass());
      if (qs != null) {
        qs.exitCurrentQuest(true);
      }
      q.newQuestState(player, Quest.COMPLETED);
    }
  }
예제 #2
0
  @SuppressWarnings("rawtypes")
  @Override
  public boolean useAdminCommand(
      Enum comm, String[] wordList, String fullString, Player activeChar) {
    Commands command = (Commands) comm;

    if (!activeChar.getPlayerAccess().CanEditCharAll) return false;

    switch (command) {
      case admin_quests:
        return ShowQuestList(getTargetChar(wordList, 1, activeChar), activeChar);

      case admin_quest:
        if (wordList.length < 2) {
          activeChar.sendMessage("USAGE: //quest id|name [SHOW|STATE|VAR|CLEAR] ...");
          return true;
        }
        Quest _quest = QuestManager.getQuest2(wordList[1]);
        if (_quest == null) {
          activeChar.sendMessage("Quest " + wordList[1] + " undefined");
          return true;
        }
        if (wordList.length < 3 || wordList[2].equalsIgnoreCase("SHOW"))
          return cmd_Show(_quest, wordList, activeChar);
        if (wordList[2].equalsIgnoreCase("STATE")) return cmd_State(_quest, wordList, activeChar);
        if (wordList[2].equalsIgnoreCase("VAR")) return cmd_Var(_quest, wordList, activeChar);
        if (wordList[2].equalsIgnoreCase("CLEAR")) return cmd_Clear(_quest, wordList, activeChar);
        return cmd_Show(_quest, wordList, activeChar);
    }
    return true;
  }