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.



  • Posts

    • Hi players ! Meet our project Lineage 2 Hiro Classic ! A low rate classic pvp oriented with many features. No pay to win, RB/AoE, group clan pvp castle etc ...  Dynamic rates, RB Xp 4x and soon massive update with auto farm ! Join now !  https://www.lineage2hiro.com/ Can't wait to see you online !
    • To all first time buyers we give a bonus + 10% of the order. 
    • 🔥 Looking for a powerful, clean, and player-friendly Auction House system for your Lineage 2 server? This fully-featured module is ready to plug into your project and provide your players with a modern, centralized marketplace!   💼 What is it? A complete Auction House system designed for fixed-price item sales between players. Forget about private stores and spammed zones—this system offers a smooth, secure, and offline-friendly way to buy and sell items across your server.   Photo Library: https://imgur.com/a/zLlUQbW   ✅ Main Features: 🔹 Fixed-Price Listings Only: Players list items at a set price. No bidding, no delays—just fast, clean trades. 🔹 Multi-Currency Support: Works with Adena, event coins, custom currencies—fully configurable. 🔹 Dynamic Interface: Players can filter items by name, type, and price. Easy-to-use HTML layout with smooth pagination. 🔹 Sell While Offline: Post items and receive payments even if you're not online—true passive trading. 🔹 Safety First: Full validation: no equipped/augmented/restricted items unless allowed. Prevents scams, mispricing, and listing errors. 🔹 Expiration Timer (Optional): Set listing time limits. Expired items go to warehouse/mail automatically. 🔹 Spam & Duplication Protection: Prevents multiple listings of identical items and unnecessary database load. 🔹 Performance Optimized: Clean, indexed SQL structure. No lag or bloating even with thousands of listings.   ⚙️ Plug & Play Clean Java code (compatible with aCis & derivatives). Easy setup with full instructions and sample configurations. Includes SQL, HTML files, and all Java classes – fully working out of the box.   💰 Pricing & Contact 📦 50 euro - One-time purchase with full support for setup & basic customization. 💬 Contact me here via PM or on Discord: @Luminous 🔐 Serious buyers only – source is clean, secure, and tested on live servers.     Give your server the next-level economy it deserves. No more chaotic trade zones. No more confusion. Just clean, efficient, server-wide trading.
    • We are certainly not an ambulance, but we will definitely cure you of blacklists and empty pockets. Live freely with SX! Each of you will receive a trial version of SX to familiarize yourself with the product, all you have to do is post in this thread
  • Topics

×
×
  • Create New...