@Override
  public String onTalk(NpcInstance npc, QuestState st) {
    String htmltext = "noquest";
    int cond = st.getCond();
    if (npc.getNpcId() == Roderik) {
      switch (st.getState()) {
        case CREATED:
          if (st.getPlayer().getLevel() >= 95) {
            if (st.isNowAvailableByTime()) {
              htmltext = "30631.htm";
            } else {
              htmltext = "30631-0.htm";
            }
          } else {
            htmltext = "lvl.htm";
            st.exitCurrentQuest(true);
          }
          break;
        case STARTED:
          if (cond == 1) {
            htmltext = "30631-3.htm";
          } else if (cond == 2) {
            htmltext = "30631-4.htm";
          }
          break;
      }
    }

    return htmltext;
  }
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int cond = st.getCond();
   int id = st.getState();
   Player player = st.getPlayer();
   if (npcId == CROOP) {
     if (id == CREATED && player.getLevel() >= 79) {
       htmltext = "30676-01.htm";
     } else if (cond == 1) {
       htmltext = "30676-04.htm";
     } else if (cond == 2) {
       htmltext = "30676-05.htm";
       st.setCond(3);
       st.playSound(SOUND_MIDDLE);
       st.giveItems(CROOP_INTRO, 1);
     } else if (cond >= 3 && cond <= 5) {
       htmltext = "30676-06.htm";
     } else if (cond == 6) {
       htmltext = "30676-07.htm";
     } else if (id == COMPLETED) {
       htmltext = "30676-13.htm";
     } else if (player.getLevel() < 79) {
       htmltext = "30676-00.htm";
       st.exitCurrentQuest(true);
     }
   } else if (npcId == HECTOR) {
     if (cond == 3) {
       htmltext = "30197-01.htm";
     }
     if (cond >= 4 && cond <= 7) {
       htmltext = "30197-04.htm";
     }
   } else if (npcId == STAN) {
     if (cond == 4) {
       htmltext = "30200-01.htm";
     }
     if (cond >= 5 && cond <= 7) {
       htmltext = "30200-05.htm";
     }
   } else if (npcId == CORPSE) {
     if (cond == 5) {
       htmltext = "32568-01.htm";
     }
   } else if (npcId == HOLLINT) {
     if (cond == 7) {
       htmltext = "30191-01.htm";
     }
   }
   return htmltext;
 }
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int id = st.getState();
   int cond = st.getCond();
   if (id == COMPLETED) {
     htmltext = "completed";
   } else if (npcId == MOIRA) {
     if (id == CREATED) {
       if (st.getPlayer().getLevel() >= 40) {
         htmltext = "seer_moirase_q0113_0101.htm";
       } else {
         htmltext = "seer_moirase_q0113_0103.htm";
         st.exitCurrentQuest(true);
       }
     } else if (cond == 1) {
       htmltext = "seer_moirase_q0113_0105.htm";
     }
   } else if (npcId == TORRANT && st.getQuestItemsCount(BOX) == 1) {
     htmltext = "torant_q0113_0101.htm";
   }
   return htmltext;
 }
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int cond = st.getCond();
   int id = st.getState();
   Player player = st.getPlayer();
   if (npcId == DISURVIVOR) {
     if (cond == 0) {
       if (player.getLevel() < 61 || player.getLevel() > 67) {
         htmltext = "32498-no.htm";
         st.exitCurrentQuest(true);
       } else {
         return "32498-01.htm";
       }
     } else if (id == COMPLETED) {
       htmltext = "32498-no.htm";
     } else if (cond == 1 || cond == 2) {
       htmltext = "32498-06.htm";
     } else {
       htmltext = "32498-07.htm";
     }
   } else if (npcId == SUPPORTER) {
     if (cond == 1 || cond == 2) {
       htmltext = "32501-01.htm";
     } else {
       htmltext = "32501-04.htm";
     }
   } else if (npcId == DADVENTURER) {
     if (st.getQuestItemsCount(SWORD) > 0 && st.getQuestItemsCount(KDROP) == 0) {
       htmltext = "32508-01.htm";
     }
     if (st.getQuestItemsCount(ENCHSWORD) > 0 && st.getQuestItemsCount(ADROP) == 0) {
       htmltext = "32508-01.htm";
     }
     if (st.getQuestItemsCount(SWORD) == 0 && st.getQuestItemsCount(KDROP) > 0) {
       htmltext = "32508-05.htm";
     }
     if (st.getQuestItemsCount(ENCHSWORD) == 0 && st.getQuestItemsCount(ADROP) > 0) {
       htmltext = "32508-05.htm";
     }
     if (st.getQuestItemsCount(SWORD) == 0 && st.getQuestItemsCount(ENCHSWORD) == 0) {
       htmltext = "32508-05.htm";
     }
     if (st.getQuestItemsCount(KDROP) == 0 && st.getQuestItemsCount(ADROP) == 0) {
       htmltext = "32508-01.htm";
     }
     if (player.getPets() != null) {
       htmltext = "32508-04.htm";
     }
     if (st.getQuestItemsCount(SWORD) > 0 && st.getQuestItemsCount(KDROP) > 0) {
       st.takeItems(SWORD, 1);
       st.takeItems(KDROP, 1);
       st.giveItems(ENCHSWORD, 1);
       htmltext = "32508-02.htm";
     }
     if (st.getQuestItemsCount(ENCHSWORD) > 0 && st.getQuestItemsCount(ADROP) > 0) {
       st.takeItems(ENCHSWORD, 1);
       st.takeItems(ADROP, 1);
       st.giveItems(LASTSWORD, 1);
       htmltext = "32508-03.htm";
     }
     if (st.getQuestItemsCount(LASTSWORD) > 0) {
       htmltext = "32508-03.htm";
     }
   } else if (npcId == DADVENTURER2) {
     if (cond == 4) {
       // if(player.getPets() != null)
       // htmltext = "32511-03.htm";
       // if(player.getPets() == null)
       // {
       st.giveItems(ScrollOfEscape, 1);
       st.giveItems(PBRACELET, 1);
       st.giveItems(57, 411500);
       st.addExpAndSp(4010000, 1235000);
       st.setCond(5);
       st.setState(COMPLETED);
       st.playSound(SOUND_FINISH);
       st.exitCurrentQuest(false);
       player.getReflection().startCollapseTimer(60000);
       htmltext = "32511-01.htm";
       // }
     } else if (id == COMPLETED) {
       htmltext = "32511-02.htm";
     }
   }
   return htmltext;
 }