@Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   if (event.equalsIgnoreCase("30956_2.htm")) {
     st.setCond(1);
     st.setState(STARTED);
     st.playSound(SOUND_ACCEPT);
     st.takeItems(EVENT_CLOTHES, -1);
     st.takeItems(NANARINS_FLUTE, -1);
     st.takeItems(SABRINS_BLACK_BEER, -1);
   } else if (event.equalsIgnoreCase("30956_4.htm")) {
     st.giveItems(NANARINS_FLUTE, 1);
     st.playSound(SOUND_MIDDLE);
     st.setCond(3);
   } else if (event.equalsIgnoreCase("answer1")) {
     st.giveItems(EVENT_CLOTHES, 1);
     st.playSound(SOUND_MIDDLE);
     st.setCond(3);
     htmltext = "30956_6.htm";
   } else if (event.equalsIgnoreCase("answer2")) {
     st.giveItems(SABRINS_BLACK_BEER, 1);
     st.playSound(SOUND_MIDDLE);
     st.setCond(3);
     htmltext = "30956_6.htm";
   } else if (event.equalsIgnoreCase("30956_7.htm")) {
     st.giveItems(Musical_Score, 1);
     st.playSound(SOUND_FINISH);
     st.exitCurrentQuest(true);
   }
   return htmltext;
 }
Exemplo n.º 2
0
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   if (event.equalsIgnoreCase("30631-3.htm")) {
     st.setState(STARTED);
     st.setCond(1);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("30631-5.htm")) {
     st.getPlayer().addExpAndSp(600000000, 0);
     st.takeItems(Deadmans_Flesh, 40);
     st.unset(SCALDISECT_KILL);
     st.setState(COMPLETED);
     st.playSound(SOUND_FINISH);
     st.exitCurrentQuest(this);
   }
   return htmltext;
 }
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   Player player = st.getPlayer();
   String htmltext = event;
   if (event.equalsIgnoreCase("30676-03.htm")) {
     st.setCond(1);
     st.setState(STARTED);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("8")) {
     st.setCond(2);
     st.playSound(SOUND_MIDDLE);
     player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ_SUSPICIOUS_DEATH);
     return "";
   } else if (event.equalsIgnoreCase("30197-03.htm")) {
     st.setCond(4);
     st.takeItems(CROOP_INTRO, 1);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("30200-04.htm")) {
     st.setCond(5);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("32568-02.htm")) {
     st.setCond(6);
     st.giveItems(JACOB_NECK, 1);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("30676-12.htm")) {
     st.setCond(7);
     st.takeItems(JACOB_NECK, 1);
     st.giveItems(CROOP_LETTER, 1);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("30191-03.htm")) {
     if (player.getLevel() < 79) {
       htmltext =
           "<html><body>Only characters who are <font color=\"LEVEL\">level 79</font> or higher may complete this quest.</body></html>";
     } else if (player.getBaseClassId() == player.getActiveClassId()) {
       st.addExpAndSp(10000000, 2500000);
       st.setState(COMPLETED);
       st.exitCurrentQuest(false);
       st.playSound(SOUND_FINISH);
     } else {
       return "subclass_forbidden.htm";
     }
   }
   return htmltext;
 }
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   if (event.equalsIgnoreCase("seer_moirase_q0113_0104.htm")) {
     st.setCond(1);
     st.giveItems(BOX, 1);
     st.setState(STARTED);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("torant_q0113_0201.htm")) {
     st.giveItems(ADENA_ID, 154800);
     st.addExpAndSp(619300, 44200);
     st.takeItems(BOX, 1);
     st.playSound(SOUND_FINISH);
     st.exitCurrentQuest(false);
   }
   return htmltext;
 }
Exemplo n.º 5
0
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   Player player = st.getPlayer();
   String htmltext = event;
   if (event.equalsIgnoreCase("Enter")) {
     enterInstance(player);
     return null;
   } else if (event.equalsIgnoreCase("32498-02.htm")) {
     st.setCond(1);
     st.setState(STARTED);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("32498-05.htm")) {
     st.setCond(2);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("32501-03.htm")) {
     st.setCond(3);
     st.playSound(SOUND_MIDDLE);
     st.giveItems(SWORD, 1);
   }
   return htmltext;
 }
Exemplo n.º 6
0
 @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;
 }
Exemplo n.º 7
0
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   int cond = st.getCond();
   if (event.equalsIgnoreCase("take_test") && cond == 0) {
     QuestState GoodDayToFly = st.getPlayer().getQuestState(_10273_GoodDayToFly.class);
     if (GoodDayToFly != null && GoodDayToFly.isCompleted()) {
       st.setCond(2);
       st.setState(STARTED);
       st.playSound(SOUND_ACCEPT);
       htmltext = "dilios_q692_4.htm";
     } else {
       st.setCond(1);
       st.setState(STARTED);
       st.playSound(SOUND_ACCEPT);
       htmltext = "dilios_q692_3.htm";
     }
   } else if (event.equalsIgnoreCase("lekon_q692_2.htm") && cond == 1) {
     st.exitCurrentQuest(true);
   } else if (event.equalsIgnoreCase("kutran_q692_2.htm") && cond == 2) {
     st.setCond(3);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("exchange_sod") && cond == 3) {
     if (st.getQuestItemsCount(FleetSteedTroupsTotem) < 5) {
       htmltext = "kutran_q692_7.htm";
     } else {
       int _charmstogive = Math.round(st.getQuestItemsCount(FleetSteedTroupsTotem) / 5);
       st.takeItems(FleetSteedTroupsTotem, 5 * _charmstogive);
       st.giveItems(FleetSteedTroupsCharm, _charmstogive);
       htmltext = "kutran_q692_4.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_soi") && cond == 3) {
     if (st.getQuestItemsCount(NucleusofanIncompleteSoul) < 5) {
       htmltext = "kutran_q692_7.htm";
     } else {
       int _soulstogive = Math.round(st.getQuestItemsCount(NucleusofanIncompleteSoul) / 5);
       st.takeItems(NucleusofanIncompleteSoul, 5 * _soulstogive);
       st.giveItems(NucleusofaFreedSoul, _soulstogive);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_soa") && cond == 3) {
     if (st.getQuestItemsCount(SpiritStoneDust) < 5) {
       htmltext = "kutran_q692_7.htm";
     } else {
       int _soulstogive = Math.round(st.getQuestItemsCount(SpiritStoneDust) / 5);
       st.takeItems(SpiritStoneDust, 5 * _soulstogive);
       st.giveItems(SpiritStoneFragment, _soulstogive);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_breath") && cond == 3) {
     if (st.getQuestItemsCount(BreathofTiat) == 0) {
       htmltext = "kutran_q692_7.htm";
     } else {
       st.giveItems(ADENA_ID, st.getQuestItemsCount(BreathofTiat) * 2500);
       st.takeItems(BreathofTiat, -1);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_portion") && cond == 3) {
     if (st.getQuestItemsCount(PortionofaSoul) == 0) {
       htmltext = "kutran_q692_7.htm";
     } else {
       st.giveItems(ADENA_ID, st.getQuestItemsCount(PortionofaSoul) * 2500);
       st.takeItems(PortionofaSoul, -1);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_energy") && cond == 3) {
     if (st.getQuestItemsCount(ConcentratedSpiritEnergy) == 0) {
       htmltext = "kutran_q692_7.htm";
     } else {
       st.giveItems(ADENA_ID, st.getQuestItemsCount(ConcentratedSpiritEnergy) * 25000);
       st.takeItems(ConcentratedSpiritEnergy, -1);
       htmltext = "kutran_q692_5.htm";
     }
   }
   return htmltext;
 }