-
Total de itens
21 -
Registro em
-
Última visita
Sobre claudeny
- Data de Nascimento 05/13/1993
Informação do Perfil
-
Gênero
Masculino
-
Localização
Brasil
-
Interesses
Lineage2
Últimos Visitantes
O bloco dos últimos visitantes está desativado e não está sendo visualizado por outros usuários.
claudeny's Achievements
-
claudeny alterou sua foto pessoal
-
### Eclipse Workspace Patch 1.0 #P L2JBrasil Index: L2JBrasil_CORE/java/com/it/br/Config.java =================================================================== --- L2JBrasil_CORE/java/com/it/br/Config.java (revision 339) +++ L2JBrasil_CORE/java/com/it/br/Config.java (working copy) @@ -332,6 +334,9 @@ // - L2JBRASIL PROPIETERS - // // --------------------------------------------- // // ============================================================ + public static boolean WYVERN_PROTECTION; + public static String ID_RESTRICT; + public static List<Integer> LISTID_RESTRICT; public static byte LEVEL_ON_ENTER; public static int SP_ON_ENTER; public static int STARTING_ADENA; @@ -440,7 +446,14 @@ L2JBrasil.load(is); is.close(); - LEVEL_ON_ENTER = Byte.parseByte(L2JBrasil.getProperty("LevelOnEnter", "0")); + WYVERN_PROTECTION = Boolean.parseBoolean(L2JBrasil.getProperty("WyvernProtectionEnabled", "False")); + ID_RESTRICT = L2JBrasil.getProperty("WyvernItemID", ""); + LISTID_RESTRICT = new FastList<Integer>(); + for(String classId : ID_RESTRICT.split(",")) + { + LISTID_RESTRICT.add(Integer.parseInt(classId)); + } + LEVEL_ON_ENTER = Byte.parseByte(L2JBrasil.getProperty("LevelOnEnter", "0")); SP_ON_ENTER = Integer.parseInt(L2JBrasil.getProperty("SPOnEnter", "0")); STARTING_ADENA = Integer.parseInt(L2JBrasil.getProperty("StartingAdena", "100")); CUSTOM_STARTER_ITEMS_ENABLED = Boolean.parseBoolean(L2JBrasil.getProperty("CustomStarterItemsEnabled", "False")); Index: L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java =================================================================== --- L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java (revision 339) +++ L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java (working copy) @@ -27,6 +27,7 @@ import com.it.br.gameserver.instancemanager.CastleManager; import com.it.br.gameserver.instancemanager.ClanHallManager; import com.it.br.gameserver.model.Inventory; +import com.it.br.gameserver.model.L2Character; import com.it.br.gameserver.model.L2Clan; import com.it.br.gameserver.model.L2Effect; import com.it.br.gameserver.model.L2ItemInstance; @@ -76,7 +77,15 @@ activeChar.sendPacket(new ActionFailed()); return; } - + if(Config.WYVERN_PROTECTION && activeChar.isInsideZone(L2Character.ZONE_PEACE)) + { + if(Config.LISTID_RESTRICT.contains(item.getItemId())) + { + activeChar.sendMessage("You can not use this item here within the city."); + activeChar.sendPacket(new ActionFailed()); + return; + } + } if (!activeChar.isHero() && !activeChar.isGM() && !activeChar.isFakeHero() && (item.getItemId() == 6842 || (item.getItemId() >= 6611 && item.getItemId() <= 6621))) { activeChar.sendMessage("His weapon was destroyed successfully you do not have requirements to use it"); Index: L2JBrasil_CORE/java/com/it/br/gameserver/model/zone/type/L2TownZone.java =================================================================== --- L2JBrasil_CORE/java/com/it/br/gameserver/model/zone/type/L2TownZone.java (revision 339) +++ L2JBrasil_CORE/java/com/it/br/gameserver/model/zone/type/L2TownZone.java (working copy) @@ -22,9 +22,11 @@ import org.w3c.dom.Node; import com.it.br.Config; import com.it.br.gameserver.model.L2Character; import com.it.br.gameserver.model.actor.instance.L2PcInstance; import com.it.br.gameserver.model.zone.L2ZoneType; +import com.it.br.gameserver.network.serverpackets.NpcHtmlMessage; import com.it.br.gameserver.util.Rnd; public class L2TownZone extends L2ZoneType @@ -88,12 +90,18 @@ { if (character instanceof L2PcInstance) { + if((((L2PcInstance) character).isFlying() || ((L2PcInstance) character).isMounted()) && Config.WYVERN_PROTECTION) + { + ((L2PcInstance) character).dismount(); + showHtmlWyvern((L2PcInstance) character); + } // PVP possible during siege, now for siege participants only // Could also check if this town is in siege, or if any siege is going on if (((L2PcInstance)character).getSiegeState() != 0 && Config.ZONE_TOWN == 1) return; //((L2PcInstance)character).sendMessage("You entered "+_townName); + ((L2PcInstance)character).setLastTownName(_townName); } if (!_noPeace && Config.ZONE_TOWN != 2) character.setInsideZone(L2Character.ZONE_PEACE, true); @@ -102,7 +110,8 @@ @Override protected void onExit(L2Character character) { - if (!_noPeace) character.setInsideZone(L2Character.ZONE_PEACE, false); + if (!_noPeace) + character.setInsideZone(L2Character.ZONE_PEACE, false); // if (character instanceof L2PcInstance) //((L2PcInstance)character).sendMessage("You left "+_townName); @@ -114,7 +123,16 @@ @Override protected void onReviveInside(L2Character character) {} + + public void showHtmlWyvern(L2PcInstance player) + { + String filename = "data/html/mods/protect/wyvern-protection.htm"; + + NpcHtmlMessage html = new NpcHtmlMessage(player.getObjectId()); + html.setFile(filename); + html.replace("%objectId%", String.valueOf(player.getObjectId())); + player.sendPacket(html); + } /** * Returns this town zones name * @return Index: L2JBrasil_CORE/config/custom/l2jbrasil.properties =================================================================== --- L2JBrasil_CORE/config/custom/l2jbrasil.properties (revision 339) +++ L2JBrasil_CORE/config/custom/l2jbrasil.properties (working copy) @@ -82,6 +82,17 @@ DisableGradePenalty = False # -------------------------------- # +# - Wyvern Protection's - # +# -------------------------------- # +# data/html/mods/wyvern-protection.htm +# Enable / Disable Protection +# By Leonardo Alves. +WyvernProtectionEnabled = True +# Wyvern Item ID. +# format: id,id,id +WyvernItemID = 8663 + +# -------------------------------- # # - Equipment Restriction - # # -------------------------------- # # Light Equipment Restriction Index: L2JBrasil_DP/data/html/mods/protect/wyvern-protection.htm =================================================================== --- L2JBrasil_DP/data/html/mods/protect/wyvern-protection.htm (revision 0) +++ L2JBrasil_DP/data/html/mods/protect/wyvern-protection.htm (revision 0) @@ -0,0 +1,10 @@ +<html> +<title>Wyvern Item Protection</title> +<br> +<center> +<font color="green">Wyvern Protect:</font> You can not use this item within the city.<br> +<br> +<font color="green">By:</font> Leonardo Alves.<br> +<br> +</center> +</html>
-
### Eclipse Workspace Patch 1.0 #P L2JBrasil Index: L2JBrasil_CORE/java/com/it/br/Config.java =================================================================== --- L2JBrasil_CORE/java/com/it/br/Config.java (revision 339) +++ L2JBrasil_CORE/java/com/it/br/Config.java (working copy) @@ -332,6 +334,9 @@ // - L2JBRASIL PROPIETERS - // // --------------------------------------------- // // ============================================================ + public static boolean WYVERN_PROTECTION; + public static String ID_RESTRICT; + public static List<Integer> LISTID_RESTRICT; public static byte LEVEL_ON_ENTER; public static int SP_ON_ENTER; public static int STARTING_ADENA; @@ -440,7 +446,14 @@ L2JBrasil.load(is); is.close(); - LEVEL_ON_ENTER = Byte.parseByte(L2JBrasil.getProperty("LevelOnEnter", "0")); + WYVERN_PROTECTION = Boolean.parseBoolean(L2JBrasil.getProperty("WyvernProtectionEnabled", "False")); + ID_RESTRICT = L2JBrasil.getProperty("WyvernItemID", ""); + LISTID_RESTRICT = new FastList<Integer>(); + for(String classId : ID_RESTRICT.split(",")) + { + LISTID_RESTRICT.add(Integer.parseInt(classId)); + } + LEVEL_ON_ENTER = Byte.parseByte(L2JBrasil.getProperty("LevelOnEnter", "0")); SP_ON_ENTER = Integer.parseInt(L2JBrasil.getProperty("SPOnEnter", "0")); STARTING_ADENA = Integer.parseInt(L2JBrasil.getProperty("StartingAdena", "100")); CUSTOM_STARTER_ITEMS_ENABLED = Boolean.parseBoolean(L2JBrasil.getProperty("CustomStarterItemsEnabled", "False")); Index: L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java =================================================================== --- L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java (revision 339) +++ L2JBrasil_CORE/java/com/it/br/gameserver/network/clientpackets/UseItem.java (working copy) @@ -27,6 +27,7 @@ import com.it.br.gameserver.instancemanager.CastleManager; import com.it.br.gameserver.instancemanager.ClanHallManager; import com.it.br.gameserver.model.Inventory; +import com.it.br.gameserver.model.L2Character; import com.it.br.gameserver.model.L2Clan; import com.it.br.gameserver.model.L2Effect; import com.it.br.gameserver.model.L2ItemInstance; @@ -76,7 +77,15 @@ activeChar.sendPacket(new ActionFailed()); return; } - + if(Config.WYVERN_PROTECTION && activeChar.isInsideZone(L2Character.ZONE_PEACE)) + { + if(Config.LISTID_RESTRICT.contains(item.getItemId())) + { + activeChar.sendMessage("You can not use this item here within the city."); + activeChar.sendPacket(new ActionFailed()); + return; + } + } if (!activeChar.isHero() && !activeChar.isGM() && !activeChar.isFakeHero() && (item.getItemId() == 6842 || (item.getItemId() >= 6611 && item.getItemId() <= 6621))) { activeChar.sendMessage("His weapon was destroyed successfully you do not have requirements to use it"); Index: L2JBrasil_CORE/java/com/it/br/gameserver/model/zone/type/L2TownZone.java =================================================================== --- L2JBrasil_CORE/java/com/it/br/gameserver/model/zone/type/L2TownZone.java (revision 339) +++ L2JBrasil_CORE/java/com/it/br/gameserver/model/zone/type/L2TownZone.java (working copy) @@ -22,9 +22,11 @@ import org.w3c.dom.Node; import com.it.br.Config; import com.it.br.gameserver.model.L2Character; import com.it.br.gameserver.model.actor.instance.L2PcInstance; import com.it.br.gameserver.model.zone.L2ZoneType; +import com.it.br.gameserver.network.serverpackets.NpcHtmlMessage; import com.it.br.gameserver.util.Rnd; public class L2TownZone extends L2ZoneType @@ -88,12 +90,18 @@ { if (character instanceof L2PcInstance) { + if((((L2PcInstance) character).isFlying() || ((L2PcInstance) character).isMounted()) && Config.WYVERN_PROTECTION) + { + ((L2PcInstance) character).dismount(); + showHtmlWyvern((L2PcInstance) character); + } // PVP possible during siege, now for siege participants only // Could also check if this town is in siege, or if any siege is going on if (((L2PcInstance)character).getSiegeState() != 0 && Config.ZONE_TOWN == 1) return; //((L2PcInstance)character).sendMessage("You entered "+_townName); + ((L2PcInstance)character).setLastTownName(_townName); } if (!_noPeace && Config.ZONE_TOWN != 2) character.setInsideZone(L2Character.ZONE_PEACE, true); @@ -102,7 +110,8 @@ @Override protected void onExit(L2Character character) { - if (!_noPeace) character.setInsideZone(L2Character.ZONE_PEACE, false); + if (!_noPeace) + character.setInsideZone(L2Character.ZONE_PEACE, false); // if (character instanceof L2PcInstance) //((L2PcInstance)character).sendMessage("You left "+_townName); @@ -114,7 +123,16 @@ @Override protected void onReviveInside(L2Character character) {} + + public void showHtmlWyvern(L2PcInstance player) + { + String filename = "data/html/mods/protect/wyvern-protection.htm"; + + NpcHtmlMessage html = new NpcHtmlMessage(player.getObjectId()); + html.setFile(filename); + html.replace("%objectId%", String.valueOf(player.getObjectId())); + player.sendPacket(html); + } /** * Returns this town zones name * @return Index: L2JBrasil_CORE/config/custom/l2jbrasil.properties =================================================================== --- L2JBrasil_CORE/config/custom/l2jbrasil.properties (revision 339) +++ L2JBrasil_CORE/config/custom/l2jbrasil.properties (working copy) @@ -82,6 +82,17 @@ DisableGradePenalty = False # -------------------------------- # +# - Wyvern Protection's - # +# -------------------------------- # +# data/html/mods/wyvern-protection.htm +# Enable / Disable Protection +# By Leonardo Alves. +WyvernProtectionEnabled = True +# Wyvern Item ID. +# format: id,id,id +WyvernItemID = 8663 + +# -------------------------------- # # - Equipment Restriction - # # -------------------------------- # # Light Equipment Restriction Index: L2JBrasil_DP/data/html/mods/protect/wyvern-protection.htm =================================================================== --- L2JBrasil_DP/data/html/mods/protect/wyvern-protection.htm (revision 0) +++ L2JBrasil_DP/data/html/mods/protect/wyvern-protection.htm (revision 0) @@ -0,0 +1,10 @@ +<html> +<title>Wyvern Item Protection</title> +<br> +<center> +<font color="green">Wyvern Protect:</font> You can not use this item within the city.<br> +<br> +<font color="green">By:</font> Leonardo Alves.<br> +<br> +</center> +</html>
-
Por favo quem teve o client gracia parte 2 pra download
-
esse java mod que estou colocano mais sempre nessa parte da erro + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + _instance.setMode(GM_RESTART); + System.exit(2); + } + /** * Default constucter is only used internal to create the shutdown-hook instance */ ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -26,6 +26,7 @@ import com.l2jfrozen.Config; import com.l2jfrozen.crypt.nProtect; import com.l2jfrozen.crypt.nProtect.RestrictionType; +import com.l2jfrozen.gameserver.Restart; import com.l2jfrozen.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jfrozen.gameserver.controllers.GameTimeController; import com.l2jfrozen.gameserver.datatables.CharSchemesTable; @@ -466,6 +467,11 @@ } } + if(Config.RESTART_BY_TIME_OF_DAY) + { + ShowNextRestart(activeChar); + } + // NPCBuffer if (PowerPakConfig.BUFFER_ENABLED) CharSchemesTable.getInstance().onPlayerLogin(activeChar.getObjectId()); @@ -801,6 +807,17 @@ } } + /** + * Envia mensagem para o player do proximo restart + * NOTE: RESTART_BY_TIME_OF_DAY = TRUE + * + * @param activeChar + */ + private void ShowNextRestart(L2PcInstance activeChar) + { + activeChar.sendMessage("Next Restart: " + Restart.getInstance().getRestartNextTime()); + } + @Override public String getType() { ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java (working copy) @@ -171,6 +171,18 @@ } } + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + _instance.setMode(GM_RESTART); + System.exit(2); + } + /** * Default constucter is only used internal to create the shutdown-hook instance */ ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/Restart.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/Restart.java (revision 0) +++ gameserver/head-src/com/l2jfrozen/gameserver/Restart.java (revision 0) @@ -0,0 +1,122 @@ +/* + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <[Hidden Content];. + */ + package com.l2jfrozen.gameserver; + + import java.text.SimpleDateFormat; + import java.util.Calendar; + import java.util.logging.Logger; + + import com.l2jfrozen.Config; + import com.l2jfrozen.gameserver.thread.ThreadPoolManager; + + /** + * This Config for Auto Restart GameServer + * Initialize class getInstance() + * Set Time in Config File + * Thank You L2JServer | L2JRussia + * + * @author L2JRussia + * + */ + public class Restart + { + //Variaveis globais + private static Restart _instance = null; + protected static final Logger _log = Logger.getLogger(Restart.class.getName()); + private Calendar NextRestart; + private SimpleDateFormat format = new SimpleDateFormat("HH:mm"); + + //Singleton + public static Restart getInstance() + { + if(_instance == null) + _instance = new Restart(); + return _instance; + } + + public String getRestartNextTime() + { + if(NextRestart.getTime() != null) + return format.format(NextRestart.getTime()); + else + return "Erro"; + } + + //Connstrutor + private Restart() + { + //:D + } + + public void StartCalculationOfNextRestartTime() + { + _log.info("#####################################"); + _log.info("#[Restart System]: System actived...#"); + _log.info("#####################################"); + try + { + Calendar currentTime = Calendar.getInstance(); + Calendar testStartTime = null; + long flush2 = 0,timeL = 0; + int count = 0; + + for (String timeOfDay : Config.RESTART_INTERVAL_BY_TIME_OF_DAY) + { + testStartTime = Calendar.getInstance(); + testStartTime.setLenient(true); + String[] splitTimeOfDay = timeOfDay.split(":"); + testStartTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(splitTimeOfDay[0])); + testStartTime.set(Calendar.MINUTE, Integer.parseInt(splitTimeOfDay[1])); + testStartTime.set(Calendar.SECOND, 00); + //Verifica a validade to tempo + if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis()) + { + testStartTime.add(Calendar.DAY_OF_MONTH, 1); + } + + //TimeL Recebe o quanto falta de milisegundos para o restart + timeL = testStartTime.getTimeInMillis() - currentTime.getTimeInMillis(); + + //Verifica qual horario sera o proximo restart + if(count == 0){ + flush2 = timeL; + NextRestart = testStartTime; + } + + if(timeL < flush2){ + flush2 = timeL; + NextRestart = testStartTime; + } + + count ++; + } + _log.info("[AutoRestart]: Next Restart Time: " + NextRestart.getTime().toString()); + ThreadPoolManager.getInstance().scheduleGeneral(new StartRestartTask(), flush2); + } + catch (Exception e) + { + System.out.println("[AutoRestart]: The restart automated server presented error in load restarts period config !"); + } + } + + class StartRestartTask implements Runnable + { + public void run() + { + _log.info("Start automated restart GameServer."); + Shutdown.getInstance().autoRestart(Config.RESTART_SECONDS); + } + } + } \ No newline at end of file ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (working copy) @@ -549,6 +549,14 @@ if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) OfflineTradeTable.restoreOfflineTraders(); + Util.printSection("Restart Manager"); + if(Config.RESTART_BY_TIME_OF_DAY) + Restart.getInstance().StartCalculationOfNextRestartTime(); + else + _log.info("# Auto Restart System is Disabled #"); + + System.gc(); + Util.printSection("Info"); _log.info("Operating System: " + Util.getOSName() + " " + Util.getOSVersion() + " " + Util.getOSArch()); _log.info("Available CPUs: " + Util.getAvailableProcessors()); ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/config/custom/la2slipper.properties =================================================================== --- gameserver/config/custom/la2slipper.properties (revision 936) +++ gameserver/config/custom/la2slipper.properties (working copy) @@ -2,6 +2,42 @@ # Server Config # #============================================================# +########################################### +# Automated restart config # +# Mod exclusive LA2JSlipper # +# ######################################### +# Enable / Disable Restart Auto +EnableRestartSystem = False + +# If EnableRestartSystem = True Describe hours of the day +# Example: 22:00,23:00 (hh:mm,hh:mm...) +# NOTE: Separate ":" mm:hh and "," others restart time +RestartByTimeOfDay = 00:00,12:00 + +# Seconds to restart the server ( 360 = 5 Minutos ) +# default = 360 +RestartSeconds = 360 + # Server Name Enabled: Displays a message on char login # with the server name you have set below. ServerNameEnabled = False ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/Config.java =================================================================== --- gameserver/head-src/com/l2jfrozen/Config.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/Config.java (working copy) @@ -2281,6 +2287,13 @@ public static boolean ANNOUNCE_TO_ALL_SPAWN_RB; public static boolean ANNOUNCE_TRY_BANNED_ACCOUNT; public static String ALT_Server_Name; + public static boolean ENABLE_CLAN_SYSTEM; + public static Map CLAN_SKILLS; + public static byte CLAN_LEVEL; + public static int REPUTATION_QUANTITY; + public static boolean RESTART_BY_TIME_OF_DAY; + public static int RESTART_SECONDS; + public static String[] RESTART_INTERVAL_BY_TIME_OF_DAY; + RESTART_BY_TIME_OF_DAY = Boolean.parseBoolean(la2slipperSettings.getProperty("EnableRestartSystem", "false")); + RESTART_SECONDS = Integer.parseInt(la2slipperSettings.getProperty("RestartSeconds", "360")); + RESTART_INTERVAL_BY_TIME_OF_DAY = la2slipperSettings.getProperty("RestartByTimeOfDay", "20:00").split(",");
-
estou com problema nessa parte aki na parte de add shundown.java sempre da erro + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + _instance.setMode(GM_RESTART); + System.exit(2); + } +
-
sim nessa parte tb esta dano erro gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java (working copy) + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + _instance.setMode(GM_RESTART); + System.exit(2); + } + cara se vc pode mim ajuda mandano o codico certo sem erro pra mim vai mim ajuda muito na minha criacao da minha rev
-
quero sabe por que nessa parte do mod da erro e nao funciona dereito o mod gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java (working copy) + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + _instance.setMode(GM_RESTART); + System.exit(2); + } + /** Index: gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (working copy) @@ -549,6 +549,14 @@ if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) OfflineTradeTable.restoreOfflineTraders(); + Util.printSection("Restart Manager"); + if(Config.RESTART_BY_TIME_OF_DAY) + Restart.getInstance().StartCalculationOfNextRestartTime(); + else + _log.info("# Auto Restart System is Disabled #"); + + System.gc();
-
E isso MSM tava quero usa ele MSM mais não conseguir dava erro Talvez o caminha do MySQL não e como da l2jfrozen Tayran cara eu e um amigo meu uzumaky da que do fórum nois estamos criando com servidor gracia final com base l2jserver mais nois estamos com esse problema ai
-
Gostaria de sabe se alguém sabe estala um database_installer em uma versão Gracia final L2jserver
-
Muito obrigado
-
Cara e por que vou cria um servidor gracia final e quero cria ele do zero quero fase com java mod
-
Gostaria de sabe se alguém podia mim ajuda com uma Svn Gracia final ativa como l2jserver ou l2jfree
-
### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -26,6 +26,7 @@ import com.l2jfrozen.Config; import com.l2jfrozen.crypt.nProtect; import com.l2jfrozen.crypt.nProtect.RestrictionType; +import com.l2jfrozen.gameserver.Restart; import com.l2jfrozen.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jfrozen.gameserver.controllers.GameTimeController; import com.l2jfrozen.gameserver.datatables.CharSchemesTable; @@ -466,6 +467,11 @@ } } + if(Config.RESTART_BY_TIME_OF_DAY) + { + ShowNextRestart(activeChar); + } + // NPCBuffer if (PowerPakConfig.BUFFER_ENABLED) CharSchemesTable.getInstance().onPlayerLogin(activeChar.getObjectId()); @@ -801,6 +807,17 @@ } } + /** + * Envia mensagem para o player do proximo restart + * NOTE: RESTART_BY_TIME_OF_DAY = TRUE + * + * @param activeChar + */ + private void ShowNextRestart(L2PcInstance activeChar) + { + activeChar.sendMessage("Next Restart: " + Restart.getInstance().getRestartNextTime()); + } + @Override public String getType() { ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/Shuwtdon.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java (working copy) @@ -171,6 +171,18 @@ } } + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + _instance.setMode(GM_RESTART); + System.exit(2); + } + /** * Default constucter is only used internal to create the shutdown-hook instance */ ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/Restart.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/Restart.java (revision 0) +++ gameserver/head-src/com/l2jfrozen/gameserver/Restart.java (revision 0) @@ -0,0 +1,122 @@ +/* + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <[Hidden Content];. + */ + package com.l2jfrozen.gameserver; + + import java.text.SimpleDateFormat; + import java.util.Calendar; + import java.util.logging.Logger; + + import com.l2jfrozen.Config; + import com.l2jfrozen.gameserver.thread.ThreadPoolManager; + + /** + * This Config for Auto Restart GameServer + * Initialize class getInstance() + * Set Time in Config File + * Thank You L2JServer | L2JRussia + * + * @author L2JRussia + * + */ + public class Restart + { + //Variaveis globais + private static Restart _instance = null; + protected static final Logger _log = Logger.getLogger(Restart.class.getName()); + private Calendar NextRestart; + private SimpleDateFormat format = new SimpleDateFormat("HH:mm"); + + //Singleton + public static Restart getInstance() + { + if(_instance == null) + _instance = new Restart(); + return _instance; + } + + public String getRestartNextTime() + { + if(NextRestart.getTime() != null) + return format.format(NextRestart.getTime()); + else + return "Erro"; + } + + //Connstrutor + private Restart() + { + //:D + } + + public void StartCalculationOfNextRestartTime() + { + _log.info("#####################################"); + _log.info("#[Restart System]: System actived...#"); + _log.info("#####################################"); + try + { + Calendar currentTime = Calendar.getInstance(); + Calendar testStartTime = null; + long flush2 = 0,timeL = 0; + int count = 0; + + for (String timeOfDay : Config.RESTART_INTERVAL_BY_TIME_OF_DAY) + { + testStartTime = Calendar.getInstance(); + testStartTime.setLenient(true); + String[] splitTimeOfDay = timeOfDay.split(":"); + testStartTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(splitTimeOfDay[0])); + testStartTime.set(Calendar.MINUTE, Integer.parseInt(splitTimeOfDay[1])); + testStartTime.set(Calendar.SECOND, 00); + //Verifica a validade to tempo + if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis()) + { + testStartTime.add(Calendar.DAY_OF_MONTH, 1); + } + + //TimeL Recebe o quanto falta de milisegundos para o restart + timeL = testStartTime.getTimeInMillis() - currentTime.getTimeInMillis(); + + //Verifica qual horario sera o proximo restart + if(count == 0){ + flush2 = timeL; + NextRestart = testStartTime; + } + + if(timeL < flush2){ + flush2 = timeL; + NextRestart = testStartTime; + } + + count ++; + } + _log.info("[AutoRestart]: Next Restart Time: " + NextRestart.getTime().toString()); + ThreadPoolManager.getInstance().scheduleGeneral(new StartRestartTask(), flush2); + } + catch (Exception e) + { + System.out.println("[AutoRestart]: The restart automated server presented error in load restarts period config !"); + } + } + + class StartRestartTask implements Runnable + { + public void run() + { + _log.info("Start automated restart GameServer."); + Shutdown.getInstance().autoRestart(Config.RESTART_SECONDS); + } + } + } \ No newline at end of file ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (working copy) @@ -549,6 +549,14 @@ if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) OfflineTradeTable.restoreOfflineTraders(); + Util.printSection("Restart Manager"); + if(Config.RESTART_BY_TIME_OF_DAY) + Restart.getInstance().StartCalculationOfNextRestartTime(); + else + _log.info("# Auto Restart System is Disabled #"); + + System.gc(); + Util.printSection("Info"); _log.info("Operating System: " + Util.getOSName() + " " + Util.getOSVersion() + " " + Util.getOSArch()); _log.info("Available CPUs: " + Util.getAvailableProcessors()); ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/config/custom/la2slipper.properties =================================================================== --- gameserver/config/custom/la2slipper.properties (revision 936) +++ gameserver/config/custom/la2slipper.properties (working copy) @@ -2,6 +2,42 @@ # Server Config # #============================================================# +########################################### +# Automated restart config # +# Mod exclusive LA2JSlipper # +# ######################################### +# Enable / Disable Restart Auto +EnableRestartSystem = False + +# If EnableRestartSystem = True Describe hours of the day +# Example: 22:00,23:00 (hh:mm,hh:mm...) +# NOTE: Separate ":" mm:hh and "," others restart time +RestartByTimeOfDay = 00:00,12:00 + +# Seconds to restart the server ( 360 = 5 Minutos ) +# default = 360 +RestartSeconds = 360 + # Server Name Enabled: Displays a message on char login # with the server name you have set below. ServerNameEnabled = False ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/Config.java =================================================================== --- gameserver/head-src/com/l2jfrozen/Config.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/Config.java (working copy) @@ -2281,6 +2287,13 @@ public static boolean ANNOUNCE_TO_ALL_SPAWN_RB; public static boolean ANNOUNCE_TRY_BANNED_ACCOUNT; public static String ALT_Server_Name; + public static boolean ENABLE_CLAN_SYSTEM; + public static Map CLAN_SKILLS; + public static byte CLAN_LEVEL; + public static int REPUTATION_QUANTITY; + public static boolean RESTART_BY_TIME_OF_DAY; + public static int RESTART_SECONDS; + public static String[] RESTART_INTERVAL_BY_TIME_OF_DAY; + RESTART_BY_TIME_OF_DAY = Boolean.parseBoolean(la2slipperSettings.getProperty("EnableRestartSystem", "false")); + RESTART_SECONDS = Integer.parseInt(la2slipperSettings.getProperty("RestartSeconds", "360")); + RESTART_INTERVAL_BY_TIME_OF_DAY = la2slipperSettings.getProperty("RestartByTimeOfDay", "20:00").split(",");
-
### Eclipse Workspace Patch 1.0 #P aCis_gameserver Index: java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (revision 2) +++ java/net/sf/l2j/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -17,6 +17,7 @@ import net.sf.l2j.Config; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.GameTimeController; +import net.sf.l2j.gameserver.Restart; import net.sf.l2j.gameserver.communitybbs.Manager.MailBBSManager; import net.sf.l2j.gameserver.datatables.AdminCommandAccessRights; import net.sf.l2j.gameserver.datatables.GmListTable; @@ -186,6 +187,11 @@ } } + if(Config.RESTART_BY_TIME_OF_DAY) + { + ShowNextRestart(activeChar); + } + activeChar.getMacroses().sendUpdate(); activeChar.sendPacket(new UserInfo(activeChar)); activeChar.sendPacket(new HennaInfo(activeChar)); @@ -323,4 +329,10 @@ { return false; } + + private static void ShowNextRestart(L2PcInstance activeChar) + { + activeChar.sendMessage("Next Restart: " + Restart.getInstance().getRestartNextTime()); + } + } \ No newline at end of file Index: java/net/sf/l2j/gameserver/Restart.java =================================================================== --- java/net/sf/l2j/gameserver/Restart.java (revision 0) +++ java/net/sf/l2j/gameserver/Restart.java (working copy) @@ -0,0 +1,114 @@ +/* +* This program is free software: you can redistribute it and/or modify it under +* the terms of the GNU General Public License as published by the Free Software +* Foundation, either version 3 of the License, or (at your option) any later +* version. +* +* This program is distributed in the hope that it will be useful, but WITHOUT +* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License along with +* this program. If not, see <[Hidden Content];. +*/ +package net.sf.l2j.gameserver; + +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.logging.Logger; + +import net.sf.l2j.Config; +import net.sf.l2j.gameserver.ThreadPoolManager; + +/** +* @author Toxico +*/ + +public class Restart + { + //Variaveis globais + private static Restart _instance = null; + protected static final Logger _log = Logger.getLogger(Restart.class.getName()); + private Calendar NextRestart; + private SimpleDateFormat format = new SimpleDateFormat("HH:mm"); + + //Singleton + public static Restart getInstance() + { + if(_instance == null) + _instance = new Restart(); + return _instance; + } + + public String getRestartNextTime() + { + if(NextRestart.getTime() != null) + return format.format(NextRestart.getTime()); + return "Erro"; + } + + //Connstrutor + private Restart() + { + //:D + } + + public void StartCalculationOfNextRestartTime() + { + try + { + Calendar currentTime = Calendar.getInstance(); + Calendar testStartTime = null; + long flush2 = 0,timeL = 0; + int count = 0; + + for (String timeOfDay : Config.RESTART_INTERVAL_BY_TIME_OF_DAY) + { + testStartTime = Calendar.getInstance(); + testStartTime.setLenient(true); + String[] splitTimeOfDay = timeOfDay.split(":"); + testStartTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(splitTimeOfDay[0])); + testStartTime.set(Calendar.MINUTE, Integer.parseInt(splitTimeOfDay[1])); + testStartTime.set(Calendar.SECOND, 00); + //Verifica a validade to tempo + if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis()) + { + testStartTime.add(Calendar.DAY_OF_MONTH, 1); + } + + //TimeL Recebe o quanto falta de milisegundos para o restart + timeL = testStartTime.getTimeInMillis() - currentTime.getTimeInMillis(); + + //Verifica qual horario sera o proximo restart + if(count == 0){ + flush2 = timeL; + NextRestart = testStartTime; + } + + if(timeL < flush2){ + flush2 = timeL; + NextRestart = testStartTime; + } + + count ++; + } + _log.info("Auto Restart: Next Restart Time: " + NextRestart.getTime().toString()); + ThreadPoolManager.getInstance().scheduleGeneral(new StartRestartTask(), flush2); + } + catch (Exception e) + { + System.out.println("[AutoRestart]: The restart automated server presented error in load restarts period config !"); + } + } + + class StartRestartTask implements Runnable + { + @Override + public void run() + { + _log.info("Start automated restart GameServer."); + Shutdown.getInstance().autoRestart(Config.RESTART_SECONDS); + } + } +} \ No newline at end of file Index: java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- java/net/sf/l2j/gameserver/GameServer.java (revision 2) +++ java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -178,6 +178,13 @@ GmListTable.getInstance(); RaidBossPointsManager.getInstance(); + Util.printSection("Restart Manager"); + if(Config.RESTART_BY_TIME_OF_DAY) + Restart.getInstance().StartCalculationOfNextRestartTime(); + else + _log.info("# Auto Restart System is Disabled #"); + System.gc(); + Util.printSection("Community server"); if (Config.ENABLE_COMMUNITY_BOARD) // Forums has to be loaded before clan data ForumsBBSManager.getInstance().initRoot(); Index: java/net/sf/l2j/gameserver/Shutdown.java =================================================================== --- java/net/sf/l2j/gameserver/Shutdown.java (revision 2) +++ java/net/sf/l2j/gameserver/Shutdown.java (working copy) @@ -71,6 +71,18 @@ Broadcast.toAllOnlinePlayers(sysm); } + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + SingletonHolder._instance.setMode(GM_RESTART); + System.exit(2); + } + /** * Default constucter is only used internal to create the shutdown-hook instance */ Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 2) +++ java/net/sf/l2j/Config.java (working copy) @@ -652,6 +652,11 @@ public static int ZONE_TOWN; public static boolean DISABLE_TUTORIAL; + /** Auto Restart */ + public static boolean RESTART_BY_TIME_OF_DAY; + public static int RESTART_SECONDS; + public static String[] RESTART_INTERVAL_BY_TIME_OF_DAY; + // -------------------------------------------------- // Those "hidden" settings haven't configs to avoid admins to fuck their server // You still can experiment changing values here. But don't say I didn't warn you. @@ -1261,6 +1266,10 @@ ZONE_TOWN = server.getProperty("ZoneTown", 0); SERVER_NEWS = server.getProperty("ShowServerNews", false); DISABLE_TUTORIAL = server.getProperty("DisableTutorial", false); + + RESTART_BY_TIME_OF_DAY = Boolean.parseBoolean(server.getProperty("EnableRestartSystem", "false")); + RESTART_SECONDS = Integer.parseInt(server.getProperty("RestartSeconds", "360")); + RESTART_INTERVAL_BY_TIME_OF_DAY = server.getProperty("RestartByTimeOfDay", "20:00").split(","); } else if (Server.serverMode == Server.MODE_LOGINSERVER) { Index: config/server.properties =================================================================== --- config/server.properties (revision 2) +++ config/server.properties (working copy) @@ -370,4 +370,20 @@ ShowServerNews = False # Disable tutorial on new player game entrance. Default: False. -DisableTutorial = False \ No newline at end of file +DisableTutorial = False + +# ================================================================= +# Auto Restart +# ================================================================= + +# Enable / Disable Restart Auto +EnableRestartSystem = True + +# If EnableRestartSystem = True Describe hours of the day +# Example: 22:00,23:00 (hh:mm,hh:mm...) +# NOTE: Separate ":" mm:hh and "," others restart time +RestartByTimeOfDay = 00:00,12:00 + +# Seconds to restart the server ( 360 = 5 Minutos ) +# default = 360 +RestartSeconds = 360
-
### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/network/clientpackets/EnterWorld.java (working copy) @@ -26,6 +26,7 @@ import com.l2jfrozen.Config; import com.l2jfrozen.crypt.nProtect; import com.l2jfrozen.crypt.nProtect.RestrictionType; +import com.l2jfrozen.gameserver.Restart; import com.l2jfrozen.gameserver.communitybbs.Manager.RegionBBSManager; import com.l2jfrozen.gameserver.controllers.GameTimeController; import com.l2jfrozen.gameserver.datatables.CharSchemesTable; @@ -466,6 +467,11 @@ } } + if(Config.RESTART_BY_TIME_OF_DAY) + { + ShowNextRestart(activeChar); + } + // NPCBuffer if (PowerPakConfig.BUFFER_ENABLED) CharSchemesTable.getInstance().onPlayerLogin(activeChar.getObjectId()); @@ -801,6 +807,17 @@ } } + /** + * Envia mensagem para o player do proximo restart + * NOTE: RESTART_BY_TIME_OF_DAY = TRUE + * + * @param activeChar + */ + private void ShowNextRestart(L2PcInstance activeChar) + { + activeChar.sendMessage("Next Restart: " + Restart.getInstance().getRestartNextTime()); + } + @Override public String getType() { ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/Shutdown.java (working copy) @@ -171,6 +171,18 @@ } } + public void autoRestart(int time) + { + _secondsShut = time; + + countdown(); + + _shutdownMode = GM_RESTART; + + _instance.setMode(GM_RESTART); + System.exit(2); + } + /** * Default constucter is only used internal to create the shutdown-hook instance */ ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/Restart.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/Restart.java (revision 0) +++ gameserver/head-src/com/l2jfrozen/gameserver/Restart.java (revision 0) @@ -0,0 +1,122 @@ +/* + * This program is free software: you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free Software + * Foundation, either version 3 of the License, or (at your option) any later + * version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along with + * this program. If not, see <[Hidden Content];. + */ + package com.l2jfrozen.gameserver; + + import java.text.SimpleDateFormat; + import java.util.Calendar; + import java.util.logging.Logger; + + import com.l2jfrozen.Config; + import com.l2jfrozen.gameserver.thread.ThreadPoolManager; + + /** + * This Config for Auto Restart GameServer + * Initialize class getInstance() + * Set Time in Config File + * Thank You L2JServer | L2JRussia + * + * @author L2JRussia + * + */ + public class Restart + { + //Variaveis globais + private static Restart _instance = null; + protected static final Logger _log = Logger.getLogger(Restart.class.getName()); + private Calendar NextRestart; + private SimpleDateFormat format = new SimpleDateFormat("HH:mm"); + + //Singleton + public static Restart getInstance() + { + if(_instance == null) + _instance = new Restart(); + return _instance; + } + + public String getRestartNextTime() + { + if(NextRestart.getTime() != null) + return format.format(NextRestart.getTime()); + else + return "Erro"; + } + + //Connstrutor + private Restart() + { + //:D + } + + public void StartCalculationOfNextRestartTime() + { + _log.info("#####################################"); + _log.info("#[Restart System]: System actived...#"); + _log.info("#####################################"); + try + { + Calendar currentTime = Calendar.getInstance(); + Calendar testStartTime = null; + long flush2 = 0,timeL = 0; + int count = 0; + + for (String timeOfDay : Config.RESTART_INTERVAL_BY_TIME_OF_DAY) + { + testStartTime = Calendar.getInstance(); + testStartTime.setLenient(true); + String[] splitTimeOfDay = timeOfDay.split(":"); + testStartTime.set(Calendar.HOUR_OF_DAY, Integer.parseInt(splitTimeOfDay[0])); + testStartTime.set(Calendar.MINUTE, Integer.parseInt(splitTimeOfDay[1])); + testStartTime.set(Calendar.SECOND, 00); + //Verifica a validade to tempo + if (testStartTime.getTimeInMillis() < currentTime.getTimeInMillis()) + { + testStartTime.add(Calendar.DAY_OF_MONTH, 1); + } + + //TimeL Recebe o quanto falta de milisegundos para o restart + timeL = testStartTime.getTimeInMillis() - currentTime.getTimeInMillis(); + + //Verifica qual horario sera o proximo restart + if(count == 0){ + flush2 = timeL; + NextRestart = testStartTime; + } + + if(timeL < flush2){ + flush2 = timeL; + NextRestart = testStartTime; + } + + count ++; + } + _log.info("[AutoRestart]: Next Restart Time: " + NextRestart.getTime().toString()); + ThreadPoolManager.getInstance().scheduleGeneral(new StartRestartTask(), flush2); + } + catch (Exception e) + { + System.out.println("[AutoRestart]: The restart automated server presented error in load restarts period config !"); + } + } + + class StartRestartTask implements Runnable + { + public void run() + { + _log.info("Start automated restart GameServer."); + Shutdown.getInstance().autoRestart(Config.RESTART_SECONDS); + } + } + } \ No newline at end of file ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java =================================================================== --- gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/gameserver/GameServer.java (working copy) @@ -549,6 +549,14 @@ if ((Config.OFFLINE_TRADE_ENABLE || Config.OFFLINE_CRAFT_ENABLE) && Config.RESTORE_OFFLINERS) OfflineTradeTable.restoreOfflineTraders(); + Util.printSection("Restart Manager"); + if(Config.RESTART_BY_TIME_OF_DAY) + Restart.getInstance().StartCalculationOfNextRestartTime(); + else + _log.info("# Auto Restart System is Disabled #"); + + System.gc(); + Util.printSection("Info"); _log.info("Operating System: " + Util.getOSName() + " " + Util.getOSVersion() + " " + Util.getOSArch()); _log.info("Available CPUs: " + Util.getAvailableProcessors()); ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/config/custom/la2slipper.properties =================================================================== --- gameserver/config/custom/la2slipper.properties (revision 936) +++ gameserver/config/custom/la2slipper.properties (working copy) @@ -2,6 +2,42 @@ # Server Config # #============================================================# +########################################### +# Automated restart config # +# Mod exclusive LA2JSlipper # +# ######################################### +# Enable / Disable Restart Auto +EnableRestartSystem = False + +# If EnableRestartSystem = True Describe hours of the day +# Example: 22:00,23:00 (hh:mm,hh:mm...) +# NOTE: Separate ":" mm:hh and "," others restart time +RestartByTimeOfDay = 00:00,12:00 + +# Seconds to restart the server ( 360 = 5 Minutos ) +# default = 360 +RestartSeconds = 360 + # Server Name Enabled: Displays a message on char login # with the server name you have set below. ServerNameEnabled = False ### Eclipse Workspace Patch 1.0 #P L2JFrozen Index: gameserver/head-src/com/l2jfrozen/Config.java =================================================================== --- gameserver/head-src/com/l2jfrozen/Config.java (revision 936) +++ gameserver/head-src/com/l2jfrozen/Config.java (working copy) @@ -2281,6 +2287,13 @@ public static boolean ANNOUNCE_TO_ALL_SPAWN_RB; public static boolean ANNOUNCE_TRY_BANNED_ACCOUNT; public static String ALT_Server_Name; + public static boolean ENABLE_CLAN_SYSTEM; + public static Map CLAN_SKILLS; + public static byte CLAN_LEVEL; + public static int REPUTATION_QUANTITY; + public static boolean RESTART_BY_TIME_OF_DAY; + public static int RESTART_SECONDS; + public static String[] RESTART_INTERVAL_BY_TIME_OF_DAY; + RESTART_BY_TIME_OF_DAY = Boolean.parseBoolean(la2slipperSettings.getProperty("EnableRestartSystem", "false")); + RESTART_SECONDS = Integer.parseInt(la2slipperSettings.getProperty("RestartSeconds", "360")); + RESTART_INTERVAL_BY_TIME_OF_DAY = la2slipperSettings.getProperty("RestartByTimeOfDay", "20:00").split(",");
-
Atualizações Recentes de Status
-
Ao explorar a lista dos melhores caça-níqueis, fiquei impressionado com a inovação dos jogos. Os desenvolvedores clicando aqui realmente ultrapassam os limites criativos para oferecer recursos únicos, como rodadas bônus interativas, jackpots progressivos e modos de jogo revolucionários. Esta lista abriu-me as portas para uma nova dimensão de diversão e adrenalina nos jogos de slots· 0 respostas
-
Me chama no Discord JP:· 0 respostas
ID DE USUÁRIO: RajeshreeBurange#2993
NOME: 🕷WANDINHA ADDAMS [QSMP]🕷
Tenho uma rev interlude com fake player nela, tipo o gracia pride.
Estou sem celular para usar o WhatsApp.