# Mimir's Elixir version 0.1 # by Fulminus print "importing quests:", 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 #Quest info QUEST_NUMBER,QUEST_NAME,QUEST_DESCRIPTION = 235,"MimirsElixir","Mimir's Elixir" DROP_RATE = 45 #prerequisites: STAR_OF_DESTINY = 5011 MINLEVEL = 75 #Quest items PURE_SILVER = 6320 TRUE_GOLD = 6321 SAGES_STONE = 6322 BLOOD_FIRE = 6318 MIMIRS_ELIXIR = 6319 SCROLL_ENCHANT_WEAPON_A = 729 #Messages default = "
I have nothing to say to you." #NPCs LADD,JOAN=30721,30718 #Mobs, cond, Drop DROPLIST = { 20965: [3,SAGES_STONE], #Chimera Piece 21090: [6,BLOOD_FIRE] #Bloody Guardian } class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) def onEvent (self,event,st) : if event == "1" : st.setState(PROGRESS) st.set("cond","1") htmltext = "30166-02a.htm" elif event == "30718_1" : st.set("cond","3") htmltext = "30718-01a.htm" return htmltext def onTalk (self,npc,st): htmltext = default id = st.getState() npcId = npc.getNpcId() cond = st.getInt("cond") if npcId == LADD : if id == CREATED : st.set("cond","0") if st.getPlayer().getLevel() < MINLEVEL : st.exitQuest(1) htmltext = "30166-01.htm" #not qualified elif not st.getQuestItemsCount(STAR_OF_DESTINY) : st.exitQuest(1) htmltext = "30166-01a.htm" #not qualified elif int(st.get("cond"))==0 : htmltext = "30166-02.htm" # Successful start: Bring me Pure silver from Reagents quest elif id == COMPLETED : htmltext = "You have already completed this quest." # was asked to get pure silver but has not done so yet. Repeat: get pure silver elif cond==1 and not st.getQuestItemsCount(PURE_SILVER) : htmltext = "30166-03.htm" # Bring me Pure silver from Reagents quest # got the pure silver and came back. Ask for TrueGold. elif cond==1 and st.getQuestItemsCount(PURE_SILVER) : st.set("cond","2") htmltext = "30166-04.htm" # Bring me True Gold from Joan elif 1