Jump to content

Question

Posted (edited)

i have add this code

### Eclipse Workspace Patch 1.0
#P aCis_gameserver
Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java
===================================================================
--- java/net/sf/l2j/gameserver/model/actor/L2Character.java    (revision 16)
+++ java/net/sf/l2j/gameserver/model/actor/L2Character.java    (working copy)
@@ -136,6 +136,17 @@
*/
public abstract class L2Character extends L2Object
{
+    private boolean _isBuffProtected = false; //Protect From Debuffs
+    public final void setIsBuffProtected(boolean value)
+     {
+     _isBuffProtected = value;
+     }
+     
+     public boolean isBuffProtected()
+     {
+     return _isBuffProtected; 
+     }
+
    public static final Logger _log = Logger.getLogger(L2Character.class.getName());
    
    private Set<L2Character> _attackByList;
Index: java/net/sf/l2j/gameserver/handler/skillhandlers/Continuous.java
===================================================================
--- java/net/sf/l2j/gameserver/handler/skillhandlers/Continuous.java    (revision 16)
+++ java/net/sf/l2j/gameserver/handler/skillhandlers/Continuous.java    (working copy)
@@ -89,6 +89,15 @@
                    if (target.getFirstEffect(L2EffectType.BLOCK_BUFF) != null)
                        continue;
                    
+                    // Anti-Buff Protection prevents you from getting buffs by other players 
+                    if (activeChar instanceof L2PcInstance && target != activeChar && target.isBuffProtected() && !skill.isHeroSkill()
+                    && (skill.getSkillType() == L2SkillType.BUFF                        
+                    || skill.getSkillType() == L2SkillType.HEAL_PERCENT
+                    || skill.getSkillType() == L2SkillType.MANAHEAL_PERCENT
+                    || skill.getSkillType() == L2SkillType.COMBATPOINTHEAL
+                    || skill.getSkillType() == L2SkillType.REFLECT))
+                    continue;
+                                        
                    // Player holding a cursed weapon can't be buffed and can't buff
                    if (!(activeChar instanceof L2ClanHallManagerInstance) && target != activeChar)
                    {
Index: java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java
===================================================================
--- java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java    (revision 0)
+++ java/net/sf/l2j/gameserver/skills/effects/EffectDeflectBuff.java    (revision 0)
@@ -0,0 +1,82 @@
+package net.sf.l2j.gameserver.skills.effects;
+
+import net.sf.l2j.gameserver.model.L2Effect;
+import net.sf.l2j.gameserver.templates.skills.L2EffectType;
+import net.sf.l2j.gameserver.templates.skills.L2SkillType;
+import net.sf.l2j.gameserver.network.SystemMessageId;
+import net.sf.l2j.gameserver.network.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 L2EffectType getEffectType()
+ {
+     return L2EffectType.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() != L2SkillType.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 boolean onStart()
+ {
+     getEffected().setIsBuffProtected(true);
+     return true;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see net.sf.l2j.gameserver.model.L2Effect#onExit()
+ */
+ @Override
+ public void onExit()
+ {
+     getEffected().setIsBuffProtected(false);
+ }
+}
\ No newline at end of file
Index: java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java
===================================================================
--- java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java    (revision 16)
+++ java/net/sf/l2j/gameserver/network/serverpackets/SystemMessage.java    (working copy)
@@ -110,7 +110,7 @@
    private SMParam[] _params;
    private int _paramIndex;
    
-    private SystemMessage(final SystemMessageId smId)
+    public SystemMessage(final SystemMessageId smId)
    {
        final int paramCount = smId.getParamCount();
        _smId = smId;
Index: java/net/sf/l2j/gameserver/templates/skills/L2EffectType.java
===================================================================
--- java/net/sf/l2j/gameserver/templates/skills/L2EffectType.java    (revision 16)
+++ java/net/sf/l2j/gameserver/templates/skills/L2EffectType.java    (working copy)
@@ -80,5 +80,6 @@
    WARP,
    
    SIGNET_GROUND,
-    SIGNET_EFFECT
+    SIGNET_EFFECT,
+    PREVENT_BUFF
}
\ No newline at end of file
#P aCis_datapack
Index: data/xml/skills/0100-0199.xml
===================================================================
--- data/xml/skills/0100-0199.xml    (revision 11)
+++ data/xml/skills/0100-0199.xml    (working copy)
@@ -949,10 +949,14 @@
            <add order="0x40" stat="cAtkAdd" val="#crit"/>
        </for>
    </skill>
-    <skill id="194" levels="1" name="Lucky">
+    <skill id="194" levels="1" name="Anti-Buff">
+     <!-- Blocks unwanted buffs. -->
        <set name="target" val="TARGET_SELF"/>
-        <set name="skillType" val="LUCK"/>
-        <set name="operateType" val="OP_PASSIVE"/>
+        <set name="skillType" val="CONT"/>
+        <set name="operateType" val="OP_TOGGLE"/>
+        <for>
+            <effect count="0x7fffffff" name="DeflectBuff" time="3" val="0"/>
+        </for>
    </skill>
    <skill id="195" levels="2" name="Boost Breath">
        <table name="#breath"> 180 300 </table>

i have delete the skill LUCKY with the same ID i have set AutoLearnSkills=True and i have this error

 

storeSkill() couldn't store new skill. It's null type.
 

and one problem dont working the oly rank's i use acis 300revision

Edited by Ta®oS™

1 answer to this question

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.

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

    • Still looking for adaption on Vanganth GF extender adapted for modern client.
    • Why the fuck would u implement russian / polak memes into a codebase a customer uses..   Jesus christ grow up
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • ➡ Discount for your purchase: APRIL (10% discount) ➡ Our Online Shop: https://socnet.store  ➡ Our SMM-Boosting Panel: https://socnet.pro  ➡ Telegram Shop Bot: https://socnet.shop  ➡ Telegram Support: https://t.me/solomon_bog  ➡ Telegram Channel: https://t.me/accsforyou_shop  ➡ Discord Support: @AllSocialNetworksShop  ➡ Discord Server: https://discord.gg/y9AStFFsrh  ➡ WhatsApp Support: https://wa.me/79051904467 ➡ WhatsApp Channel: https://whatsapp.com/channel/0029Vau0CMX002TGkD4uHa2n  ➡ Email Support: solomonbog@socnet.store 
    • Okay, I understand. First, to get started by contributing to open projects and learning along the way. Then, when you mention starting my own project privately, do you mean taking a free datapack like L2jMobius and trying to make it functional for an online server? Great, thank you very much — all this information is really helpful. I’ve been reaching out to several server admins here in Argentina, but it seems like none of them have the time or interest to take on an intern or assistant. xd   P.S.: Are you the creator of Hopzone? Brings back memories of when I was a kid, downloading servers at the cyber café. For two dollars, I could spend the whole day playing and eating candy like crazy.   Another question: between L2jMobius, L2jServer, and aCis, which one has ALL of its code free? As you probably noticed, I'm using ChatGPT to help me translate things, lol, and it suggested the following: Project Status Open Source Accepts Juniors? Difficulty L2JMobius Very active Semi-closed Partially (with patches) Medium-High L2JServer Active Fully open Yes (directly on GitHub) Medium aCis Semi-active Unofficial Not very clear Low
  • Topics

×
×
  • Create New...