RєVєnGeR^ Posted October 5, 2009 Posted October 5, 2009 NullPvPFlag.java /* * 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 Revenger * */ public class NullPvPFlag implements IVoicedCommandHandler { private static final String[] VOICED_COMMANDS = { "null_pvp_flag" }; public boolean useVoicedCommand(String command, L2PcInstance activeChar,String target) { if (command.equalsIgnoreCase("null_pvp_flag")) { if (activeChar.getPvpFlag() != 0 ) { activeChar.setPvpFlag(0); } else if (activeChar.isParalyzed() || activeChar.isRooted() || activeChar.isDead() || activeChar.isAlikeDead() || activeChar.isConfused() || activeChar.isBetrayed() || activeChar.isFakeDeath() || activeChar.isFlying() || activeChar.isMounted() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.inObserverMode() || activeChar.isInJail()) { activeChar.sendMessage("You Cannot Use This Command Right Now!"); return false; } } return true; } public String[] getVoicedCommandList() { return VOICED_COMMANDS; } } then register it on the gameserver import net.sf.l2j.gameserver.handler.voicedcommandhandlers.NullPvPFlag; _voicedCommandHandler.registerVoicedCommandHandler(new NullPvPFlag()); Quote
MaestroLuke Posted October 5, 2009 Posted October 5, 2009 I like that,you can also add item consume so you can set use it Quote
Street-Gamer Posted October 5, 2009 Posted October 5, 2009 w00w c00lll.. i very Like That.. Thanks a Lot. Keep Up The Updated. Quote
WizZy™ Posted October 5, 2009 Posted October 5, 2009 No point .. lol :S when im on 500~ hp i`ll just use it and my attacker will get PK.. thats something like a scam :D Quote
MaestroLuke Posted October 5, 2009 Posted October 5, 2009 No point .. lol :S when im on 500~ hp i`ll just use it and my attacker will get PK.. thats something like a scam :D lol i didn't saw the restriction Quote
Nik Posted October 5, 2009 Posted October 5, 2009 yeah... its quite scammable... unless it takes some item and sets your pvp flag to 0 after ~5 secs... BTW... i find this as more propper way if (activeChar.isParalyzed() || activeChar.isRooted() || activeChar.isDead() || activeChar.isAlikeDead() || activeChar.isConfused() || activeChar.isBetrayed() || activeChar.isFakeDeath() || activeChar.isFlying() || activeChar.isMounted() || activeChar.isInDuel() || activeChar.isInOlympiadMode() || activeChar.inObserverMode() || activeChar.isInJail()) { activeChar.sendMessage("You Cannot Use This Command Right Now!"); return false; } else if (activeChar.getPvpFlag() != 0 ) { activeChar.setPvpFlag(0); } } Quote
WizZy™ Posted October 5, 2009 Posted October 5, 2009 You can add isInCombat .. he can run and when he runs out just to remove his flag in order not to pvp anymore.. since he's a running pussy :D Quote
Intrepid Posted October 5, 2009 Posted October 5, 2009 well well well maybe Revenger soon can make bit bigger things?^^ Quote
RєVєnGeR^ Posted October 5, 2009 Author Posted October 5, 2009 well well well maybe Revenger soon can make bit bigger things?^^ With my teachers , of course i will :D Quote
WizZy™ Posted October 5, 2009 Posted October 5, 2009 well well well maybe Revenger soon can make bit bigger things?^^ my first share was.. enterworld.java if (!activeChar.isHero()) { activeChar.setHero(); } lol :D its a nice start though. Quote
Intrepid Posted October 5, 2009 Posted October 5, 2009 my first share was.. enterworld.java if (!activeChar.isHero()) { activeChar.setHero(); } lol :D its a nice start though. my first share was all class subclass to all class :D nobody born smart good thing that some ppl start to learn^^ Quote
~Greedy~ Posted October 6, 2009 Posted October 6, 2009 omfg :D :D :D this is one funny funny tool :D :D :D thnx for share dude :D P.S. and this one im going to add in my pack :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.