public String onKill(L2NpcInstance npc, L2PcInstance player, boolean isPet) { QuestState st = player.getQuestState(qn); if (st == null) return null; if (st.getState() != State.STARTED) return null; int npcId = npc.getNpcId(); if (st.getInt("cond") == 1) { if (npcId == OMEN_BEAST && st.getQuestItemsCount(ONYX_BEAST_EYE) == 0) { st.giveItems(ONYX_BEAST_EYE, 1); } else if (contains(new int[] {TAINTED_ZOMBIE, STINK_ZOMBIE}, npcId) && st.getQuestItemsCount(TAINT_STONE) == 0) { st.giveItems(TAINT_STONE, 1); } else if (contains( new int[] {LESSER_SUCCUBUS, LESSER_SUCCUBUS_TUREN, LESSER_SUCCUBUS_TILFO}, npcId) && st.getQuestItemsCount(SUCCUBUS_BLOOD) == 0) { st.giveItems(SUCCUBUS_BLOOD, 1); } if (st.getQuestItemsCount(ONYX_BEAST_EYE) > 0 && st.getQuestItemsCount(TAINT_STONE) > 0 && st.getQuestItemsCount(SUCCUBUS_BLOOD) > 0) { st.set("cond", "2"); st.playSound("ItemSound.quest_middle"); } else st.playSound("ItemSound.quest_itemget"); } return null; }
public String onEvent(String event, QuestState st) { String htmltext = event; if (event.equalsIgnoreCase("30141-03.htm")) { st.set("cond", "1"); st.setState(State.STARTED); st.playSound("ItemSound.quest_accept"); } return htmltext; }