Jump to content
  • 0

Nevit's Hourglass


Question

Posted

Hi! maxcheaters. Anyone can help me to addapt this mod please? i use L2jServer (Master) - High Five version

Index: scripts/handlers/effecthandlers/EffectRecoBonus.java
===================================================================
--- scripts/handlers/effecthandlers/EffectRecoBonus.java	(revision 0)
+++ scripts/handlers/effecthandlers/EffectRecoBonus.java	(revision 0)
@@ -0,0 +1,73 @@
+package handlers.effecthandlers;
+
+import com.l2jserver.gameserver.model.L2Effect;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.skills.Env;
+import com.l2jserver.gameserver.templates.effects.EffectTemplate;
+import com.l2jserver.gameserver.templates.skills.L2EffectType;
+
+
+/**
+ * 
+ * @author JaJa
+ *
+ */
+
+public class EffectRecoBonus extends L2Effect {
+        
+        public EffectRecoBonus(Env env, EffectTemplate template)
+        {
+                super(env, template);
+        }
+
+        /**
+         * 
+         * @see com.l2jserver.gameserver.model.L2Effect#getEffectType()
+         */
+        @Override
+        public L2EffectType getEffectType()
+        {
+                return L2EffectType.BUFF;
+        }
+        
+        /**
+         * 
+         * @see com.l2jserver.gameserver.model.L2Effect#onStart()
+         */
+        @Override
+        public boolean onStart()
+        {
+                if (!(getEffected() instanceof L2PcInstance))
+                        return false;
+                
+                ((L2PcInstance) getEffected()).setRecomBonusType(1).setRecoBonusActive(true);
+                return true;
+        }
+        
+        /**
+         * 
+         * @see com.l2jserver.gameserver.model.L2Effect#onExit()
+         */
+        @Override
+        public void onExit()
+        {
+                ((L2PcInstance) getEffected()).setRecomBonusType(0).setRecoBonusActive(false);
+        }
+        
+        @Override
+        protected boolean effectCanBeStolen()
+        {
+                return false;
+        }
+        
+        /**
+         * 
+         * @see com.l2jserver.gameserver.model.L2Effect#onActionTime()
+         */
+        @Override
+        public boolean onActionTime()
+        {
+                return false;
+        }       
+        
+}
\ No newline at end of file 

all formulas has changed and i can't addapt this :L

 

Credits: JaJa

7 answers to this question

Recommended Posts

  • 0
Posted

I've checked a little H5's core, so your effect should extend the abstract class AbstractEffect which is located in com.l2jserver.gameserver.model.effects..

Also i can't see the method effectCanBeStolen(), so what it should do?

  • 0
Posted (edited)

Yep, so what it should do?

 

EDIT:

  • Moved "can be stolen" logic to L2Skill, it isn't related to the effect, but to the skill.

I see what is the logic now :lol:

You shouldn't override it then!

Edited by Tessa
Guest
This topic is now closed to further replies.


×
×
  • Create New...