HeyHops Posted April 3, 2009 Posted April 3, 2009 Block Buffs - No More Stiuped Guys Create one Voice Command Handler [ Name: InvullBuffs ] package net.sf.l2j.gameserver.handler.voicedcommandhandlers; import net.sf.l2j.gameserver.handler.IVoicedCommandHandler; import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance; public class InvullBuffs implements IVoicedCommandHandler { private static String[] _voicedCommands = { "buff_block", "buff_unblock" }; public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target) { if (command.equalsIgnoreCase("buff_block")) { activeChar.setInvullBuffs(true); activeChar.sendMessage("You cant take any effect now."); } else if (command.equalsIgnoreCase("buff_unblock")) { activeChar.setInvullBuffs(false); activeChar.sendMessage("Your status restored, you can take normaly effects."); } return true; } public String[] getVoicedCommandList() { return _voicedCommands; } } Register your New Handler @@ -47,6 +47,7 @@ { _datatable = new FastMap<String, IVoicedCommandHandler>(); registerVoicedCommandHandler(new stats()); + registerVoicedCommandHandler(new InvullBuffs()); if (Config.L2JMOD_ALLOW_WEDDING) registerVoicedCommandHandler(new Wedding()); if (Config.BANKING_SYSTEM_ENABLED) Create Method "InvullBuffs" in L2PcInstance @@ -372,6 +375,8 @@ private int _lastCompassZone; // the last compass zone update send to the client private boolean _isIn7sDungeon = false; + private boolean _InvullBuffs = false; + @@ -2153,6 +2160,15 @@ { return _pvpKills; } + public void setInvullBuffs(boolean InvullBuffs) + { + _InvullBuffs = InvullBuffs; + } + + public boolean isInvullBuffs() + { + return _InvullBuffs; + } As Last Step go "net/sf/l2j/gamserver/model/L2Skill.Java" @@ -2934,6 +2962,9 @@ if (effected.isInvul()) return _emptyEffectSet; + if ((effector instanceof L2PcInstance && (!isOffensive() || !isDebuff())) && (((L2PcInstance)effected).isInvullBuffs())) + return _emptyEffectSet; + if ((isOffensive() || isDebuff()) && effector instanceof L2PcInstance && ((L2PcInstance)effector).isGM()) { if (!((L2PcInstance)effector).getAccessLevel().canGiveDamage()) Quote
Мăŝ†ếřǾƒРụрр솚 Posted April 3, 2009 Posted April 3, 2009 Thnx man! Nice share but i think this is shared again..:) Quote
HeyHops Posted April 3, 2009 Author Posted April 3, 2009 Thnx man! Nice share but i think this is shared again..:) 1.i dont know 2. this is not reshare one older share GM Quote
fdLP. Posted April 3, 2009 Posted April 3, 2009 By giving credits you can make mods life easier ... http://www.l2jserver.com/forum/thread.php?threadid=33130 jesus ... Quote
SaLeoTragem Posted April 3, 2009 Posted April 3, 2009 Man it's a good idea Thx for post :) Credits L2jserver ;D Quote
PiosEimai?Tsa? Posted April 4, 2009 Posted April 4, 2009 @Mafia/Saleo wtf you are really retards ...stiupeds give credis? how the fack you give credis for mine share without know ... omg ... Quote
fdLP. Posted April 4, 2009 Posted April 4, 2009 k poios to ekane share sto l2jforum , esy huh? h bazeis credits h feugei to topic Quote
CriticalError Posted June 13, 2009 Posted June 13, 2009 well is a nice share but maybe you give credits is better and well about post of l2jserver forum is dead :( anyway thanks for clarify this fdlp Quote
KaL Posted June 30, 2009 Posted June 30, 2009 Great! But...it works only on "peace zone", for example, if a player is in Siege, PvP, etc, can he uses this? 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.