Jump to content

Recommended Posts

  • 4 months later...
Posted

dont use sleep on your server guys, find an autorestart with threadpoolmanager

 

If you have something on mind just make it public.

Posted

If you have something on mind just make it public.

What else u need mate, I told that it should be done with threadpoolmanager, its easy

Posted

What else u need mate, I told that it should be done with threadpoolmanager, its easy

 

Make a topic and and show us how specific can you be in order to " Autorestart with Threadpoolmanager".

Posted

Make a topic and and show us how specific can you be in order to " Autorestart with Threadpoolmanager".

 

I think that its to easy too create a topic for it, but quickly I made this:

	}
	_selectorThread.start();		
}
+	static int hours=1;//1 hour
+	private static void scheduleNextRestart()
+	{
+		_log.info("Scheduled GS restart after " + hours + " hours");
+		ThreadPoolManager.getInstance().scheduleGeneral(new Restart(), hours * 3600000);
+	}
+	public static class Restart implements Runnable
+	{
+		@Override
+		public void run()
+		{
+			L2PcInstance manager = L2PcInstance.createDummyPlayer(0, "Restart Manager");
+			Shutdown.getInstance().startShutdown(manager, 900000, true);
+			manager.decayMe();
+		}
+	}
public static SelectorThread<L2GameClient> getSelectorThread()
{
	return _selectorThread;
}

and

	Util.printSection("Game Server");
+		scheduleNextRestart();
	if (Config.IRC_ENABLED)
		IrcManager.getInstance().getConnection().sendChan(Config.IRC_MSG_START);

on GamerServer.java

This should work.

 

PS: about that dummy pc Instance, dont flame me dat was a quick fix xD

  • 3 weeks later...
  • 10 years 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

    • Dear players, We remind you, that on April 11 at 18:00 server time (GMT +2), the open beta test of our upcoming Chronicle 2 update will begin! To participate in open beta testing, download the client from one of the links below. Download links: Download client | Download updater
    • MoMoProxy Offers $850 for 1TB Plan. anyone interested in can view details as follow: https://momoproxy.com/residential-proxies
    • Yes there are many problems. Im trying to fix there slowly, cause i i put already a lot of work in this files. I think it will not be easy to move the project to other builds
    • You probably wanted to write l2jmobius. I would recommend that you change the build because it has a lot of problems with the movement of npcs and players. Even if you find bots you will have to correct the movement or the bots will get stuck, fly, teleport
    • Complete Server Pack + Source Files: C4 Scions Of Destiny: P656 Retail X1 L2OFF Server Pack + Source: Price: 100EUR --------------------------------------------------------------------------------------------------------------------------------------------- C4 Scions Of Destiny: P656 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR -------------------------------------------------------------------------------------------------------------------------------------------- C6 Interlude: P756 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 150EUR The same as C4 but in C6 Client  ----------------------------------------------------------------------------------------------------------------------------------------------   C6 Interlude: P746 L2Gold L2OFF Server Pack + Source: Price: 150EUR   https://imgur.com/a/pts-l2gold-interlude-p746-9kB3oA9#MbP2aJh -------------------------------------------------------------------------------------------------------------------------------------------------   C6 - Classic Interlude: P110 ESL2 Athena x45 L2OFF Server Pack + Source: Price: 350EUR   https://imgur.com/a/pts-l2off-p110-classic-interlude-athena-x45-Z2kZxuv#YlZU9hF -------------------------------------------------------------------------------------------------------------------------------------------------   DISCORD - MMOPROMOOO TELEGRAM - MMOPROMO 
  • Topics

×
×
  • Create New...