Jump to content
  • 0

Gameserver Auto Shutdown


Question

Posted (edited)

I have L2Lucera2 source:

i build server i start login all right

i start gameserver all right but in 2 sec start auto shutdown.

Look what message gives me:

 

20sdjzd.jpg

 

 

and i have find this in shutdown.java

public class Shutdown extends Thread
{
	private final static Logger	_log				= Logger.getLogger(Shutdown.class.getName());
	private static Shutdown		_instance;
	private static Shutdown		_counterInstance	= null;
	private int					_secondsShut;
	private List<Runnable>				_shutdownHandlers;
	private ShutdownModeType	_shutdownMode;
	
	public enum ShutdownModeType
	{
		
		SIGTERM("shutdown"), SHUTDOWN("shutdown"), RESTART("restart"), ABORT("Aborting");
		private final String	_modeText;
		ShutdownModeType(String modeText)
		{
			_modeText = modeText;
		}

		public String getText()
		{
			return _modeText;
		}
	}

	public Shutdown()
	{
		_secondsShut = -1;
		_shutdownMode = ShutdownModeType.SIGTERM;
		_shutdownHandlers = new FastList<Runnable>();
	}

	public  static boolean isReady() {
		return _instance!=null;
	}
	public Shutdown(int seconds, ShutdownModeType mode)
	{
		if (seconds < 0)
			seconds = 0;

		_secondsShut = seconds;
		_shutdownMode = mode;
	}

	public static Shutdown getInstance()
	{
		if (_instance == null) {
			_instance = new Shutdown();
			try {
				if(ShutdownModeType.ABORT.ordinal() == 0 ||
						ShutdownModeType.RESTART.ordinal() == 0 ||
						ShutdownModeType.SHUTDOWN.ordinal() == 0 ||
						ShutdownModeType.SIGTERM.ordinal() == 0);
			} catch(Exception e ) {
				System.exit(0);
			}
		}
		return _instance;
	}

	public static Shutdown getCounterInstance()
	{
		return _counterInstance;
	}

	/**
	 * Зарегистрировать обработчик "при выходе"<br>
	 * @param r as Runnable - обработчик
	 */
	public void registerShutdownHandler(Runnable r) {
		if(!_shutdownHandlers.contains(r))
			_shutdownHandlers.add(r);
	}
	/**
	 * Убрать обработчик из цепочки<br>
	 * @param r as Runnable - зарегистрированные ранее разработчик
	 */
	public void unregisterShutdownHandler(Runnable r) {
		if(_shutdownHandlers.contains(r))
			_shutdownHandlers.remove(r);
	}
	@Override
	public void run()
	{
		if (this == _instance)
		{
			saveData();
			// Вызов шатдаун-обработчиков.
			System.out.print("Executing shutdown hooks..");
			int nhooks =0, nsuccess  = 0;
			for(Runnable r : _shutdownHandlers) try {
				nhooks++;
				r.run();
				System.out.print(".");
				nsuccess++;
			} catch(Exception e) {
			}
			System.out.println(nhooks+" total, "+nsuccess+ " successfully");
			try
			{
				GameTimeController.getInstance().stopTimer();
			}
			catch (Throwable t)
			{
				t.printStackTrace();
			}

			System.out.println("GameTime controller stopped");
			try
			{
				LoginServerThread.getInstance().interrupt();
			}
			catch (Throwable t)
			{
				t.printStackTrace();
			}
			System.out.println("Disconnected from login");
			try
			{
				L2GameServer.getSelectorThread().shutdown();
			}
			catch (Throwable t)
			{
				t.printStackTrace();
			}

			System.out.println("Network disabled");
			try
			{
				ThreadPoolManager.getInstance().shutdown();
			}
			catch (Throwable t)
			{
				t.printStackTrace();
			}

			SQLQueue.getInstance().run();
			System.out.println("Disconnected from database");
			try {
			if (_instance._shutdownMode == ShutdownModeType.RESTART)
				Runtime.getRuntime().halt(2);
			else
				Runtime.getRuntime().halt(0);
			} catch(Exception e) {
				Runtime.getRuntime().halt(0);
			}
		}
		else
		{
			countdown();
			_log.info("Shutdown countdown is over. Shutdown or restart NOW!");
			switch (_shutdownMode)
			{
				case SHUTDOWN:
					_instance.setMode(ShutdownModeType.SHUTDOWN);
					System.exit(0);
					break;
				case RESTART:
					_instance.setMode(ShutdownModeType.RESTART);
					System.exit(2);
					break;
			}
		}

what i can do??? for fix that?

Edited by TeenWolf

9 answers to this question

Recommended Posts

  • 0
Posted (edited)
package ru.catssoftware.gameserver;

import com.lameguard.LameGuard;
import org.apache.log4j.Logger;
import ru.catssoftware.Config;
import ru.catssoftware.L2DatabaseFactory;
import ru.catssoftware.gameserver.datatables.CustomMessageHolder;
import ru.catssoftware.gameserver.cache.CrestCache;
import ru.catssoftware.gameserver.cache.HtmCache;
import ru.catssoftware.gameserver.communitybbs.CommunityBoard;
import ru.catssoftware.gameserver.datatables.*;
import ru.catssoftware.gameserver.datatables.xml.*;
import ru.catssoftware.gameserver.geodata.GeoData;
import ru.catssoftware.gameserver.geodata.pathfinding.PathFinding;
import ru.catssoftware.gameserver.gmaccess.gmCache;
import ru.catssoftware.gameserver.gmaccess.gmController;
import ru.catssoftware.gameserver.handler.*;
import ru.catssoftware.gameserver.idfactory.IdFactory;
import ru.catssoftware.gameserver.instancemanager.*;
import ru.catssoftware.gameserver.instancemanager.clanhallsiege.*;
import ru.catssoftware.gameserver.instancemanager.games.fishingChampionship;
import ru.catssoftware.gameserver.instancemanager.grandbosses.*;
import ru.catssoftware.gameserver.instancemanager.lastimperialtomb.LastImperialTombManager;
import ru.catssoftware.gameserver.instancemanager.leaderboards.ArenaManager;
import ru.catssoftware.gameserver.instancemanager.leaderboards.FishermanManager;
import ru.catssoftware.gameserver.mmocore.SelectorConfig;
import ru.catssoftware.gameserver.mmocore.SelectorThread;
import ru.catssoftware.gameserver.model.*;
import ru.catssoftware.gameserver.model.actor.instance.L2PcInstance;
import ru.catssoftware.gameserver.model.actor.other.FriendData;
import ru.catssoftware.gameserver.model.entity.Castle;
import ru.catssoftware.gameserver.model.entity.Hero;
import ru.catssoftware.gameserver.model.entity.events.*;
import ru.catssoftware.gameserver.model.olympiad.Olympiad;
import ru.catssoftware.gameserver.model.quest.QuestMessage;
import ru.catssoftware.gameserver.model.restriction.ObjectRestrictions;
import ru.catssoftware.gameserver.network.IOFloodManager;
import ru.catssoftware.gameserver.network.L2GameClient;
import ru.catssoftware.gameserver.network.L2GamePacketHandler;
import ru.catssoftware.gameserver.network.daemons.SuperDeamon;
import ru.catssoftware.gameserver.script.CoreScriptsLoader;
import ru.catssoftware.gameserver.script.ExtensionLoader;
import ru.catssoftware.gameserver.scripting.L2ScriptEngineManager;
import ru.catssoftware.gameserver.taskmanager.*;
import ru.catssoftware.gameserver.taskmanager.tasks.TaskPcCaffe;
import ru.catssoftware.gameserver.threadmanager.DeadlockDetector;
import ru.catssoftware.gameserver.util.PcAction;
import ru.catssoftware.gameserver.util.Util;
import ru.catssoftware.protection.CatsGuard;
import ru.catssoftware.util.Console;
import ru.catssoftware.util.concurrent.RunnableStatsManager;

import java.io.*;
import java.net.InetAddress;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;


public class L2GameServer
{
	private static final Logger						_log				= Logger.getLogger(L2GameServer.class);
	private static final Calendar					_serverStarted		= Calendar.getInstance();
	private static SelectorThread<L2GameClient>		_selectorThread;
	public static long								_upTime				= 0;
	public static double							_intialTime			= 0;

	public L2GameServer() throws Throwable
	{
		/* Предстартовая подготовка */
		prepare();

		/* Загрузка чат фильтра */
		Console.printSection("Chat Filter");
		Config.loadFilter();
		CustomMessageHolder.load();

		/* Инициализация базы данных */
		Console.printSection("Database Engine");
		L2DatabaseFactory.getInstance();
		
		PcAction.clearRestartTask();

		/* Вывод системной инфы */
		Console.printSection("System Info");
		Util.printGeneralSystemInfo();
		Console.printSection("Scripting Engines");
		L2ScriptEngineManager.getInstance();
		/* Инициализация пулов */
		Console.printSection("ThreadPool Manager");
		ThreadPool();
		
		/* Установка основго мира */
		Console.printSection("Lineage 2 World");
		ServerData.getInstance();
		L2World.getInstance();
		
		/* Запуск дедлок детектора */
		Console.printSection("DeadLock Detector");
		if (Config.DEADLOCKCHECK_INTERVAL > 0)
			DeadlockDetector.getInstance();
		else
			_log.info("DeadlockDetector: Manager is disabled");

			
		/* Создание карт мира */
		Console.printSection("MapRegion Manager");
		MapRegionManager.getInstance();

		/* Загрузка анонсов */
		Console.printSection("Announce Manager");
		Announcements.getInstance();

		/* ID Factory менеджер */
		Console.printSection("ID Factory Manager");
		if (!IdFactory.getInstance().isInitialized())
			_log.fatal("IdFactory: Could not read object IDs from DB");
		_log.info("IdFactory: Free ObjectID's remaining: " + IdFactory.getInstance().size());

		/* Дополнительные треды */
		RunnableStatsManager.getInstance();

		/* Запуск движка геодаты */
		Console.printSection("Geodata Engine");
		GeoData.getInstance();
		PathFinding.getInstance();
		/* Загрузка статических объектов */
		Console.printSection("Static Objects");
		StaticObjects.getInstance();

		/* Сервер менеджер, основные классы */
		Console.printSection("Server Manager");
		if (Config.ALT_ALLOW_AWAY_STATUS)
			AwayManager.getInstance();
		GameTimeController.getInstance();
		BoatManager.getInstance();
		InstanceManager.getInstance();
		
		
		
		/* Старт серверных задач */
		Console.printSection("TaskManagers");
		AttackStanceTaskManager.getInstance();
		DecayTaskManager.getInstance();
		KnownListUpdateTaskManager.getInstance();
		LeakTaskManager.getInstance();
		SQLQueue.getInstance();

		/* Таблица телепортов */
		Console.printSection("Teleport Table");
		TeleportLocationTable.getInstance();

		/* Загрузка скилов */
		Console.printSection("Skills");
		SkillTreeTable.getInstance();
		SkillTable.getInstance();
		AdditionalSkillTable.getInstance();
		ResidentialSkillTable.getInstance();
		PetSkillsTable.getInstance();
		NobleSkillTable.getInstance();
		HeroSkillTable.getInstance();

		/* Загрущка итемов */
		Console.printSection("Items");
		ItemTable.getInstance();
		ArmorSetsTable.getInstance();
		AugmentationData.getInstance();
		if (Config.SP_BOOK_NEEDED)
			SkillSpellbookTable.getInstance();
		SummonItemsData.getInstance();
		ExtractableItemsData.getInstance();
		if (Config.ALLOW_FISHING)
			FishTable.getInstance();
		ItemsOnGroundManager.getInstance();
		if (Config.AUTODESTROY_ITEM_AFTER > 0 || Config.HERB_AUTO_DESTROY_TIME > 0)
			ItemsAutoDestroy.getInstance();
		EnchantHPBonusData.getInstance();

		/* Кэш  HTML */
		HtmCache.getInstance();

		/* Данные персонажей */
		FriendData.getInstance();

		Console.printSection("Characters");
		CharNameTable.getInstance();
		CharTemplateTable.getInstance();
		LevelUpData.getInstance();
		HelperBuffTable.getInstance();
		HennaTable.getInstance();
		HennaTreeTable.getInstance();
		if (Config.ALLOW_WEDDING)
			CoupleManager.getInstance();
		ClanTable.getInstance();
		CrestCache.getInstance();
		Hero.getInstance();
		BlockListManager.getInstance();
		
		/* Загрузка всех НПЦ */
		Console.printSection("NPC Stats");
		NpcTable.getInstance();
		NpcLikePcTemplates.getInstance();
		PetDataTable.getInstance().loadPetsData();
		
		/* Автоспавн и авто чат */
		Console.printSection("Auto Handlers");
		AutoChatHandler.getInstance();
		AutoSpawnManager.getInstance();
		
		/* Семь печатей */
		Console.printSection("Seven Signs");
		SevenSigns.getInstance();
		SevenSignsFestival.getInstance();
		
		/* Замки, форты, зоны */
		Console.printSection("Entities and zones");
		CrownManager.getInstance();
		TownManager.getInstance();
		ClanHallManager.getInstance();
		DoorTable.getInstance();
		CastleManager.getInstance();
		SiegeManager.getInstance().load();
		FortManager.getInstance();
		FortSiegeManager.getInstance().load();
		ZoneManager.getInstance();
		MercTicketManager.getInstance();
		DoorTable.getInstance().registerToClanHalls();
		DoorTable.getInstance().setCommanderDoors();

		/* Осады элитных КХ */
		Console.printSection("Clan Hall Siege");
		FortResistSiegeManager.load();
		BanditStrongholdSiege.load();
		DevastatedCastleSiege.load();
		FortressOfDeadSiege.load();
		WildBeastFarmSiege.load();
		RainbowSpringSiege.load();
		// make sure that all the scheduled siege dates are in the Seal Validation period
		for (Castle castle : CastleManager.getInstance().getCastles().values())
			castle.getSiege().correctSiegeDateTime();
		
		/* Квесты */
		
		Console.printSection("Events/Script/CoreScript/Engine");
		BufferHolder.getInstance().load();
		QuestManager.getInstance();
		CoreScriptsLoader.Register();
		try
		{
			L2ScriptEngineManager.getInstance().loadScripts();
			
		}
		catch (IOException ioe)
		{
			_log.fatal("Failed loading scripts, no script going to be loaded");
		}
		QuestManager.getInstance().report();
		EventsDropManager.getInstance();
		EventDroplist.getInstance();
		if (Config.ARENA_ENABLED)
			ArenaManager.getInstance().engineInit();
		if (Config.FISHERMAN_ENABLED)
			FishermanManager.getInstance().engineInit();
		if (Config.SHOW_NOT_REG_QUEST)
			QuestMessage.showNotRegQuest();
		Console.printSection("HTML");
		_log.info(HtmCache.getInstance());

		/* Спавн, запуск спавна */
		Console.printSection("Spawns");
		SpawnTable.getInstance();
		if (Config.JAIL_SPAWN_SYSTEM)
			JailSpawnTable.getInstance().loadJailSpawns();
		if (Config.ALLOW_WEDDING)
			PcAction.spawnManager();
		DayNightSpawnManager.getInstance().notifyChangeMode();
		RaidBossSpawnManager.getInstance();
		RaidPointsManager.init();
		AutoChatHandler.getInstance();
		AutoSpawnManager.getInstance();

		/* Экономика */
		Console.printSection("Economy");
		CursedWeaponsManager.getInstance();
		TradeListTable.getInstance();
		CastleManorManager.getInstance();
		L2Manor.getInstance();
		AuctionManager.getInstance();
		TimedItemControl.getInstance();
		PartyRoomManager.getInstance();
		
		/* Олимпиада */
		Console.printSection("Olympiad");
		Olympiad.getInstance();
		
		Console.printSection("DimensionalRift");
		DimensionalRiftManager.getInstance();
		
		Console.printSection("FourSepulchers");
		FourSepulchersManager.getInstance().init();
		
		Console.printSection("Bosses");
		QueenAntManager.getInstance().init();
		ZakenManager.getInstance().init();
		CoreManager.getInstance().init();
		OrfenManager.getInstance().init();
		SailrenManager.getInstance().init();
		VanHalterManager.getInstance().init();
		
		Console.printSection("GrandBosses");
		AntharasManager.getInstance().init();
		BaiumManager.getInstance().init();
		ValakasManager.getInstance().init();
		LastImperialTombManager.getInstance().init();
		FrintezzaManager.getInstance().init();
		
		Console.printSection("Factions Manager");
		if (Config.FACTION_ENABLED)
		{
			FactionManager.getInstance();
			FactionQuestManager.getInstance();
		}
		else
			_log.info("Faction Manager: disabled.");
		
		Console.printSection("Handlers");
		ItemHandler.getInstance();
		SkillHandler.getInstance();
		UserCommandHandler.getInstance();
		VoicedCommandHandler.getInstance();
		ChatHandler.getInstance();
		
		Console.printSection("Misc");
		ObjectRestrictions.getInstance();
		L2SiegeStatus.getInstance();
		TaskManager.getInstance();
		GmListTable.getInstance();
		PetitionManager.getInstance();
		if (Config.ONLINE_PLAYERS_ANNOUNCE_INTERVAL > 0)
			OnlinePlayers.getInstance();
		CommunityBoard.getInstance();
		TimedItemControl.getInstance();
		fishingChampionship.getInstance();

		Console.printSection("Offline Service");
		if (Config.ALLOW_OFFLINE_TRADE)
			OfflineManager.getInstance();
		if (Config.RESTORE_OFFLINE_TRADERS)
			L2PcOffline.loadOffliners();
		else
			L2PcOffline.clearOffliner();

		Runtime.getRuntime().addShutdownHook(Shutdown.getInstance());
		System.gc();

		Console.printSection("ServerThreads");
		LoginServerThread.getInstance().start();
		L2GamePacketHandler gph = new L2GamePacketHandler();

		final SelectorConfig<L2GameClient> sc = new SelectorConfig<L2GameClient>(gph);

		_selectorThread = new SelectorThread<L2GameClient>(sc, gph, gph, gph, IOFloodManager.getInstance());
		_selectorThread.openServerSocket(InetAddress.getByName(Config.GAMESERVER_HOSTNAME), Config.PORT_GAME);
		_selectorThread.start();

		Console.printSection("Daemons");
		SuperDeamon.getInstance();
		if(Config.PC_CAFFE_ENABLED)
			new TaskPcCaffe().schedule(Config.PC_CAFFE_INTERVAL*60000);
		

		Console.printSection("Events");
		GameEventManager.getInstance();
		Console.printSection("Mods");
		Cristmas.startEvent();
        EventMedals.startEvent();
        StarlightFestival.startEvent();
		L2day.startEvent();
		BigSquash.startEvent();

		Console.printSection("Gm System");
		gmController.getInstance();
		gmCache.getInstance();

		Console.printSection("Extensions");
		ExtensionLoader.getInstance();

		CatsGuard.getInstance();

		try
		{
			Class<?> clazz = Class.forName("com.lameguard.LameGuard");
			if(clazz!=null) {
				File f = new File("./lameguard/lameguard.properties");
				if(f.exists()) {
					Console.printSection("LameGuard");
					LameGuard.main(new String []{"ru.catssoftware.protection.LameStub"});
				}
			}
		} catch(Exception e) {
		}
		Console.printSection("Tasks Manager");
		TaskManager.getInstance().startAllTasks();
		onStartup();
        System.gc();

		printInfo();
		
	}

	private static int[] avalibleEvents = null;

	private static String _license = null;
	private static int _revision = 0;
	private static String _releaseCandidate;
	private static String _releaseCandidate2;
	private static long _lastChangeBuild;

	public static void checkServer(int[] check)
	{
		if (avalibleEvents == null)
			avalibleEvents = check;
	}

	/**
	 * Проверка на доступность эвента.
	 * @param id
	 * @return
	 */
	public static boolean isAvalible(int id)
	{
		if (avalibleEvents != null)
			for(int event : avalibleEvents)
				if (event == id)
					return true;
		return false;
	}

	public static void setRevision(int revision)
	{
		_revision = revision;

		try
		{
			URL url = new URL("http://lucera2.ru/rev.php?rev=" + L2PcInstance.checkClass());
			URLConnection connection = url.openConnection();
			connection.setConnectTimeout(5000);
			connection.addRequestProperty("User-Agent", _license);

			InputStream is = connection.getInputStream();
			BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
			String line = reader.readLine();

			if (line != null)
			{
				StringTokenizer st = new StringTokenizer(line, " ");

				if (st.hasMoreTokens())
					_releaseCandidate = st.nextToken();

				if (st.hasMoreTokens())
					_lastChangeBuild = Long.parseLong(st.nextToken());
			}
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}

		try
		{
			URL url = new URL("http://lucera2.ru/rev.php?rev=" + revision);
			URLConnection connection = url.openConnection();
			connection.setConnectTimeout(5000);
			connection.addRequestProperty("User-Agent", _license);

			InputStream is = connection.getInputStream();
			BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8"));
			String line = reader.readLine();

			if (line != null)
			{
				StringTokenizer st = new StringTokenizer(line, " ");

				if (st.hasMoreTokens())
				{
					String next = st.nextToken();
					_releaseCandidate2 = next.contains(".") ? next.split("\\.")[0] : next;
				}
			}
		}
		catch (Exception e)
		{
			e.printStackTrace();
		}
	}

	public static int getRevision()
	{
		return _revision;
	}

	private static Set<StartupHook> _startupHooks = new HashSet<StartupHook>();
	
	public synchronized static void addStartupHook(StartupHook hook)
	{
		if (_startupHooks != null)
			_startupHooks.add(hook);
		else
			hook.onStartup();
	}

	private static void printInfo()
	{
		Console.printSection("Server Info");
		long freeMem = (Runtime.getRuntime().maxMemory() - Runtime.getRuntime().totalMemory() + Runtime.getRuntime().freeMemory()) / 1048576;
		long totalMem = Runtime.getRuntime().maxMemory() / 1048576;
		double finalTime = System.currentTimeMillis();
		_log.info("Free memory: " + freeMem + " Mb of " + totalMem + " Mb");
		_log.info("Ready on IP: " + Config.EXTERNAL_HOSTNAME + ":" + Config.PORT_GAME + ".");
		_log.info("Max players: " + Config.MAXIMUM_ONLINE_USERS);
		_log.info("Load time: " + (int) ((finalTime - _intialTime) / 1000) + " Seconds.");

		if (_license != null)
		{
			Console.printSection("lucera2.ru");
			_log.info("License: " + _license + " for RC " + _releaseCandidate2);
			_log.info("Release Candidate " + _releaseCandidate );
			Calendar calendar = Calendar.getInstance();
			calendar.setTimeInMillis(_lastChangeBuild * 1000);
			_log.info("Last build: " + calendar.getTime().toString() );
		}
		else
			System.exit(1);

		Console.printSection("");
		// set uptime
		_upTime = System.currentTimeMillis();
	}
	
	private synchronized static void onStartup()
	{
		final Set<StartupHook> startupHooks = _startupHooks;
		
		_startupHooks = null;
		
		for (StartupHook hook : startupHooks)
			hook.onStartup();
	}
	
	public interface StartupHook
	{
		public void onStartup();
	}

	public static void printMemUsage()
	{
		Console.printSection("Memory");
		for (String line : Util.getMemUsage())
			_log.info(line);
	}

	public static SelectorThread<L2GameClient> getSelectorThread()
	{
		return _selectorThread;
	}

	public static Calendar getStartedTime()
	{
		return _serverStarted;
	}

	private void prepare()
	{
		System.setProperty("line.separator", "\r\n");
		System.setProperty("file.encoding", "UTF-8");
		System.setProperty("python.home", ".");

		if (Config.CHECK_SYSTEM_PARAM && System.getProperty("user.name").equals("root") && System.getProperty("user.home").equals("/root"))
		{
			_log.info("Servers can't run under root-account ... exited.");
			System.exit(-1);
		}

		_intialTime = System.currentTimeMillis();
	
	}

	public static void setLicense(String name)
	{
		_license = name;
	}

	private void ThreadPool()
	{
		_log.info("ThreadPoolManager: Initializing.");
		ThreadPoolManager.getInstance();
		_log.info("General threads: ..... " + Config.GENERAL_THREAD_POOL_SIZE + ".");
		_log.info("Effect threads: ...... " + Config.EFFECT_THREAD_POOL_SIZE + ".");
		_log.info("AI threads: .......... " + Config.AI_THREAD_POOL_SIZE + ".");
		_log.info("Packet threads: ...... " + Config.PACKET_THREAD_POOL_SIZE + ".");
		_log.info("Total threads: ....... " + Config.THREAD_POOL_SIZE + ".");
	}
}

this is my gameserver.java code

Edited by TeenWolf
  • 0
Posted (edited)

According to where the pack stops (loading time), I would say it's because of licence system.

		if (_license != null)
		{
			Console.printSection("lucera2.ru");
			_log.info("License: " + _license + " for RC " + _releaseCandidate2);
			_log.info("Release Candidate " + _releaseCandidate );
			Calendar calendar = Calendar.getInstance();
			calendar.setTimeInMillis(_lastChangeBuild * 1000);
			_log.info("Last build: " + calendar.getTime().toString() );
		}
		else
			System.exit(1);

Drop that section of code, and all occurences of _license wherever you find it (setter, potential use of setter, etc). Potentially, drop setRevision, associated variables and uses of it.

 

You can also setLicence("Blabla") a random String just before the section of code. If it doesn't work, see first solution.

Edited by Tryskell
Guest
This topic is now closed to further replies.


  • Posts

    • Hello guys, I’m Morientes, owner of the servers you might know: L2Lionna / L2Pandora / L2Ramona / L2ERA / L2Zaken / L2Classic / L2Peri / L2Alice / L2EVA / L2Dragon and more. Over the years I’ve been developing Lineage II projects starting from High Five, then Classic, and later Essence. I started with High Five, which I turned into a very well-tested server with over 100 openings. My peak was around 2800 players online, and the server was stable (no crashes). With every opening there was always something to improve, fix, or optimize, and over time it became more and more stable. I still have all SVN commits from all those years, I can show everything via screen share if needed. The reason I’m selling is not because of the quality. The files are solid and ready to run any type of server (any rates). The problem was on our side;  we didn’t have a good long-term strategy for reopening servers as a team. About Classic: I started from 2.0 (Zaken version) and gradually upgraded it up to 4.7 Kamael. Each chronicle upgrade came with a lot of improvements, especially in terms of stability. About Essence: I started from the very first version and developed it up to High Elf (Protocol 464). Starting from Protocol 286 (Secrets of Empire), I worked with PTS files and extracted a lot of deep fixes. I unpacked AI.obj with full functionality, used official sniffers, and whenever something wasn’t clear, I checked directly on official servers and sniffed packets or data. For every chronicle update, I basically sniffed the entire official server, zones, monsters, events, mechanics, everything. From Chronicle 388, Reborn approached us to buy our files. The current L2Reborn Essence is based on my work! I can prove everything. I also have their updates integrated into my pack. I stopped development after High Elf mainly because my main developer was constantly looking for other opportunities. It became difficult to maintain a stable team, especially with everything going on (including the situation in Ukraine at that time). Eventually, I couldn’t find a reliable dev to continue working on Essence, so I decided to step away from this market last year. Now I’ve decided to sell everything. What I’m selling: All necessary tools (sniffing, geodata build, pack upgrade tools, game client parsers, L2Wiki parser, interfaces etc.) Full SVN repositories with all commits (Essence / Classic / High Five) All edited clients I still have All my data I can also include on sell an official character that is active daily, ranked, end up gear, and has access to end-game zones!!! useful for deep sniffing where normal players don’t have access. If someone wants to buy everything, I prefer a full deal and I will transfer full ownership. If needed, I can also sell parts separately, but honestly I’d prefer to sell everything to one team that can continue this project — this has been my work, my hobby, my baby. Important: I don’t offer further updates. The files are sold exactly as they are. I will, of course, explain everything you need to know to continue working on them. Contact: Telegram: @AlexAlexey Discord: .primsl2
    • Grand Opening: April 11, 2026 Website: https://l2strive.com Discord: https://discord.gg/SsUARZpbkG   🛡️ Server Rates Strive is a High Five Mid-PvP/Craft Server  Experience (XP): x15 Skill Points (SP): x15 Adena: x10 Drop: x15 Spoil: x3 Safe Enchant: +3 Max Enchant: +16 ⚔️ Enhanced Boss Jewelry     ⚔️ Making Bosses Useful Again Let’s be real: usually, Core, Orfen, and Baylor are just placeholder bosses that nobody cares about. We’ve overhauled their jewelry to make them legit end-game gear. We’ve turned these into high-value targets for PvP—if you want these massive percentage boosts, you’re going to have to fight for them.   ⚔️ Enhanced Boss Jewelry   💍 Improved Ring of Core Base Stats: M.Def 48 | HP +445 | MP +21 Offensive: P. Atk +12% | M. Atk +12% Critical: Physical Critical Rate +14 | Magic Critical Rate +2 Utility: Skill Reuse Delay -10% | MP Consumption -5% 🛡️ Improved Earring of Orfen Base Stats: M.Def 71 | MP +31 Defensive: P. Def +15% | M. Def +15% Recovery: Vampiric Rage +4% | Healing Received +6% Resistances: Bleed / Poison / Root / Sleep +20% (Chance & Resistance) 💎 Baylor's Earring Base Stats: M.Def 71 | MP +31 Speed: Atk. Spd +5% | Casting Spd +5% Combat: MP Regeneration +5% Resistances: Stun / Paralyze +30% (Chance & Resistance) 🚀 Core Features Full & Enchanted Buffs: Enjoy 6-hour durations on all standard and enchanted buffs. Premium Buffs: Premium users benefit from extended 9-hour buff durations. 100% Free AutoFarm: Built-in system for seamless progression while away from your PC. Custom Shop: Professional and intuitive UI for all essential equipment and consumables. NPC Buffer: Full scheme support to get you battle-ready instantly. Stability: Dedicated high-performance hardware with professional Anti-DDoS protection.  
    • Hello,   im looking for c4 client developer that can fix some issues, missing icons etc. if you are l2off developer then even better.   its easy ones, fix few skill icons, item icon, easy money if someone has time. I guess its lack of files in my patch, but might be smth other   contact with me on discord: endART_#6190 @DumanisT @SkyLord @XManton @Fr3DBr @mjst @Sighed any ideas who could help me XD
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..