Jump to content

Recommended Posts

Posted

Just looking at the old AntiBuff Shield made me -beep-ing sick,so i share you my own :).

By declaring the skilltypes in this skillhandler,buffs of Core Buffer won't be prevented.

Also,a core support has been made to let the skill work like toggle.

This shield protects you only from buffs casted by other players.You are free to use your self buffs ^^.

 

L2Effect.java

       CHARMOFCOURAGE,
       SIGNET_EFFECT,
       SIGNET_GROUND,
+       PREVENT_BUFF,
       PREVENT_MAGIC,
       TRANSFERDMG,
       CANCEL,
       WARP
   }

 

L2Character.java

       private boolean _isAfraid                               = false; // Flee in a random direction

+       private boolean _isBuffProtected                        = false;
private boolean _isConfused                             = false; // Attack anyone randomly

private boolean _isFakeDeath                            = false; // Fake death
private boolean _isFlying                               = false; //Is flying Wyvern?

+   public final void setIsBuffProtected(boolean value)
+   {
+      _isBuffProtected = value;
+   }
+
+   public boolean isBuffProtected()
+   {
+      return _isBuffProtected;	
+   }
}

 

Continuous.java

           // Walls and Door should not be buffed
           if (target instanceof L2DoorInstance && (skill.getSkillType() == L2Skill.SkillType.BUFF || skill.getSkillType() == L2Skill.SkillType.HOT))
           	continue;

+           // Anti-Buff Protection prevents you from getting buffs by other players
+	    if (activeChar instanceof L2PlayableInstance && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill()
+           && (skill.getSkillType() == L2Skill.SkillType.BUFF
+           || skill.getSkillType() == L2Skill.SkillType.HEAL_PERCENT
+           || skill.getSkillType() == L2Skill.SkillType.FORCE_BUFF
+           || skill.getSkillType() == L2Skill.SkillType.MANAHEAL_PERCENT
+           || skill.getSkillType() == L2Skill.SkillType.COMBATPOINTHEAL
+           || skill.getSkillType() == L2Skill.SkillType.REFLECT))
+		continue;

 

EffectDeflectBuff.java

package net.sf.l2j.gameserver.skills.effects;

import net.sf.l2j.gameserver.model.L2Effect;
import net.sf.l2j.gameserver.model.L2Effect.EffectType;
import net.sf.l2j.gameserver.model.L2Skill.SkillType;
import net.sf.l2j.gameserver.network.SystemMessageId;
import net.sf.l2j.gameserver.serverpackets.SystemMessage;
import net.sf.l2j.gameserver.skills.Env;

/**
* @author Java
*/
public final class EffectDeflectBuff extends L2Effect
{
/**
 * @param env
 * @param template
 */
public EffectDeflectBuff(Env env, EffectTemplate template)
{
	super(env, template);
}

/*
 * (non-Javadoc)
 * 
 * @see net.sf.l2j.gameserver.model.L2Effect#getEffectType()
 */
@Override
public EffectType getEffectType()
{
	return EffectType.PREVENT_BUFF;
}

/*
 * (non-Javadoc)
 * 
 * @see net.sf.l2j.gameserver.model.L2Effect#onActionTime()
 */
@Override
public boolean onActionTime()
{
	// Only cont skills shouldn't end
	if(getSkill().getSkillType() != SkillType.CONT)
		return false;

	double manaDam = calc();

	if(manaDam > getEffected().getCurrentMp())
	{
		SystemMessage sm = new SystemMessage(SystemMessageId.SKILL_REMOVED_DUE_LACK_MP);
		getEffected().sendPacket(sm);
		return false;
	}

	getEffected().reduceCurrentMp(manaDam);
	return true;
}

/*
 * (non-Javadoc)
 * 
 * @see net.sf.l2j.gameserver.model.L2Effect#onStart()
 */
@Override
public void onStart()
{
	getEffected().setIsBuffProtected(true);
	return;
}

/*
 * (non-Javadoc)
 * 
 * @see net.sf.l2j.gameserver.model.L2Effect#onExit()
 */
@Override
public void onExit()
{
	getEffected().setIsBuffProtected(false);
}
}

 

And this is how the skill should be in DP:

<skill id="add the skill id here" levels="1" name="AntiBuff-Shield">
 <set name="target" val="TARGET_SELF"/>
 <set name="skillType" val="CONT"/>
 <set name="operateType" val="OP_TOGGLE"/>
 <set name="castRange" val="-1"/>
 <set name="effectRange" val="-1"/>
 <for>
   <effect count="0x7fffffff" name="DeflectBuff" time="3" val="0"/>
 </for>
</skill>

 

Have fun!

Posted

u can't wait until get Boss replay or u need increase the number of posts ?

 

As a matter of fact more than 1 hour has passed.

« Reply #6 on: Today at 06:40:21 PM »

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
Reply to this topic...

×   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

    • Discord         :  utchiha_market Telegram        : https://t.me/utchiha_market Auto Buy Store  : https://utchiha-market.mysellauth.com/ Not sure if we’re legit? Check Our server — real reviews, real buyers https://discord.gg/uthciha-servicess  | https://campsite.bio/utchihaamkt
    • how can i write you the exact price if the price is constantly changing? you are fucking weird people
    • Marketing without structured promotion is like playing blind. Whether you're building a product, managing a brand, running a blog, developing a service, or launching a startup — visibility is one of the key success factors. No matter how good your project is, without traffic, reach, and engaged audiences, it simply won't reach the right people. ➡ In 2025, marketing is more than just advertising. It's about maintaining a consistent presence in the information space, working smartly with social media, content platforms, and audience feedback. And this process should be automated. Want more attention, reach, and traffic for your project? ➡ SocNet is a powerful and easy-to-use platform for promotion across top platforms. Who is it for? – Website, e-commerce store, and blog owners – Admins of Telegram channels, Discord servers, and communities – Content creators, streamers, and musicians – Marketers, agencies, and SMM professionals – Anyone building projects online Use our SMM Panel to boost Facebook, Instagram, Telegram, Spotify, SoundCloud, YouTube, Reddit, Threads, Kick, Discord, LinkedIn, Likee, VK, Twitch, Kwai, TikTok, Trustpilot, Apple Music, Tripadvisor, Snapchat, and more. Subscribers, likes, views, reposts, listens, live viewers, reactions, comments — everything you need. Get a $1 bonus for your first test run: Just submit a support ticket with the subject “Get Trial Bonus” on our website. ➡ Go to SMM Panel (clickable) or contact our bot support How to order: ➡ SMM Panel: Click ➡ Telegram bot version: Click (Menu ➡ SMM Panel) Our digital goods store: ➡ Online Store: Click ➡ Telegram Bot: Click Regular customers receive extra discounts and promo codes! Support: ➡ Telegram: https://t.me/solomon_bog ➡ Discord: https://discord.gg/y9AStFFsrh ➡ WhatsApp: https://wa.me/79051904467 ➡ Email: solomonbog@socnet.store ➡ Telegram Channel: https://t.me/accsforyou_shop You can also use these contacts to: — Inquire about wholesale pricing — Propose a partnership (Current partners: https://socnet.bgng.io/partners ) — Become our supplier SocNet — your store for digital goods and premium subscriptions.
  • Topics

×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock