Vkouk Posted February 6, 2010 Posted February 6, 2010 Hello mates.Again a new code by me.Also thanks Coyote for his help :-* So i didn't find any code for this,so i decided to make it.It's more simple than my previous code.So let's see what i did. Index: java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- java/net/sf/l2j/gameserver/GameServer.java (revision 160) +++ java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -210,6 +210,7 @@ import net.sf.l2j.gameserver.handler.usercommandhandlers.Time; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Banking; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Online; +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Res; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.ServerInfos; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Wedding; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.stats; @@ -633,6 +634,9 @@ if(Config.ENABLE_INFOS_VC) _voicedCommandHandler.registerVoicedCommandHandler(new ServerInfos()); + + if(Config.RES_COMMAND) + _voicedCommandHandler.registerVoicedCommandHandler(new Res()); _log.config("VoicedCommandHandler: Loaded " + _voicedCommandHandler.size() + " handlers."); Index: java/net/sf/l2j/Config.java =================================================================== --- java/net/sf/l2j/Config.java (revision 160) +++ java/net/sf/l2j/Config.java (working copy) @@ -965,6 +965,7 @@ public static int TRADE_UNITS; public static boolean ONLINE_PLAYERS; public static boolean ENABLE_INFOS_VC; + public static boolean RES_COMMAND; /** Custom Project Modifications - End */ /** FloodProtector - Start */ @@ -2073,6 +2074,7 @@ TRADE_UNITS = Integer.parseInt(L2JModSettings.getProperty("TradeUnits", "250")); ONLINE_PLAYERS = Boolean.parseBoolean(L2JModSettings.getProperty("OnlinePLayers", "False")); ENABLE_INFOS_VC = Boolean.parseBoolean(L2JModSettings.getProperty("InfosVoicedCommand", "False")); + RES_COMMAND =Boolean.parseBoolean(L2JModSettings.getProperty("ResVoicedCommand" , "False")); /** Custom Project Modifications - End */ Index: java/config/l2jmods.properties =================================================================== --- java/config/l2jmods.properties (revision 160) +++ java/config/l2jmods.properties (working copy) @@ -295,8 +295,11 @@ # Default : False OnlinePLayers = False # Allow the use of .info command? # An html window pops up and shows infos to the player # the admin sets what the html window will show from # the file at data/html/ServerInfos.htm InfosVoicedCommand = False + +# Allow the use of .res command? +ResVoicedCommand = False Index: java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Res.java =================================================================== --- java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Res.java (revision 0) +++ java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Res.java (revision 0) @@ -0,0 +1,55 @@ +/* + * 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 2, 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, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + * + * http://www.gnu.org/copyleft/gpl.html + */ + +package net.sf.l2j.gameserver.handler.voicedcommandhandlers; + +import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; + + +/** + * @author Ventic + */ + +public class Res implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = { "res" }; + + public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) + { + + if (command.startsWith("res")) + { + if (activeChar.isInOlympiadMode()) + { + activeChar.sendMessage("Res in oly? Forget it bro!"); + return false; + } + + activeChar.doRevive(); + activeChar.sendMessage("Revived!"); + } + return true; + } + + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +} Give me feedback plz. -Ventic
Kяaσh Posted February 6, 2010 Posted February 6, 2010 already shared http://www.maxcheaters.com/forum/index.php?topic=34221.0
CriticalError Posted February 6, 2010 Posted February 6, 2010 another good job to you my friend we have a new java coder in team :D gl
Vkouk Posted February 6, 2010 Author Posted February 6, 2010 already shared http://www.maxcheaters.com/forum/index.php?topic=34221.0 i make it,more easier anyway i am waiting for someone to give me feedback. another good job to you my friend we have a new java coder in team :D gl i need more practise.but thanks for your good words about me.
Kràtos Posted February 6, 2010 Posted February 6, 2010 what is the defferent between this? http://www.maxcheaters.com/forum/index.php?topic=34221.0 Only you remove the checks and the consumable item? And what you check only the olympiad mode? If it is on castle siege... or fort siege? Wen you try to make something make something new... ;]
Łighto™ Posted February 6, 2010 Posted February 6, 2010 lol...you think we're stupid? Your both shares are just c/p and you just change some things! ok ok you know now how to make a custom command! gratz :)
Vkouk Posted February 6, 2010 Author Posted February 6, 2010 what is the defferent between this? http://www.maxcheaters.com/forum/index.php?topic=34221.0 Only you remove the checks and the consumable item? And what you check only the olympiad mode? If it is on castle siege... or fort siege? When you try to make something make something new... ;] It was my second code.What did you exept from me?I am not professional java dev. Anyway i am waiting for a feedback. lol...you think we're stupid? Your both shares are just c/p and you just change some things! ok ok you know now how to make a custom command! gratz :) c/p?what did you drink?drugs or what?check my two codes and tell me if they are leeched
Kràtos Posted February 6, 2010 Posted February 6, 2010 It was my second code.What did you exept from me?I am not professional java dev. Anyway i am waiting for a feedback. what second code...?? x[ is just a c/p and not a second code next time write the proper credits! ~Locked
Vkouk Posted February 6, 2010 Author Posted February 6, 2010 what second code...?? x[ is just a c/p and not a second code next time write the proper credits! ~Locked http://www.maxcheaters.com/forum/index.php?topic=122994.0 It's c/p and this?I didn't c/p any code and this i made it by myself.Anyway i won't continue it re-locked
Kràtos Posted February 6, 2010 Posted February 6, 2010 http://www.maxcheaters.com/forum/index.php?topic=122994.0 It's c/p and this?I didn't c/p any code and this i made it by myself.Anyway i won't continue it re-locked Write the proper credits!!! You just remove some lines ....you add nothing NOTHING!
Recommended Posts