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
Foot_of_Bandersnatchling = 7203
Trunk_of_Nepenthes = 7202
Secret_Spice = 7204
Ice_Crystalls = 9999
class Quest (JQuest) :
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def onEvent (self,event,st) :
htmltext = event
if event == "31521-004.htm" :
st.set("cond","1")
st.setState(STARTED)
st.playSound("ItemSound.quest_accept")
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.set("cond","0")
if int(st.get("cond"))==0 :
if st.getPlayer().getLevel() >= 75 :
htmltext = "31521-003.htm"
else:
htmltext = "31521-002.htm"
st.exitQuest(1)
else :
if st.getQuestItemsCount(Foot_of_Bandersnatchling)<50 and st.getQuestItemsCount(Trunk_of_Nepenthes)<50 and st.getQuestItemsCount(Secret_Spice)<50:
htmltext = "31521-005.htm"
else :
htmltext = "31521-006.htm"
st.giveItems(Ice_Crystalls,1)
st.takeItems(Secret_Spice,50)
st.takeItems(Trunk_of_Nepenthes,50)
st.takeItems(Foot_of_Bandersnatchling,50)
st.exitQuest(1)
st.playSound("ItemSound.quest_finish")
return htmltext
def onKill (self,npc,st):
count = st.getQuestItemsCount(Foot_of_Bandersnatchling) and st.getQuestItemsCount(Trunk_of_Nepenthes) and st.getQuestItemsCount(Secret_Spice)
if count < 50 and st.getRandom(10) > 10 :
st.giveItems(Foot_of_Bandersnatchling,1) and st.giveItems(Trunk_of_Nepenthes,1) and st.giveItems(Secret_Spice,1)
if count == 49 :
st.playSound("ItemSound.quest_middle")
st.set("cond","2")
else :
st.playSound("ItemSound.quest_itemget")
return
QUEST = Quest(700,"700_FinestIngridients_part1","Finest Ingridients part 1")
CREATED = State('Start', QUEST)
STARTING = State('Starting', QUEST)
STARTED = State('Started', QUEST)
COMPLETED = State('Completed', QUEST)
QUEST.setInitialState(CREATED)
QUEST.addStartNpc(31521)
CREATED.addTalkId(31521)
STARTING.addTalkId(31521)
STARTED.addTalkId(31521)
COMPLETED.addTalkId(31521)
STARTED.addKillId(21321)
STARTED.addKillId(21317)
STARTED.addKillId(21314)
STARTED.addKillId(21319)
STARTED.addQuestDrop(21321,Foot_of_Bandersnatchling,1)
STARTED.addQuestDrop(21317,Foot_of_Bandersnatchling,1)
STARTED.addQuestDrop(21314,Foot_of_Bandersnatchling,1)
STARTED.addQuestDrop(21319,Foot_of_Bandersnatchling,1)
STARTED.addQuestDrop(21321,Trunk_of_Nepenthes,1)
STARTED.addQuestDrop(21317,Trunk_of_Nepenthes,1)
STARTED.addQuestDrop(21314,Trunk_of_Nepenthes,1)
STARTED.addQuestDrop(21319,Trunk_of_Nepenthes,1)
STARTED.addQuestDrop(21321,Secret_Spice,1)
STARTED.addQuestDrop(21317,Secret_Spice,1)
STARTED.addQuestDrop(21314,Secret_Spice,1)
STARTED.addQuestDrop(21319,Secret_Spice,1)
print "importing quests: 700: Finest Ingridients part 1"
инит с такими переносами должен норм грузиться... если есть ошибки в самом квесте то ты о них узнаешь из лога гейм сервера. Если не будет его импортировать и ты не можешь понять где ошибка сделай следующее: