Ejemplo n.º 1
0
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int cond = st.getCond();
   if (npcId == THEODRIC) {
     if (cond == 0) {
       if (st.getPlayer().getLevel() < 84) htmltext = "antharas_watchman_theodric_q10504_00.htm";
       else if (st.getQuestItemsCount(PORTAL_STONE) < 1)
         htmltext = "antharas_watchman_theodric_q10504_00a.htm";
       else if (st.isNowAvailable()) htmltext = "antharas_watchman_theodric_q10504_01.htm";
       else htmltext = "antharas_watchman_theodric_q10504_09.htm";
     } else if (cond == 1) {
       if (st.getQuestItemsCount(CLEAR_CRYSTAL) < 1) {
         htmltext = "antharas_watchman_theodric_q10504_08.htm";
         st.giveItems(CLEAR_CRYSTAL, 1);
       } else htmltext = "antharas_watchman_theodric_q10504_05.htm";
     } else if (cond == 2) {
       if (st.getQuestItemsCount(FILLED_CRYSTAL_ANTHARAS) >= 1) {
         htmltext = "antharas_watchman_theodric_q10504_07.htm";
         st.takeAllItems(FILLED_CRYSTAL_ANTHARAS);
         st.giveItems(JEWEL_OF_ANTHARAS, 1);
         st.playSound(SOUND_FINISH);
         st.exitCurrentQuest(this);
       } else htmltext = "antharas_watchman_theodric_q10504_06.htm";
     }
   }
   return htmltext;
 }
Ejemplo n.º 2
0
  @Override
  public String onKill(NpcInstance npc, QuestState st) {
    int npcId = npc.getNpcId();
    int cond = st.getCond();

    if (cond == 1 && npcId == ULTIMATE_ANTHARAS) {
      st.takeAllItems(CLEAR_CRYSTAL);
      st.giveItems(FILLED_CRYSTAL_ANTHARAS, 1);
      st.setCond(2);
    }
    return null;
  }