Page 1 of 1

Custom - Anti grief buffing voice command.

Posted: Sun Dec 27, 2009 1:48 pm
by Lineage
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number: 3707
L2JDP Revision Number: 6788

I have a voice command for anti-grief buffing. Once the player enters buff_off mode, players cant buff him.

Its working as it should but it seems its also blocking offensive/debuffs skills. Once a debuff is casted on someone "who has buff_off activated". The caster thinks it has landed "since he didnt get a message that it has failed" but it never lands. Here is the code im using:

Code: Select all

      public final L2Effect[] getEffects(L2Character effector, L2Character effected, Env env)    {        if (isPassive()) return _emptyEffectSet;         if (_effectTemplates == null)        	return _emptyEffectSet;         // doors and siege flags cannot receive any effects        if (effected instanceof L2DoorInstance ||effected instanceof L2SiegeFlagInstance )        	return _emptyEffectSet;         if (effector != effected)        {        	if (effected.isInvul())        		return _emptyEffectSet; 			[color=#FF0000][b]if ((effector instanceof L2PcInstance && (!isOffensive() || !isSkillTypeOffensive() || !isDebuff() || !isChance() || !isPvpSkill())) && effected instanceof L2PcInstance && (((L2PcInstance)effected).isBuffOff()))				return _emptyEffectSet;[/b][/color]         	if ((isOffensive() || isDebuff()) && effector instanceof L2PcInstance && ((L2PcInstance)effector).isGM())            {        		 if (!((L2PcInstance)effector).getAccessLevel().canGiveDamage())        			 return _emptyEffectSet;            }        } 
What did I miss!?

Re: Custom - Anti grief buffing voice command.

Posted: Sun Dec 27, 2009 4:11 pm
by momo61
maybe it's better if you do an active list of specified buffs that should not be allowed.

For example ID 123,124,125 etc. (im not sure these IDs are buff-skills, but im just making my point)