rendered paste body# Coded by Czar|
#
#notes: jewel guardian 3 spawns 4 Jewel Guardian Pyton (5170) but no quest drops for them
#notes: when u get jewel to 40% hp and hit it you get jewel quest item, at 80% minions spawn
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
MARSH_STALKER_HORN_ID = 3853
MARSH_DRAKE_TALONS_ID = 3854
KRANROT_SKIN_ID = 3855
HAMRUT_LEG_ID = 3856
REMANDS_OF_SACRIFICED_ID = 3857
TOTEM_OF_LAND_DRAGON_ID = 3858
FRAG_OF_1ST_ABYSS_JEWEL_ID = 3859
FRAG_OF_2ND_ABYSS_JEWEL_ID = 3860
FRAG_OF_3RD_ABYSS_JEWEL_ID = 3861
MARA_FANG_ID = 3862
MUSFEL_FANG_ID = 3863
MARK_OF_WATCHMAN_ID = 3864
HERALD_OF_SLAYER_ID = 3890
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st) :
htmltext = event
if event == "1" :
htmltext = "gabrielle_q0337_03.htm"
elif event == "gabrielle_q0337_03" :
htmltext = "gabrielle_q0337_04.htm"
elif event == "quest_accept" :
st.set("id","0")
htmltext = "gabrielle_q0337_05.htm"
st.set("cond","1")
st.setState(STARTED)
st.playSound("ItemSound.quest_accept")
st.giveItems(FEATHER_OF_GABRIELLE_ID,1)
elif event == "gabrielle_q0337_05" :
htmltext = "gabrielle_q0337_06.htm"
elif event == "306_2" :
st.set("cond","0")
st.setState(COMPLETED)
st.playSound("ItemSound.quest_finish")
htmltext = "7004-08.htm"
return htmltext
def onTalk (Self,npc,st):
npcId = npc.getNpcId()
htmltext = "<html><head><body>I have nothing to say you</body></html>"
id = st.getState()
if id == CREATED :
st.setState(STARTING)
st.set("cond","0")
st.set("onlyone","0")
st.set("id","0")
if npcId == 7753 and int(st.get("cond"))==0 :
if int(st.get("cond"))<15 :
if st.getPlayer().getLevel() >= 50 :
htmltext = "gabrielle_q0337_02.htm"
return htmltext
else:
htmltext = "gabrielle_q0337_01a.htm"
st.exitQuest(1)
else:
htmltext = "gabrielle_q0337_01a.htm"
st.exitQuest(1)
elif npcId == 7753 and int(st.get("cond"))==1 :
htmltext = "gabrielle_q0337_06a.htm"
return htmltext
def onKill (self,npc,st):
npcId = npc.getNpcId()
# ==================================== marsh stalker
if npcId == 679 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(MARSH_STALKER_HORN_ID,1)
st.playSound("ItemSound.quest_itemget")
# ==================================== marsh Drake
elif npcId == 680 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(MARSH_DRAKE_TALONS_ID,1)
st.playSound("ItemSound.quest_itemget")
# ==================================== Hamrut
elif npcId == 649 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(HAMRUT_LEG_ID,1)
st.playSound("ItemSound.quest_itemget")
# ==================================== Kranrot
elif npcId == 650 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(KRANROT_SKIN_ID,1)
st.playSound("ItemSound.quest_itemget")
# ==================================== Bloody Queen
elif npcId == 247 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.spawnNpc(5171)
st.spawnNpc(5171)
st.spawnNpc(5171)
st.spawnNpc(5171)
st.spawnNpc(5171)
st.spawnNpc(5171)
st.spawnNpc(5171)
st.spawnNpc(5171)
# ==================================== Sacrificed thingies
elif npcId == 5171 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(REMANDS_OF_SACRIFICED_ID,1)
st.playSound("ItemSound.quest_itemget")
# ==================================== Harit shaman/matriarch
elif npcId == 644 or npcId == 645:
st.set("id","0")
if int(st.get("cond")) == 1 :
if st.getRandom(100)<20 :
st.spawnNpc(5172)
st.spawnNpc(5172)
st.spawnNpc(5172)
# ==================================== Harit Zealot
elif npcId == 5172 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(TOTEM_OF_LAND_DRAGON_ID,1)
st.playSound("ItemSound.quest_itemget")
# ==================================== Jewel Guard Mara
elif npcId == 5168 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(MARA_FANG_ID,1)
st.playSound("ItemSound.quest_itemget")
# ==================================== Jewel Guard Musfel
elif npcId == 5169 :
st.set("id","0")
if int(st.get("cond")) == 1 :
st.giveItems(MUSFEL_FANG_ID,1)
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(337,"337_AudienceWithTheLandDragon","Audience with the Land Dragon")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(7753)
STARTING.addTalkId(7753)
STARTED.addTalkId(7753)
#======================== marsh stalker
STARTED.addKillId(679)
#======================== marsh drake
STARTED.addKillId(680)
#======================== hamrut
STARTED.addKillId(649)
#======================== kranrot
STARTED.addKillId(650)
#======================== bloody queen (dunno which id, could be 427,278,12079, or 12080)
STARTED.addKillId(247)
#======================== harit shaman
STARTED.addKillId(644)
#======================== harit matriarch
STARTED.addKillId(645)
#======================== Sacrifice of the sacrificed (8 spawned)
STARTED.addKillId(5171)
#======================== Harit Lizardman Zealot (3 spawned)
STARTED.addKillId(5172)
#======================== Jewel Guardian Mara (20 spawned)
STARTED.addKillId(5168)
#======================== Jewel Guardian Musfel (20 spawned)
STARTED.addKillId(5169)
STARTED.addQuestDrop(679,MARSH_STALKER_HORN_ID,1)
STARTED.addQuestDrop(680,MARSH_DRAKE_TALONS_ID,1)
STARTED.addQuestDrop(649,HAMRUT_LEG_ID,1)
STARTED.addQuestDrop(650,KRANROT_SKIN_ID,1)
STARTED.addQuestDrop(5171,REMANDS_OF_SACRIFICED_ID,1)
STARTED.addQuestDrop(5172,TOTEM_OF_LAND_DRAGON_ID,1)
STARTED.addQuestDrop(5168,MARA_FANG_ID,1)
STARTED.addQuestDrop(5169,MUSFEL_FANG_ID,1)
print "importing quests: 337: Audience with the Land Dragon"