Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- from java.util.concurrent import TimeUnit
- from net.sf.l2j.gameserver import GeoData
- 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 java.lang import System
- qn = "noblessrb"
- #респаун в минутах
- RESPAWN = TimeUnit.MINUTES.toMillis(60)
- class noblessrb (JQuest) :
- def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr)
- def spawnMe(self):
- self.addSpawn(25325,90819,-85871,GeoData.getInstance().getSpawnHeight(90819, -85871, -2735, -2735),30000,False,0)
- self.saveGlobalQuestVar("status", "1")
- self.deleteGlobalQuestVar("respawn")
- return
- def init_LoadGlobalData(self):
- status = self.loadGlobalQuestVar("status")
- if status == "0":
- temp = long(self.loadGlobalQuestVar("respawn")) - System.currentTimeMillis()
- if temp > 0 :
- self.startQuestTimer("resp", temp, None, None)
- return
- self.spawnMe()
- return
- def onAdvEvent (self,event,npc,player):
- if event == "resp":
- self.spawnMe()
- self.cancelQuestTimer("resp",None,None)
- return
- def onKill(self,npc,player,isPet):
- self.saveGlobalQuestVar("status", "0")
- self.saveGlobalQuestVar("respawn", str(System.currentTimeMillis() + RESPAWN))
- self.startQuestTimer("resp", RESPAWN, None, None)
- return
- QUEST = noblessrb(-1, qn, "ai")
- QUEST.addKillId(25325)
Advertisement
Add Comment
Please, Sign In to add comment