import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest FEATHER_OF_GABRIELLE_ID = 3852 HAMRUT_LEG_ID = 3856 KRANROT_SKIN_ID = 3855 REMAINS_OF_SACRIFIED_ID = 3857 TOTEM_OF_LAND_DRAGON_ID = 3858 MARSH_STALKER_HORN_ID = 3853 MARSH_DRAKE_TALONS_ID = 3854 MARK_OF_WATCHMAN_ID = 3864 MARA_FANG_ID = 3862 MUSFEL_FANG_ID = 3863 FIRST_FRAGMENT_OF_ABYSS_JEWEL_ID = 3859 SECOND_FRAGMENT_OF_ABYSS_JEWEL_ID = 3860 THIRD_FRAGMENT_OF_ABYSS_JEWEL_ID = 3861 HERALD_OF_SLAYER_ID = 3890 PORTAL_STONE_ID = 3865 HAMRUT_ID = 649 KRANROT_ID = 650 BLOODY_QUEEN_ID = 12079 SACRIFICE_OF_THE_SACRIFICED_ID = 5171 HARIT_LIZARDMAN_SHAMAN_ID = 644 HARIT_LIZARDMAN_ZEALOT_ID = 5172 MARSH_STALKER_ID = 679 MARSH_DRAKE_ID = 680 ABYSS_JEWEL1_ID = 5165 ABYSS_JEWEL2_ID = 5166 ABYSS_JEWEL3_ID = 5167 CAVE_KEEPER_ID = 277 CAVE_MAIDEN_ID = 287 CAVE_KEEPER1_ID = 246 CAVE_MAIDEN1_ID = 134 ANTHARAS_ID = 12211 class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent (self,event,st) : htmltext = event if event == "0" : htmltext = "7753-00a.htm" elif event == "1" : htmltext = "7753-02.htm" elif event == "2" : htmltext = "7753-04.htm" elif event == "3" : st.setState(STARTED) st.set("cond","1") htmltext = "7753-05.htm" st.giveItems(FEATHER_OF_GABRIELLE_ID,1) st.playSound("ItemSound.quest_accept") elif event == "4" : htmltext = "7753-06a.htm" elif event == "7753-08.htm" : st.set("cond","2") htmltext = "7753-09.htm" st.playSound("ItemSound.quest_middle") elif event == "7498-01.htm" : htmltext = "7498-02.htm" st.set("part","5") st.playSound("ItemSound.quest_accept") elif event == "7678-01.htm" : st.set("part","6") htmltext = "7498-01a.htm" st.playSound("ItemSound.quest_accept") elif event == "7754-02.htm" : htmltext = "7754-03.htm" st.set("part","7") st.set("cond","4") st.playSound("ItemSound.quest_accept") elif event == "7755-04.htm" : st.set("part","8") st.giveItems(PORTAL_STONE_ID,1) st.takeItems(THIRD_FRAGMENT_OF_ABYSS_JEWEL_ID,-1) htmltext = "7755-05.htm" st.playSound("ItemSound.quest_accept") elif event == "12250-01.htm" : st.takeItems(PORTAL_STONE_ID,1) st.player.teleToLocation(177752,114910,-7713) return htmltext def onTalk (Self,npc,st): npcId = npc.getNpcId() htmltext = "
I have nothing to say you" id = st.getState() level = st.getPlayer().getLevel() if id == CREATED : st.set("cond","0") if npcId == 7753 and id == CREATED and level>=50 : htmltext = "7753-01.htm" elif npcId == 7753 and id == CREATED and level<50 : htmltext = "7753-00.htm" if npcId == 7753 and id == STARTED and st.getQuestItemsCount(MARK_OF_WATCHMAN_ID)==4 and int(st.get("part"))<=4 : htmltext = "7753-09.htm" st.getQuestItemsCount(MARK_OF_WATCHMAN_ID) st.takeItems(MARK_OF_WATCHMAN_ID,-1) elif npcId == 7753 and st.getQuestItemsCount(MARK_OF_WATCHMAN_ID)==2 and int(st.get("cond"))==2 : st.takeItems(MARK_OF_WATCHMAN_ID,-1) st.takeItems(FEATHER_OF_GABRIELLE_ID,-1) st.giveItems(HERALD_OF_SLAYER_ID,1) htmltext == "7753-11.htm" st.set("cond","3") st.playSound("ItemSound.quest_middle") elif npcId == 7753 and st.getQuestItemsCount(HERALD_OF_SLAYER_ID)==1 and int(st.get("cond"))==3 : htmltext == "7753-12.htm" elif npcId == 7753 and int(st.get("cond"))==1 and st.getInt("part")<4 and st.getQuestItemsCount(FEATHER_OF_GABRIELLE_ID)==1 : htmltext == "7753-06.htm" elif npcId == 7753 and st.getInt("part")==4 : htmltext == "7753-08.htm" elif npcId == 7753 and int(st.get("cond"))==2 and st.getQuestItemsCount(HERALD_OF_SLAYER_ID)==1 : htmltext == "7753-10.htm" elif npcId == 7753 and st.getInt("part")==7 : htmltext == "7753-13.htm" # Kaiena if npcId == 7720 and int(st.get("cond"))==1 : htmltext = "7720-01.htm" st.set("part","2") st.set("kaiena","1") st.playSound("ItemSound.quest_accept") elif npcId == 7720 and id == CREATED : htmltext = "7720-04.htm" if npcId == 7720 and int(st.get("part"))==2 and int(st.get("kaiena"))==1 : if st.getQuestItemsCount(MARSH_STALKER_HORN_ID)==1 and st.getQuestItemsCount(MARSH_DRAKE_TALONS_ID)==1 : st.giveItems(MARK_OF_WATCHMAN_ID,1) st.takeItems(MARSH_STALKER_HORN_ID,-1) st.takeItems(MARSH_DRAKE_TALONS_ID,-1) st.playSound("ItemSound.quest_itemget") st.set("kaiena","2") htmltext = "7851-02.htm" else: htmltext = "Bring me 2 proofs!" elif npcId == 7720 and int(st.get("kaiena"))==2 : htmltext = "7720-03.htm" # Chakris if npcId == 7705 and int(st.get("cond"))==1 and st.getQuestItemsCount(FEATHER_OF_GABRIELLE_ID)==1 : st.set("part","1") st.set("chakris","1") htmltext = "7705-01.htm" st.playSound("ItemSound.quest_accept") if npcId == 7705 and id == CREATED : htmltext = "7705-04.htm" if npcId == 7705 and int(st.get("part"))==1 and int(st.get("chakris"))==1 and st.getQuestItemsCount(FEATHER_OF_GABRIELLE_ID)==1 and st.getQuestItemsCount(HAMRUT_LEG_ID)>=1 and st.getQuestItemsCount(KRANROT_SKIN_ID)>=1 : st.giveItems(MARK_OF_WATCHMAN_ID,1) st.takeItems(KRANROT_SKIN_ID,-1) st.takeItems(HAMRUT_LEG_ID,-1) st.set("chakris","2") htmltext = "7705-02.htm" st.playSound("ItemSound.quest_itemget") if npcId == 7705 and int(st.get("part"))==1 and int(st.get("chakris"))==1 and st.getQuestItemsCount(HAMRUT_LEG_ID)<1 or st.getQuestItemsCount(KRANROT_SKIN_ID)<1 : htmltext = "Bring me 2 proofs!" if npcId == 7705 and int(st.get("chakris"))==2 : htmltext = "7705-03.htm" # Kendra if npcId == 7851 and int(st.get("cond"))==1 : htmltext = "7851-01.htm" st.set("kendra","1") st.set("part","3") st.playSound("ItemSound.quest_accept") elif npcId == 7851 and id == CREATED : htmltext = "7851-04.htm" if npcId == 7851 and int(st.get("part"))==3 and int(st.get("kendra"))==1 : if st.getQuestItemsCount(TOTEM_OF_LAND_DRAGON_ID)==1 : st.giveItems(MARK_OF_WATCHMAN_ID,1) st.takeItems(TOTEM_OF_LAND_DRAGON_ID,-1) st.playSound("ItemSound.quest_itemget") st.set("kendra","2") htmltext = "7851-02.htm" else: htmltext = "Bring me 2 proofs!" elif npcId == 7851 and int(st.get("kendra"))==2 : htmltext = "7851-03.htm" # Orven if npcId == 7857 and int(st.get("cond"))==1 : htmltext = "7857-01.htm" st.set("orven","1") st.set("part","4") st.playSound("ItemSound.quest_accept") elif npcId == 7857 and id == CREATED : htmltext = "7857-04.htm" if npcId == 7857 and int(st.get("part"))==4 and int(st.get("orven"))==1 : if st.getQuestItemsCount(REMAINS_OF_SACRIFIED_ID)==1 : st.giveItems(MARK_OF_WATCHMAN_ID,1) st.takeItems(REMAINS_OF_SACRIFIED_ID,-1) st.playSound("ItemSound.quest_itemget") htmltext = "7857-02.htm" st.set("orven","2") else: htmltext = "Bring me the proof!" elif npcId == 7857 and int(st.get("orven"))==2 : htmltext = "7857-03.htm" if npcId == 7498 and int(st.get("cond"))==2 : htmltext = "7498-01.htm" st.set("onlyone","0") if npcId == 7498 and int(st.get("part"))==5 and st.getQuestItemsCount(MARA_FANG_ID)>=1 and st.getQuestItemsCount(FIRST_FRAGMENT_OF_ABYSS_JEWEL_ID)>=1 : st.giveItems(MARK_OF_WATCHMAN_ID,1) st.takeItems(MARA_FANG_ID,-1) st.takeItems(FIRST_FRAGMENT_OF_ABYSS_JEWEL_ID,-1) htmltext = "7498-03.htm" elif npcId == 7498 and int(st.get("part"))==5 and st.getQuestItemsCount(MARK_OF_WATCHMAN_ID)==1 : htmltext = "7498-04.htm" elif npcId == 7498 and int(st.get("part"))==5 and st.getQuestItemsCount(MARK_OF_WATCHMAN_ID)==2 : htmltext = "7498-05.htm" if npcId == 7678 and int(st.get("cond"))==2 : htmltext = "7678-01.htm" st.set("onlyone","0") if npcId == 7678 and int(st.get("part"))==6 and st.getQuestItemsCount(MUSFEL_FANG_ID)>=1 and st.getQuestItemsCount(SECOND_FRAGMENT_OF_ABYSS_JEWEL_ID)>=1 : st.takeItems(MUSFEL_FANG_ID,-1) st.takeItems(SECOND_FRAGMENT_OF_ABYSS_JEWEL_ID,-1) st.giveItems(MARK_OF_WATCHMAN_ID,1) htmltext = "7678-02.htm" elif npcId == 7678 and int(st.get("part"))==6 and st.getQuestItemsCount(MARK_OF_WATCHMAN_ID)==1 : htmltext = "7678-03.htm" elif npcId == 7678 and int(st.get("part"))==6 and st.getQuestItemsCount(MARK_OF_WATCHMAN_ID)==2 : htmltext = "7678-05.htm" if npcId == 7754 and int(st.get("cond"))==3 : htmltext = "7754-02.htm" elif npcId == 7754 and int(st.get("part"))>=3 and int(st.get("part"))<=7 : htmltext = "7754-01.htm" elif npcId == 7754 and st.getQuestItemsCount(THIRD_FRAGMENT_OF_ABYSS_JEWEL_ID)==1 : htmltext = "7754-05.htm" elif npcId == 7754 and int(st.get("cond"))==4 and st.getQuestItemsCount(THIRD_FRAGMENT_OF_ABYSS_JEWEL_ID)<1 : htmltext = "7754-04.htm" if npcId == 7755 and int(st.get("cond"))<=3 : htmltext = "7755-01.htm" elif npcId == 7755 and int(st.get("cond"))==3 : htmltext = "7755-02.htm" elif npcId == 7755 and int(st.get("cond"))==4 : htmltext = "7755-03.htm" elif npcId == 7755 and int(st.get("cond"))==4 and st.getQuestItemsCount(THIRD_FRAGMENT_OF_ABYSS_JEWEL_ID)==1 : htmltext = "7755-04.htm" if npcId == 12250 and int(st.get("cond"))==4 and int(st.get("part"))==8 and st.getQuestItemsCount(PORTAL_STONE_ID)==1 : htmltext = "12250-01.htm" elif npcId == 12250 and int(st.get("cond"))==4 and st.getQuestItemsCount(PORTAL_STONE_ID)<1 : htmltext = "12250-04.htm" return htmltext def onAttack (self,npc,st) : npcId = npc.getNpcId() maxHp = npc.getMaxHp() nowHp = npc.getCurrentHp() if npcId == ABYSS_JEWEL1_ID and int(st.get("part"))==5 and maxHp*0.75