Skip to content

Nevit's Hourglass

Featured Replies

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

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?

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

  • Author

oh, thx for the answer but i still can't understand , i'm too noob in java , like lvl 2 xD

Edited by CLCronoz

Then you should forget about the feature.

 

Start from something other.

  • Author

ok thx all

locked

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.