05-21-2010, 05:49 PM
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)
Error on: D:\javaservs\l2open-free_-_Rev_1004\l2open-free - Rev 1004\L2J_Server\gameserver\data\scripts\quests\123321_The Enveloping Darkness\__init__.py.error.log
Line: -1 - Column: -1
Traceback (innermost last):
(no code object) at line 0
SyntaxError: ('inconsistent dedent', ('__init__.py', 41, 6, ' if id == State.COMPLETED :'))
помогите пожалуйста...