Выдает
Скрытый текстError on: E:\Servers L2\l2wt_8.9ver\datapack\gameserver\data\scripts\events\townwar\__init__.py.error.logLine: -1 - Column: -1
Traceback (innermost last):
(no code object) at line 0
SyntaxError: ('invalid syntax', ('__init__.py', 17, 1, 'self.startQuestTimer("gogogo",600000,None,None) #600000 '))
Сам квест
Скрытый текст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
from net.sf.l2j.util import Rnd
from java.lang import System
from net.sf.l2j.gameserver import Announcements
from net.sf.l2j.gameserver.model import L2CharPosition
from net.sf.l2j.gameserver.ai import CtrlIntention
MOBS = [18008,20830,21087,22123,22126,22132]
class ahosey(JQuest):
def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
def init_LoadGlobalData(self) :
self.startQuestTimer("gogogo", 600000, None, None) #600000
return
def onAdvEvent (self,event,npc,player):
start = self.loadGlobalQuestVar("start")
if event == "gogogo":
Announcements.getInstance().announceToAll("Толпы монстров собираются возле Гирана, нужно защитить жителей!")
self.startQuestTimer("first", 1000, None, None)
self.cancelQuestTimer("gogogo",None,None)
elif event == "first":
self.addSpawn(18008,80870,142381,-3545,40240,False,600000)
self.addSpawn(18008,81062,142356,-3558,40240,False,600000)
self.addSpawn(18008,81311,142389,-3580,40240,False,600000)
self.addSpawn(18008,80586,142520,-3544,40240,False,600000)
self.addSpawn(18008,80699,143015,-3539,40240,False,600000)
self.startQuestTimer("second", 90000, None, None)
self.cancelQuestTimer("first",None,None)
elif event == "second":
Announcements.getInstance().announceToAll("Монстры прорвались внутрь Гирана, нужно защитить жителей!")
self.addSpawn(20830,81501,144672,-3532,40240,False,600000)
self.addSpawn(20830,81318,144467,-3532,40240,False,600000)
self.addSpawn(20830,81691,144601,-3532,40240,False,600000)
self.addSpawn(20830,81682,145161,-3532,40240,False,600000)
self.addSpawn(20830,81494,145410,-3532,40240,False,600000)
self.startQuestTimer("runners", 60000, None, None)
self.cancelQuestTimer("second",None,None)
elif event == "runners":
one = self.addSpawn(21087,84064,143774,-3404,40240,False,600000)
one.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(84043,146812, -3404, 0 ));
two = self.addSpawn(21087,83992,143770,-3404,40240,False,600000)
two.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(84083,146882, -3404, 0 ));
three = self.addSpawn(21087,83928,143864,-3404,40240,False,600000)
three.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(84013,146907, -3404, 0 ));
four = self.addSpawn(21087,83812,143816,-3404,40240,False,600000)
four.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(83963,146907, -3404, 0 ));
five = self.addSpawn(21087,83707,143796,-3404,40240,False,600000)
five.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, L2CharPosition(83944,146860, -3404, 0 ));
self.startQuestTimer("threee", 30000, None, None)
self.cancelQuestTimer("runners",None,None)
elif event == "threee":
Announcements.getInstance().announceToAll("Монстры уже на площади Гирана, город осажден, нужно защитить жителей!")
self.addSpawn(22123,84044,147687,-3397,40240,False,600000) #22122
self.addSpawn(22126,83876,147619,-3397,40240,False,600000)
self.addSpawn(22132,83645,147697,-3532,40240,False,600000)
self.addSpawn(22132,83321,147765,-3461,40240,False,600000)
self.addSpawn(22132,83147,147708,-3461,40240,False,600000)
self.addSpawn(22132,82326,148188,-3495,40240,False,600000)
self.addSpawn(22132,82292,148348,-3459,40240,False,600000)
self.addSpawn(22132,82586,148586,-3461,40240,False,600000)
self.startQuestTimer("fourr", 20000, None, None)
self.cancelQuestTimer("threee",None,None)
elif event == "fourr":
self.addSpawn(22123,82499,148781,-3461,40240,False,600000) #22122
self.addSpawn(22126,82649,148956,-3461,40240,False,600000)
self.addSpawn(18008,83042,149010,-3461,40240,False,600000)
self.addSpawn(18008,83337,148802,-3397,40240,False,600000)
self.addSpawn(18008,82942,148651,-3461,40240,False,600000)
self.addSpawn(18008,82260,148478,-3459,40240,False,600000)
self.addSpawn(18008,81795,148044,-3495,40240,False,600000)
self.addSpawn(18008,81891,147743,-3461,40240,False,600000)
self.startQuestTimer("fivee", 60000, None, None)
self.cancelQuestTimer("fourr",None,None)
elif event == "fivee":
Announcements.getInstance().announceToAll("Предводитель монстров прорвался в церковь Гирана, нужно защитить жителей!")
self.addSpawn(22123,84442,148621,-3428,40240,False,600000) #22122
self.addSpawn(22126,84440,148573,-3394,40240,False,600000)
self.addSpawn(18008,84428,148680,-3394,40240,False,600000)
self.addSpawn(22132,84534,148660,-3394,40240,False,600000)
self.addSpawn(22132,84521,148618,-3428,40240,False,600000)
self.addSpawn(18008,84511,148571,-3394,40240,False,600000)
self.startQuestTimer("boss", 10000, None, None)
self.cancelQuestTimer("fivee",None,None)
elif event == "boss":
self.addSpawn(29065,85980,148619,-3428,40240,False,600000)
self.cancelQuestTimer("boss",None,None)
return
def onKill(self,npc,player,isPet):
st = player.getQuestState("airin")
npcId = npc.getNpcId()
name = player.getName()
start = self.loadGlobalQuestVar("start")
if npcId == 29065 and start == "1":
Announcements.getInstance().announceToAll("Главарь монстров повержен, игрок "+name+" нанес последний удар!")
Announcements.getInstance().announceToAll("Монстры отступают!")
st.giveItems(4037,100)
st.giveItems(4357,50)
elif npcId in MOBS and start == "1":
st.giveItems(4357,25)
return
QUEST = ahosey(-1,"ahosey","tvtevent")
CREATED = State('Start',QUEST)
QUEST.setInitialState(CREATED)
QUEST.addKillId(29065)
for i in MOBS:
QUEST.addKillId(i)
Хелп чтоли...
Спасибка прилагается