All pastes #28343 Raw Edit

Untitled

public text v1 · immutable
#28343 ·published 2005-11-11 07:00 UTC
rendered paste body
#npcList
print "importing custom data: 9000_buffs"
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

class Quest (JQuest) :

 def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)

 def onEvent (self,event,st) :
    htmltext = event

#windwalk
    if event == "1":
      if st.getQuestItemsCount(57) == 200:
         st.takeItems(57,200)
         st.doCast(1204)
         htmltext = "Enjoy your buffs."
      else:
         htmltext = "You do not have enough adena."

    st.exitQuest(1)
    return htmltext

 def onTalk (self,npc,st):
    st.setState(STARTED)
    htmltext = "1.htm"
    return htmltext

QUEST       = Quest(9000,"9000_buffs","buffs")
CREATED     = State('Start',     QUEST)
STARTED     = State('started',   QUEST)
COMPLETED   = State('Completed', QUEST)

QUEST.setInitialState(CREATED)
QUEST.addStartNpc(68002)

STARTED.addTalkId(68002)