
Xd3sT1nYX
Members-
Posts
438 -
Credits
0 -
Joined
-
Last visited
-
Feedback
0%
Content Type
Articles
Profiles
Forums
Store
Everything posted by Xd3sT1nYX
-
With this command the players from your server can vote for the server restart. If there are 25 (config) votes the server will restart by him self. And here is the code: Index: D:/Games/Server/WorkSpace/GameServer/java/config/Mods.properties =================================================================== --- D:/Games/Server/WorkSpace/GameServer/java/config/Mods.properties (revision 194) +++ D:/Games/Server/WorkSpace/GameServer/java/config/Mods.properties (working copy) @@ -227,3 +227,12 @@ # Announce Level Settings MinLevelToAnnounce = 1 MaxLevelToAnnounce = 80 + +# ========================== # +# Server Restart Voting # +# ========================== # +# Enable Server Restart Command +AllowServerRestartCommand = False + +# Votes For Restart +VotesNeededForRestart = 20 Index: D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java =================================================================== --- D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java (revision 194) +++ D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/Config.java (working copy) @@ -960,6 +960,10 @@ public static int NPC_ANNOUNCER_MIN_LVL_TO_ANNOUNCE; public static int NPC_ANNOUNCER_MAX_LVL_TO_ANNOUNCE; public static boolean NPC_ANNOUNCER_DONATOR_ONLY; + + /** Server Restart */ + public static boolean ALLOW_SERVER_RESTART_COMMAND; + public static int VOTES_NEEDED_FOR_RESTART; /** Event Automation */ public static int TIME_BETWEEN_EVENTS; @@ -2091,6 +2095,9 @@ NPC_ANNOUNCER_MAX_ANNOUNCES_PER_DAY = Integer.parseInt(Mods.getProperty("AnnouncesPerDay", "20")); NPC_ANNOUNCER_MIN_LVL_TO_ANNOUNCE = Integer.parseInt(Mods.getProperty("MinLevelToAnnounce", "0")); NPC_ANNOUNCER_MAX_LVL_TO_ANNOUNCE = Integer.parseInt(Mods.getProperty("MaxLevelToAnnounce", "80")); + + ALLOW_SERVER_RESTART_COMMAND = Boolean.parseBoolean(Mods.getProperty("AllowServerRestartCommand", "False")); + VOTES_NEEDED_FOR_RESTART = Integer.parseInt(Mods.getProperty("VotesNeededForRestart", "20")); } catch (Exception e) { Index: D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java =================================================================== --- D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (revision 196) +++ D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java (working copy) @@ -617,6 +617,9 @@ public boolean _inEventVIP = false; public boolean _isNotVIP = false, _isTheVIP = false; public int _originalNameColourVIP, _originalKarmaVIP; + + /** Server Restart Vote Parameters */ + public boolean _voteRestart = false; /** new loto ticket **/ private int _loto[] = new int[5]; Index: D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/GameServer.java (revision 189) +++ D:/Games/Server/WorkSpace/GameServer/java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -204,6 +204,7 @@ import net.sf.l2j.gameserver.handler.voicedcommandhandlers.JoinVIP; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.OnlinePlayers; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.PmOff; +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.ServerRestartVote; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.TradeOff; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.VoiceInfo; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding; @@ -620,6 +621,9 @@ _voicedCommandHandler.registerVoicedCommandHandler(new BuyRec()); _voicedCommandHandler.registerVoicedCommandHandler(new JoinVIP()); + + if(Config.ALLOW_SERVER_RESTART_COMMAND) + _voicedCommandHandler.registerVoicedCommandHandler(new ServerRestartVote()); _log.config("VoicedCommandHandler: Loaded " + _voicedCommandHandler.size() + " handlers."); Now create new file named ServerRestartVote.java in net.sf.l2j.gameserver.commandhandler.voicedcommands and place this: /* * 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 <http://www.gnu.org/licenses/>. */ package net.sf.l2j.gameserver.handler.voicedcommandhandlers; import net.sf.l2j.gameserver.Announcements; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; import net.sf.l2j.gameserver.model.entity.RestartVoteVariable; /** * @author SkyLanceR */ public class ServerRestartVote implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = {"vote_restart"}; /** * * @see net.sf.l2j.gameserver.handler.IVoicedCommandHandler#useVoicedCommand(java.lang.String, net.sf.l2j.gameserver.model.actor.instance.L2PcInstance, java.lang.String) */ public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { RestartVoteVariable e = new RestartVoteVariable(); if(command.startsWith("vote_restart")) { if (activeChar._voteRestart == false) { e.increaseVoteCount("restart"); activeChar._voteRestart = true; activeChar.sendMessage("You succesfully voted for the server restart. Votes For The Moment: " + e.getVoteCount("tvt") + "."); Announcements.getInstance().announceToAll("Player: "+activeChar.getName()+" has voted for server restart. If you whant to support him type .vote_restart !"); } else { activeChar.sendMessage("You have already voted for an server restart."); } } return false; } public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } Create new file named VoteVariable.java in net.sf.l2j.gameserver.model.actor.entity and place this: /* * 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 <http://www.gnu.org/licenses/>. */ package net.sf.l2j.gameserver.model.entity; /** *@author SkyLanceR */ public class RestartVoteVariable { public int _voteCountRestart = 0; private int _voteCount = 0; public int getVoteCount(String name) { if (name == "restart") { _voteCount = _voteCountRestart; } return _voteCount; } public void increaseVoteCount(String name) { if (name == "restart") { _voteCountRestart = _voteCountRestart+1; } } } Create new file named RestartTheServer.java in net.sf.l2j.gameserver.model.actor.entity and place this: /* * 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 <http://www.gnu.org/licenses/>. */ package net.sf.l2j.gameserver.model.entity; import net.sf.l2j.Config; import net.sf.l2j.gameserver.Shutdown; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; /** * @author SkyLanceR */ public class RestartTheServer { public static void playerRestart(L2PcInstance activeChar, boolean restart) { RestartVoteVariable e = new RestartVoteVariable(); if (e.getVoteCount("restart") > Config.VOTES_NEEDED_FOR_RESTART) { Shutdown.getInstance().startShutdown(activeChar, 60, restart); } } } Tested in L2J Interlude & Working Thats all. Hope its useful and helpful. Credits: SkyLancer & Me
-
[Share] All Developers
Xd3sT1nYX replied to Xd3sT1nYX's topic in Server Development Discussion [L2J]
I checked but i didnt find it ... -
bump
-
channel look your messages and previews are not allowed.
-
I know but everyone from admins,gms etc.. can see you ;)
-
This is list of l2j developers : -------------------- L2j Server -------------------- L2J SVN: http://www.l2jserver.com/svn/ L2J TimeLine: http://www.l2jserver.com/trac/timeline L2JDP TimeLine: http://www.l2jdp.com/trac/timeline L2JDP SVN: http://www.l2jdp.com/svn/ L2J Wiki (here you will find L2Jsetup,developement guides and useful links): http://www.l2jserver.com/trac/wiki L2JDP Wiki (here you will find L2JDP installation and useful links all about the DP): http://www.l2jdp.com/trac/wiki L2JForum (For bugs , support , download and more!) http://www.l2jserver.com/forum/ Nightly : http://www.l2jserver.com/nightly/ (Here you can download your dp) -------------------- L2j-Off -------------------- Project Web Site : www.l2joff.info SVN : http://svn6.assembla.com/svn/L2jOff-IT Timeline : http://trac6.assembla.com/L2jOff-IT/timeline Trac : http://trac6.assembla.com/L2jOff-IT -------------------- L2j Archid -------------------- Forum : http://www.l2jarchid.com/ SVN : http://svn.xp-dev.com/svn/L2Archid Timeline : http://trac.xp-dev.com/L2Archid/timeline -------------------- L2j Equal -------------------- SVN : http://my-svn.assembla.com/svn/L2J-Equal -------------------- L2jFree -------------------- SVN : http://svn.l2jfree.com/svn/l2j-free/ -------------------- L2jTeon -------------------- SVN : http://my-svn.assembla.com/svn/L2JTeon/ TimeLine : http://my-trac.assembla.com/L2JTeon/timeline -------------------- L2j Emu -------------------- SVN : http://svn.assembla.com/svn/L2Emu/ Timeline : http://trac.assembla.com/L2Emu -------------------- L2j Brazil -------------------- SVN : http://svn6.assembla.com/svn/L2j-Brasil/ Timeline : http://trac6.assembla.com/L2j-Brasil/timeline -------------------- L2j Eclipse -------------------- SVN : http://l2jeclipse.info/ Timeline : http://l2jeclipse.info/ Credits: By me and God
-
Just stop spam like a kid and dont think that u are "pro"
-
• Interlude L2OFF Server Rate: • 10x Exp • 10x SP • 10x Adena • 10x spoil Rate • 10x Drop • 1.5x Party XP • 5x Fishing • 5x Quests Item Reward • 5x Drop Manor • 2x Raid Boss Drop Enchant Rates: • Enchant Rate : 66% (Normal Scrolls) • Enchant Rate : 75% (Blessed Scrolls) • Armor max enchant : +20 • Jewels max enchant : +20 • Weapon max enchant : +24 • Armor safe enchant : +4 • Jewels safe enchant: +4 • Weapon safe enchant: +3 Server Features: • C4/C5/Interlude features working 99% (The other 1% we will fix it with your support ig) • Fishing • Seven Signs • Castle Sieges • Noblesses & Heroes System • Max Level 80 • All Quests • Clan Wars • C5/Interlude Clan System • subclans (Academy,Royal Guards,Order of Knights) • Cursed weapons • Wepon Augmentations • Shadow Weapons • Dueling System • All C4/C5/Interlude Skills • All Raid Bosses + Grand Bosses + Frintezza • Olympiad 100% Retail like • Professions/Subclass/NobleS Quests needed • DualBox allowed • Full Anti-Hack system • 100% Retail like gameplay • Flawless Geodata & Pathnodes • Active and experienced development/GMteam! • No corruptions! • No Item Donations! • Not used accounts will be deleted after 2 months • NO LAG • 100% Uptime • International community Custom Features: • Bad buff protection skill ( AntiBuff Shield ) • Offline Shops Hardware: • Dual Intel Quad Core Xeon E5430 • 12 GB DDR2 • 2x Western Digital Raptor @ 10k RPM • 100 MBit FlatDedicated • Data Throughput: Unlimited • Hardware Firewall • Location: Frankfurt (DE) Website: http://www.l2elysianfields.eu
-
[Share] Desert Eagle [Interlude]
Xd3sT1nYX replied to CrazyDeagle's topic in Client Development Discussion
Do not spam omg tard. -
Read first the rulles and fix ur topic damn ... kids!
-
Hi all, Im looking for Interlude Low Rate server x8-10-15 w/o buffs mana etc.. 1,000+ online PLEASE DO NOT SPAM WITH FAIL SERVERS AND IF THEY DONT HAVE 1k on do not make reply :D
-
Do not lie zomg, come in game and show me whats unbalanced!
-
I'm not sure, server is online from 3 mounths, and will be online all the time!
-
[Share] Human Mage With White Hair
Xd3sT1nYX replied to Unforgiv3n's topic in Client Development Discussion
Nice dude, keep sharing. -
AWESOME FEATURES - STATS - NO LAG - NO OVERPOWERED CLASSES - NICE GAMEPLAY I JUST CAN SAY! Waiting for that Server JOIN US!
-
Who will give for valakas 250$ u are kidding me right?
-
Level 1-20 Do by hand or find own hunting spots. You level too quickly to have a bot run very long. I do enjoy talking island though. I often bot the orc spawns from 1-15 then the solo skeleton spawns for 15-20. Level 20-28 Hunt bottom floor of mithril mine around the static spawns of golems and nightmares.* Also one may hunt Dre Vanuls in the last room of elven ruins. A favorite of mine is the plateau near dion. Level 28-40 The execution grounds pit under the bridge past the hangman trees.* Silenos and lizard man warriors around giran harbor as well. Level 40-46 Leto man soldiers/shaman spawns of 2-4 across river from hardin's academy. Level 46-52 Lakins and weird drakes that are on the east side of the southern bridge of Narsell Lake. Best spot ever. Level 52-55 Mirros at the north west tip of the river leading to Giant's Cave. Or Blazing swamp where map lines 40-57 cross.* Level 55-61 Marshstalkers or Undead on plateau overlooking marsh drakes. Level 56-62 Oel Mahum north of ivory tower. Level 59-65 Kranrots under Giant's Cave. Level 63-67 Bot along wall in forgotten gaterway. Top B grade required.* Avoid going AFK because mobs can swarm on you easily and players can be inquisitve. Level 65-74 Doom knights if you dare. Same rules as above. Level 67-72 Trives, Falibanti, Doom knights along a wall or up on the platform. Top B required.* I wish I knew a different spot. Level 72-75 Somewhere deep in lair around kariks.* If you think you can that is."
-
He pay for it I think, so what do u want to unsticky ...
-
Next time when u speak on greek put [GR] tags.
-
[Request] Need An L2 Banner For L][Eternity!!
Xd3sT1nYX replied to dhm.msd's topic in Graphics/GFX Showcase
Maybe if u say your MSN they will add u :) -
L2 Walker Gracia Final For Windows 7
Xd3sT1nYX replied to FaceControl's topic in Request Botting [Greek]
What happen? Login on skype or MSN :) -
L2 Walker Gracia Final For Windows 7
Xd3sT1nYX replied to FaceControl's topic in Request Botting [Greek]
add me MSN: unrivaled92@hotmail.com -
[Rate & Comment] My first signatures :)
Xd3sT1nYX replied to Xd3sT1nYX's topic in Graphics/GFX Showcase
C/p? :)