i have a solo instance event by Bloodshed,and i wanted it's NPC to be auto spawn and auto unspawn.
So,can anyone help me with auto npc spawn and unspawn with interval (every 2 hours etc..) i found 1 in custom datapack but it's kinda old and it's not working with freya.. here's the code:
#script constructed from parts from Electra, theOne and others, not written by me, thanks to all that contribute and share so we can put this stuff together!!
import sys
import time
from com.l2jserver.gameserver import Announcements
from java.lang import System
from com.l2jserver.gameserver.model.quest import State
from com.l2jserver.gameserver.model.quest import QuestState
from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest
from com.l2jserver.gameserver.model.actor.instance import L2PcInstance
class Quest (JQuest) :
def __init__(self,id,name,descr):
JQuest.__init__(self,id,name,descr)
self.startQuestTimer("timer101",60000,None,None,True) #when set to True, the timer will repeat itself indefinitely
def onAdvEvent(self,event,npc,player) :
if event == "timer101" :
now = time.strftime("%H:%M")
if now == "01:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "03:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "05:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "07:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "09:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "11:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "13:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "15:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "17:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "19:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "21:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
elif now == "23:00" :
self.addSpawn(77732138,-90771,150017,-3627,0,False,590000)
Announcements.getInstance().announceToAll("Teleporter has Spawned");
QUEST = Quest(90003,"90003_TvTTeleport_Buffs","TvTTeleport_Buffs")
print "TvT Buffs Teleport Loaded!!!!"
Thank you in advance for those who ever help me with this... peace..
Where was I called a scammer? Is there any proof, etc.? There are a lot of reviews about our store online, etc.
https://zhyk.org/forum/showthread.php?t=1108673
🔍 Inventory 1.0 is a next-generation inventory system that stands out with its special minimal clothing system. Carefully designed and prepared according to the highest standards of your server, it not only enhances your gaming experience but also contributes to your server's infrastructure.
⚙️ Supported: QB-CORE
Features:
✅ Instant Delivery: All products you purchase will be instantly assigned to your account as soon as your payment is completed.
✅ Clothing System: With the special animated clothing configurations in your inventory, you will be able to change outfits with ease. Experience a unique roleplaying experience with high-quality animations and customizable clothing options.
✅ Minimalist Inventory System: This inventory system, with its visuals, animations, and mechanics, offers maximum efficiency without overwhelming your screen and limiting your roleplaying experience. It’s designed to be user-friendly while enhancing your roleplaying experience.
✅ Continuous Updates: The content in the inventory is regularly updated with innovative features added. New animations, additional clothing options, and cutting-edge features ensure a fresh and dynamic experience.
✅ Easy Setup and Compatibility: Compatible with QB-CORE, this system is easy to install and optimized for quick integration into your server. It works seamlessly with a simple drag-and-drop method.
✅ Performance Optimization: The system is optimized to avoid low FPS and performance drops. All features of the inventory run smoothly without affecting your server’s performance.
✅ Multilingual Support: With support for different languages, you can cater to an international player base and build a larger community on your server.
✅ Flexible Customization Options: You can fully customize the inventory according to your needs and server rules. Choose between different outfits and animations to create a unique gaming experience.
✅ Comprehensive Help and Support: With 24/7 support, you can quickly resolve any issues you encounter. Our technical support and user guides are always here to assist you.
Shop Now! Take your game to the next level with Inventory 1.0 and enjoy its unique features. Get ready to make a real difference in your roleplaying experience!
--------------------------TEBEX: https://matza.tebex.io/package/7174862 --------------------------
Question
shawshaw
Hi mengs..
i have a solo instance event by Bloodshed,and i wanted it's NPC to be auto spawn and auto unspawn.
So,can anyone help me with auto npc spawn and unspawn with interval (every 2 hours etc..) i found 1 in custom datapack but it's kinda old and it's not working with freya.. here's the code:
#script constructed from parts from Electra, theOne and others, not written by me, thanks to all that contribute and share so we can put this stuff together!! import sys import time from com.l2jserver.gameserver import Announcements from java.lang import System from com.l2jserver.gameserver.model.quest import State from com.l2jserver.gameserver.model.quest import QuestState from com.l2jserver.gameserver.model.quest.jython import QuestJython as JQuest from com.l2jserver.gameserver.model.actor.instance import L2PcInstance class Quest (JQuest) : def __init__(self,id,name,descr): JQuest.__init__(self,id,name,descr) self.startQuestTimer("timer101",60000,None,None,True) #when set to True, the timer will repeat itself indefinitely def onAdvEvent(self,event,npc,player) : if event == "timer101" : now = time.strftime("%H:%M") if now == "01:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "03:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "05:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "07:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "09:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "11:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "13:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "15:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "17:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "19:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "21:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); elif now == "23:00" : self.addSpawn(77732138,-90771,150017,-3627,0,False,590000) Announcements.getInstance().announceToAll("Teleporter has Spawned"); QUEST = Quest(90003,"90003_TvTTeleport_Buffs","TvTTeleport_Buffs") print "TvT Buffs Teleport Loaded!!!!"Thank you in advance for those who ever help me with this... peace..
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now