Цитата:
Сообщение от Mangol
Гдето что то неправильно написал...
|
Код HTML:
import sys
from ru.l2open.gameserver.datatables import SkillTable
from ru.l2open.gameserver.model.quest import State
from ru.l2open.gameserver.model.quest import QuestState
from ru.l2open.gameserver.model.quest.jython import QuestJython as JQuest
qn = "123321_The Enveloping Darkness"
#NPCs
Orbyu = 32560
El = 32556
Medibal = 32528
#items
indocument = 13852
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.questItemIds = [indocument]
def onAdvEvent (self,event,npc, player) :
htmltext = event
st = player.getQuestState(qn)
if not st : return
if event == "32528-01.htm" :
st.set("cond","1")
st.setState(State.STARTED)
st.playSound("ItemSound.quest_accept")
st.giveItems(indocument,1)
return htmltext
def onTalk (self,npc,player):
htmltext = "<html><body>You are either not on a quest that involves this NPC, or you don't meet this NPC's minimum quest requirements.</body></html>"
st = player.getQuestState(qn)
if not st : return htmltext
npcId = npc.getNpcId()
id = st.getState()
cond = st.getInt("cond")
if id == State.COMPLETED :
if npcId == Orbyu :
htmltext = "32560-02.htm"
else:
htmltext = "32560-0a.htm"
elif id == State.CREATED and npcId == Orbyu:
if player.getLevel() < 75 :
htmltext = "32560-00.htm"
else :
htmltext = "32560-01.htm"
elif id == State.STARTED and npcId == Orbyu:
htmltext = "32560-06.htm"
elif id == State.STARTED and npcId == El:
htmltext = "32556-01.htm"
elif id == State.STARTED and npcId == Medibal:
htmltext = "32528-01.htm"
elif id == State.STARTED and npcId == El:
htmltext = "32556-02.htm"
elif id == State.STARTED and npcId == Orbyu:
htmltext = "32560-01.htm"
st.giveItems(57,62516)
st.addExpAndSp(377403,37867)
st.unset("cond")
st.exitQuest(False)
st.playSound("ItemSound.quest_finish")
return htmltext
QUEST = Quest(123321,qn,"The Enveloping Darkness")
QUEST.addStartNpc(Orbyu)
QUEST.addTalkId(Orbyu)
QUEST.addTalkId(El)
QUEST.addTalkId(Medibal)
ну посмотри может и не правильно но гс не ругаеться=\