SySt3MGaM3RFr3aKs Posted January 10, 2010 Posted January 10, 2010 This command removes your PvP Flag, When you have the color of the PvP Flag i mean :P. You just type .noflag and done :D Credits: ŚyśţęmƒяәдҚς Here is a simple Patch: V2 Index: trunk/Eclipse-Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/flag.java =================================================================== --- trunk/Eclipse-Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/flag.java (revision 0) +++ trunk/Eclipse-Game/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/flag.java (revision 0) @@ -0,0 +1,48 @@ +package net.sf.l2j.gameserver.handler.voicedcommandhandlers; + +import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; +import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; +import net.sf.l2j.gameserver.network.serverpackets.ActionFailed; + +/** + * @Author s + */ + +public class flag implements IVoicedCommandHandler +{ + private static final String[] VOICED_COMMANDS = + { + "noflag" + }; + + public boolean useVoicedCommand(String command, L2PcInstance activeChar, + String target) + { + if (command.equalsIgnoreCase("noflag")) + { + if (activeChar.getPvpFlag() == 0) + { + activeChar.sendMessage("You cannot use this command at this moment."); + activeChar.sendPacket(new ActionFailed()); + return false; + } + else if (activeChar.isDead() || activeChar.isFakeDeath() || activeChar.isAlikeDead() || activeChar.isFestivalParticipant() || activeChar.isInJail() || activeChar.atEvent || activeChar.isInOlympiadMode() || activeChar.inObserverMode() || activeChar.isFlying() || activeChar.isInDuel()) + { + activeChar.sendMessage("You cannot use this command at this moment."); + activeChar.sendPacket(new ActionFailed()); + return false; + } + else if (activeChar.getPvpFlag() != 0) + { + activeChar.setPvpFlag(0); + activeChar.sendMessage("You are not flagged anymore."); + } + } + return true; + } + + public String[] getVoicedCommandList() + { + return VOICED_COMMANDS; + } +} Index: trunk/Eclipse-Game/java/net/sf/l2j/gameserver/GameServer.java =================================================================== --- trunk/Eclipse-Game/java/net/sf/l2j/gameserver/GameServer.java (revision 237) +++ trunk/Eclipse-Game/java/net/sf/l2j/gameserver/GameServer.java (working copy) @@ -200,6 +200,7 @@ import net.sf.l2j.gameserver.handler.voicedcommandhandlers.trade; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.pm; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Info; +import net.sf.l2j.gameserver.handler.voicedcommandhandlers.flag; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.Cl; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.karma; import net.sf.l2j.gameserver.handler.voicedcommandhandlers.stat; @@ -615,6 +616,8 @@ _voicedCommandHandler.registerVoicedCommandHandler(new Info()); _voicedCommandHandler.registerVoicedCommandHandler(new karma()); + + _voicedCommandHandler.registerVoicedCommandHandler(new flag()); _log.config("VoicedCommandHandler: Loaded " + _voicedCommandHandler.size() + " handlers.");
CrazyDeagle Posted January 10, 2010 Posted January 10, 2010 Loooooooool xD so if i put it in my server and a player is flag, he write .noflag and the flag disapear???. SO crazy but ty for the share
Grim. Posted January 10, 2010 Posted January 10, 2010 why you dont test something before you post it?
SySt3MGaM3RFr3aKs Posted January 10, 2010 Author Posted January 10, 2010 why you dont test something before you post it? Updated + Tested.
Stefoulis15 Posted January 11, 2010 Posted January 11, 2010 already shared by revenger. btw ur code has a typo.. + if (command.equalsIgnoreCase("stat"))
SySt3MGaM3RFr3aKs Posted January 11, 2010 Author Posted January 11, 2010 already shared by revenger. btw ur code has a typo.. + if (command.equalsIgnoreCase("stat")) I already shared by revenger, if you can post the topic. And i will ask a mod to junk it. Thanks for typo, fixed :D
CrazyDeagle Posted January 11, 2010 Posted January 11, 2010 Loooooooool xD so if i put it in my server and a player is flag, he write .noflag and the flag disapear???. SO crazy but ty for the share Can i have more info system??
Stefoulis15 Posted January 11, 2010 Posted January 11, 2010 I already shared by revenger, if you can post the topic. And i will ask a mod to junk it. http://www.maxcheaters.com/forum/index.php?topic=89890.0 here it is.. Thanks for typo np
SySt3MGaM3RFr3aKs Posted January 11, 2010 Author Posted January 11, 2010 http://www.maxcheaters.com/forum/index.php?topic=89890.0 here it is.. np I didn't know that is already Shared. I codded it ( Nothing hard ) :D
mogo Posted January 11, 2010 Posted January 11, 2010 What's that? A command to trick your pvp opponents into going red? Is there atleast a check to see if you are not in combat?
SySt3MGaM3RFr3aKs Posted January 12, 2010 Author Posted January 12, 2010 What's that? A command to trick your pvp opponents into going red? Is there atleast a check to see if you are not in combat? Is not needed. when you type this command your pvp flag is removed.
CriticalError Posted January 12, 2010 Posted January 12, 2010 wow i see u do a great job with codes mates thanks a lot man another code for my collection :)
RamZuS Posted January 12, 2010 Posted January 12, 2010 Tell us how to use it..u just give a code and u say that it removes flag..Explain it better...BTW in which server u tested and worked?
rodox Posted January 12, 2010 Posted January 12, 2010 Tell us how to use it..u just give a code and u say that it removes flag.. This command removes your PvP Flag, When you have the color of the PvP Flag i mean :P. You just type .noflag and done :DIt's rather simple to use.
mogo Posted January 12, 2010 Posted January 12, 2010 Is not needed. when you type this command your pvp flag is removed. uh i mean... Let's say i'm in a fight. We are both purple. And i am about to lose (i have very low hp) so i type the command, i become white (unflagged), my opponent finishes casting, he hits me and gets red? Awesome
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now