Jump to content

Recommended Posts

Posted

hi hommies,with this script as u can see at the title u can make auto restart/shutdown the server

so lets begin:

 

works for l2j and others just change the imports:

 

in the quests folder create a new one called 4098_shutdown

 

 

add the 4098_shutdown to the scripts.cfg file in the data folder

 

 

 

#Created by Newface*

#Date 21-June-2009

#L2J Server Restart/Shutdown Script

#

#Time will be in 24 hour format and must be 4 digits for example 6am is 06:00 and 6pm is 18:00

#

#Days are as follows 00=Sunday 01=Monday 02=Tuesday 03=Wednesday 04=Thursday 05=Friday 06=Saturday

#

#If more restarts/shutdowns are required add more elif statements

#

#If less are required then remove elif statements

#

import sys

import time

from net.sf.l2j.gameserver import Announcements

from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest

from net.sf.l2j.gameserver import Shutdown

from net.sf.l2j.gameserver.taskmanager.tasks import TaskShutdown

from net.sf.l2j.gameserver.model.actor.instance import L2PcInstance

from net.sf.l2j.gameserver.model import L2World

from net.sf.l2j.gameserver.script import DateRange

 

class Quest (JQuest) :

 

def __init__(self,id,name,descr):

    JQuest.__init__(self,id,name,descr)

    self.startQuestTimer("timer199",60000,None,None,True)

 

def onAdvEvent(self,event,npc,player) :

   if event == "timer199" :

       day = time.strftime("%w")

       now = time.strftime("%H:%M")

       if day == "01" and now == "23:00" :

           print "Shutdown Initiated"

           Shutdown.getInstance().startTelnetShutdown("Script Triggered Restart/Shutdown",60,0) #change the 60 to your required countdown in seconds and change the 0 to a 1 for restart instead of a shutdown

       elif day == "04" and now == "19:00" :

           print "Shutdown Initiated"

           Shutdown.getInstance().startTelnetShutdown("Script Triggered Restart/Shutdown",60,0) #change the 60 to your required countdown in seconds and change the 0 to a 1 for restart instead of a shutdown

       elif day == "06" and now == "03:00" :

           print "Shutdown Initiated"

           Shutdown.getInstance().startTelnetShutdown("Script Triggered Restart/Shutdown",60,0) #change the 60 to your required countdown in seconds and change the 0 to a 1 for restart instead of a shutdown

 

 

QUEST     = Quest(4098,"4098_shutdown","shutdown")

 

print "Shutdown: Handler Loaded!"

 

credits:Newface*

 

if u find any errors post here thanks

 

Posted

Nice share , but I think better way is create .sql file with auto restarting serwer , someone share it already .

 

Anyway its as good as .sql file

Posted

yeah also u can do it with this:D,but this is for restart

INSERT INTO global_tasks(task,type,last_activation,param1,param2,param3) VALUES

('restart', 'TYPE_GLOBAL_TASK', '2147483647', '1', '00:00:00', '300'); -- At 00:00 in the night he will do a server restart players will have 5 minutes to logout

 

INSERT INTO global_tasks(task,type,last_activation,param1,param2,param3) VALUES

('restart', 'TYPE_GLOBAL_TASK', '2147483647', '1', '12:00:00', '300');-- At 12:00 in the midday he will do a server restart players will have 5 minutes to logout

 

 

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




  • Posts

    • More possible that is a transfor skill, from wallhack xD
    • - Chronicle: Kamael (CT) - Date: 29.08.2025 - EXP Rate: x3 - Adena: x3-x2 - Drop chance: x3 - Spoil chance: x3 (x2 for S grade) - Raid drop chance: x2 - Epic drop chance: x1 - Box limit: 1+1 - No donate.         The Kamael - August 29th The long-awaited Kamael Update arrives on August 29th (18:00 GMT +2) - bringing with it a new race with a unique class system, new lands, and the unfolding of the Chaotic Throne saga. Be among the first to set foot on the Isle of Souls, meet the enigmatic Kamael, and uncover secrets buried for centuries.   Prepare to experience: The Kamael race and their unique class paths The mysterious Isle of Souls Fortress Battles* - dynamic, mid-scale sieges with new strategic depth High-level zones like Hellbound* and Isle of Prayer New items, attribute system, great wolf and more in the new chapter in the lore of ElmoreLab * This feature will be introduced in one of the upcoming updates.     Open Beta Begins August 15th Test the waters of destiny before the full release. Join the Open Beta starting August 15th and be part of shaping this historic moment. The seal is broken. The world will never be the same. Will you walk beside the Kamael, or be left behind? Learn More In-Game - Today Visit Priest Dominic in the Rune Temple for a glimpse of what’s to come. He will reveal the astonishing truth about a people long hidden from the eyes of the five known races of Aden and Elmore. But beware - Dominic may have his own reasons for sending you on this path.   Full server description
    • Summer — a time for rest, sunshine, and a break from the daily grind. Some head to the sea, some just spend more time outside, and some take a break from MMOs. But autumn is drawing near, and with it comes that familiar feeling — the urge to return to Lineage 2 once again.  That craving for something new... or rather, something deeply familiar yet true.   This October–November (exact date TBA), we'll be launching a fresh Interlude x3 server. But this isn’t just another short-lived seasonal server. This is a "permanent" server, which will not move to later chronicles and is being created with long-term support, stable and fair gameplay in mind — all within the framework of classic Interlude.   We want to share the core principles the server will be based on — so you can understand upfront whether this server is right for you.  Core concept: Chronicle: Interlude Rates: x3 — a comfortable pace for those who enjoy progression, PvP, and PvE Box Limit: 1+2 — one main client and up to two additional per person Balance: Classic Interlude with carefully tuned adjustments aimed at comfort and fair competition Donations: No Pay to Win — focused on convenience only; everything important will also be obtainable through gameplay or other non-pay options  Key features: Some skills have been changed — not radical reworks, but well-known solutions familiar to most players from the ElmoreLab project A basic buffer is available up to level 70 — it doesn’t offer significant advantages and won’t replace a real or boxed support, but will help single-window players Clan Hall buffs are slightly improved — a useful addition for clans looking to attract new players Some mechanics have been reworked — with a stronger focus on fair competition Epic boss zones have been updated The remaining changes follow the standard improvements for x2–x3 servers - focused on stability and comfort, while preserving the classic Interlude atmosphere.  Why You Should Try It We're building a server meant to be your long-term home. No wipes No chaotic “innovations” Ongoing support and development within the Interlude framework A comfortable game pace and respect for players’ time Only Interlude — with a focus on stability, fairness and equal conditions for all players This is not the full list of changes — we’ll be sharing more details soon on the forum and our social channels. For now, we simply want to show the direction we’re heading in and what you can expect from this project.  Join us today:       Discord server       Telegram channel       Telegram chat      ⭐Forum   Stay tuned — this is just the beginning!
    • HELLO EVERYONE. WE ARE SELLING A LOT OF ADENA ON L2 REBORN DISCORD - GODDARDSHOP   HURRY TO BUY OR YOU MAY NOT MAKE IT!!!
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock