Jump to content
  • 0

[Help] me antibuff


Question

Posted

That's an anti-buss skill, it's toggle and when you enable it, noone except buffers can buff you

 

like L2Mxc and L2DeathAvenue

 

Core Part

Index: java/com/Ovenus/gameserver/handler/skillhandlers/Continuous.java
===================================================================
--- java/com/Ovenus/gameserver/handler/skillhandlers/Continuous.java	(revision 2)
+++ java/com/Ovenus/gameserver/handler/skillhandlers/Continuous.java	(working copy)
@@ -92,6 +92,9 @@
			{
				continue;
			}
+			// With Mystic Immunity you can't be buffed/debuffed
+			if (target.isBuffShieldOn())
+				continue;
			// Player holding a cursed weapon can't be buffed and can't buff
			if (skill.getSkillType() == L2Skill.SkillType.BUFF && !(activeChar instanceof L2ClanHallManagerInstance))
			{
Index: java/com/Ovenus/gameserver/handler/skillhandlers/Disablers.java
===================================================================
--- java/com/Ovenus/gameserver/handler/skillhandlers/Disablers.java	(revision 2)
+++ java/com/Ovenus/gameserver/handler/skillhandlers/Disablers.java	(working copy)
@@ -144,6 +144,8 @@
				// or dead
				continue;
			}
+			if (target.isBuffShieldOn())
+				continue;
			switch (type)
			{
				case BETRAY:
Index: java/com/Ovenus/gameserver/model/L2Character.java
===================================================================
--- java/com/Ovenus/gameserver/model/L2Character.java	(revision 2)
+++ java/com/Ovenus/gameserver/model/L2Character.java	(working copy)
@@ -28,6 +28,7 @@
import javolution.util.FastList;
import javolution.util.FastMap;
import javolution.util.FastTable;
+
import com.Ovenus.Config;
import com.Ovenus.gameserver.GameTimeController;
import com.Ovenus.gameserver.GeoData;
@@ -144,6 +145,7 @@
	// Data Field
	private List<L2Character> _attackByList;
	private volatile boolean _isCastingNow = false;
+	private boolean _buffShield = false;
	// private L2Character _attackingChar;
	private L2Skill _lastSkillCast;
	private boolean _isAfraid = false; // Flee in a random direction
@@ -7576,6 +7578,19 @@
		return _showSummonAnimation;
	}

+	
+	public final void enableBuffShield(boolean value)
+	{
+		_buffShield = value;
+	}
+
+	public boolean isBuffShieldOn()
+	{
+
+		return (_buffShield);
+			
+	}
+	
	/**
	 * @param showSummonAnimation
	 *            The showSummonAnimation to set.
Index: java/com/Ovenus/gameserver/model/L2Effect.java
===================================================================
--- java/com/Ovenus/gameserver/model/L2Effect.java	(revision 2)
+++ java/com/Ovenus/gameserver/model/L2Effect.java	(working copy)
@@ -51,7 +51,7 @@

	public static enum EffectType
	{
-		BUFF, BUFFIMMUNITY, CHARGE, DMG_OVER_TIME, HEAL_OVER_TIME, COMBAT_POINT_HEAL_OVER_TIME, MANA_DMG_OVER_TIME, MANA_HEAL_OVER_TIME, RELAXING, STUN, ROOT, SLEEP, HATE, FAKE_DEATH, CONFUSION, CONFUSE_MOB_ONLY, MUTE, FEAR, ILENT_MOVE, SEED, PARALYZE, STUN_SELF, PSYCHICAL_MUTE, REMOVE_TARGET, TARGET_ME, SILENCE_MAGIC_PHYSICAL, BETRAY, NOBLESSE_BLESSING, SOUL_OF_THE_PHOENIX, SALVATION, PETRIFICATION, BLUFF, INVUL, INTERRUPT, CHARM_OF_LUCK, SIGNET_GROUND, SIGNET_EFFECT, SIGNET, IMMOBILEUNTILATTACKED, DEBUFF, PROTECTION_BLESSING, CHARMOFCOURAGE, SILENT_MOVE, CHANCE_SKILL_TRIGGER
+		BUFF, BUFFIMMUNITY, CHARGE, DMG_OVER_TIME, HEAL_OVER_TIME, COMBAT_POINT_HEAL_OVER_TIME, MANA_DMG_OVER_TIME, MANA_HEAL_OVER_TIME, RELAXING, STUN, ROOT, SLEEP, HATE, FAKE_DEATH, CONFUSION, CONFUSE_MOB_ONLY, MUTE, FEAR, ILENT_MOVE, SEED, PARALYZE, STUN_SELF, PSYCHICAL_MUTE, REMOVE_TARGET, TARGET_ME, SILENCE_MAGIC_PHYSICAL, BETRAY, NOBLESSE_BLESSING, SOUL_OF_THE_PHOENIX, SALVATION, PETRIFICATION, BLUFF, INVUL, INTERRUPT, CHARM_OF_LUCK, SIGNET_GROUND, SIGNET_EFFECT, SIGNET, IMMOBILEUNTILATTACKED, DEBUFF, PROTECTION_BLESSING, CHARMOFCOURAGE, SILENT_MOVE, CHANCE_SKILL_TRIGGER, PREVENT_BUFF
	}

	private static final Func[] _emptyFunctionSet = new Func[0];
Index: java/com/Ovenus/gameserver/skills/effects/EffectAntiBuffShield.java
===================================================================
--- java/com/Ovenus/gameserver/skills/effects/EffectAntiBuffShield.java	(revision 0)
+++ java/com/Ovenus/gameserver/skills/effects/EffectAntiBuffShield.java	(revision 0)
@@ -0,0 +1,71 @@
+package com.Ovenus.gameserver.skills.effects;
+
+import com.Ovenus.gameserver.model.L2Effect;
+import com.Ovenus.gameserver.model.L2Effect.EffectType;
+import com.Ovenus.gameserver.skills.Env;
+
+/**
+ * An effect that prevents player to be buffed. Doesn't work when: <LI>
+ * Self-buffing</LI> <LI>Flagged/Karma</LI> <LI>Duelling</LI>
+ * 
+ * @author Ovenus
+ */
+public final class EffectAntiBuffShield extends L2Effect
+{
+	/**
+	 * @param env
+	 * @param template
+	 */
+	public EffectAntiBuffShield(Env env, EffectTemplate template)
+	{
+		super(env, template);
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#getEffectType()
+	 */
+	@Override
+	public EffectType getEffectType()
+	{
+		return EffectType.PREVENT_BUFF;
+	}
+
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#onActionTime()
+	 */
+	@Override
+	public boolean onActionTime()
+	{
+		return false;
+	}
+	
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#onStart()
+	 */
+	@Override
+	public void onStart()
+	{
+		getEffected().enableBuffShield(true);
+		return;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see com.Ovenus.gameserver.model.L2Effect#onExit()
+	 */
+	@Override
+	public void onExit()
+	{
+		getEffected().enableBuffShield(false);
+	}
+
+
+}

 

 

DB Part

 

    
<skill id="Your Skill Here" levels="1" name="AntiBuff Shield">
    <set name="mpConsume" val="0"/>
    <set name="target" val="TARGET_SELF"/>
    <set name="reuseDelay" val="0"/>
    <set name="hitTime" val="-1"/>
    <set name="skillType" val="CONT"/>
    <set name="operateType" val="OP_TOGGLE"/>
    <set name="castRange" val="-1"/>
    <set name="effectRange" val="-1"/>
    <for>
      <effect count="1" name="AntiBuffShield" time="600000" val="0"/>
    </for>
  </skill>

Core Part

 

 

credits me..

 

paidia mporei na m pei kapoios p ta vazo ayta dld se poio arxeio kai etc gt den eksigei....

 

Thnx

7 answers to this question

Recommended Posts

  • 0
Posted

file edo les pos na to kanoume meso eclipse xoris eclipse den ginete??

 

Όχι μόνο με το eclipse μπορείς να τα περάσεις..

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...