Доброго времени суток Вам, уважаемые!
Столкнулся с проблемой в реализации квеста. Вот код:
print "Load script: 5005_Enchant_oxy"
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
SEALED_SCROLL = 767
DOOM_KNIGHT = 20674
SEALED_SCROLL_DROP = 250000
ALEXIS = 30842
def getCount_767(st) :
return st.getQuestItemsCount(SEALED_SCROLL)
def completed(st) :
st.setState(COMPLETED)
st.clearQuestDrops()
st.getPlayer().addExpAndSp(0,50000)
st.exitQuest(True)
return
def check(st) :
if completed(st)
return "<HTML><BODY>You''ve got all items, here is your reward</BODY></HTML>"
return "<HTML><BODY>You don''t have enough item, continue your quest</BODY></HTML>"
def st_check(st) :
if st.getPlayer().getLevel() < 52 :
st.exitQuest(True)
return "<HTML><BODY>Sorry, your level is too low for this quest</BODY></HTML>"
return "Start.htm"
class Quest (JQuest):
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st):
id = st.getState()
if id == CREATED :
if event == "agree" :
st.setState(STARTED)
st.set("cnt","0")
return "<HTML><BODY>Quest initialized</BODY></HTML>"
return st_check(st)
elif id == COMPLETED: pass
elif id == STARTED :
return check(st)
return
def onTalk (self,npcid,st):
if npcid == ALEXIS :
if st.getQuestItemsCount(SEALED_SCROLL) >= 10 :
st.takeItems(SEALED_SCROLL,-1)
st.giveItems(,1)
return
QUEST = Quest(5005,"5005_Enchant_oxy", "Enchant")
CREATED = State('Start', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(30842)
STARTED.addQuestDrop(DOOM_KNIGHT,SEALED_SCROLL,SEALED_SCROLL_DROP)
STARTED.addKillId(DOOM_KNIGHT)
STARTED.addTalkId(30842)
Подскажите люди знающие, в чем ошибка? Этот квест сервер не воспринимает вообще... ну т.е. даже файлик .class не создается...
Подскажите пожалуйста или поправьте код.....