@Override public String onKill(NpcInstance npc, QuestState st) { int npcId = npc.getNpcId(); int cond = st.getCond(); if (cond == 3 && ArrayUtils.contains(MOBS_1, npcId) && Rnd.chance(70)) { st.giveItems(ELCARDIAS_MARK, 1); if (st.getQuestItemsCount(ELCARDIAS_MARK) < 10) st.playSound(SOUND_ITEMGET); else { st.playSound(SOUND_MIDDLE); st.setCond(4); } } else if (npcId == CREATURE_OF_THE_DUSK_1) { st.set("CreatureOfTheDusk1", 2); if (st.get("CreatureOfTheDusk2") != null && Integer.parseInt(st.get("CreatureOfTheDusk2")) == 2) { st.playSound(SOUND_MIDDLE); st.setCond(6); } } else if (npcId == CREATURE_OF_THE_DUSK_2) { st.set("CreatureOfTheDusk2", 2); if (st.get("CreatureOfTheDusk1") != null && Integer.parseInt(st.get("CreatureOfTheDusk1")) == 2) { st.playSound(SOUND_MIDDLE); st.setCond(6); } } return null; }
@Override public String onEvent(String event, QuestState st, NpcInstance npc) { Player player = st.getPlayer(); String htmltext = event; if (event.equalsIgnoreCase("priest_wood_q10292_3.htm")) { st.setCond(1); st.setState(STARTED); st.playSound(SOUND_ACCEPT); } else if (event.equalsIgnoreCase("priest_wood_q10292_4.htm")) enterInstance(st, 145); else if (event.equalsIgnoreCase("witness_of_dawn_q10292_2.htm")) { st.setCond(2); st.playSound(SOUND_MIDDLE); } else if (event.equalsIgnoreCase("elcadia_abyssal_saintess_q10292_2.htm")) { st.setCond(3); st.playSound(SOUND_MIDDLE); } else if (event.equalsIgnoreCase("elcadia_abyssal_saintess_q10292_9.htm")) { st.setCond(7); st.playSound(SOUND_MIDDLE); } else if (event.equalsIgnoreCase("hardin_q10292_1.htm")) { st.setCond(8); st.playSound(SOUND_MIDDLE); } else if (event.equalsIgnoreCase("spawnTestMobs")) { int reflectId = player.getReflectionId(); st.set("CreatureOfTheDusk1", 1); st.set("CreatureOfTheDusk2", 1); addSpawnToInstance(CREATURE_OF_THE_DUSK_1, 89416, -237992, -9632, 0, 0, reflectId); addSpawnToInstance(CREATURE_OF_THE_DUSK_2, 89416, -238136, -9632, 0, 0, reflectId); return null; } return htmltext; }