Jump to content
  • 0

Question

Posted

Can someone adapt this code for l2reunion?

 

And where to put it because i am new and i don't know how to put it so please can someone help me and adapt?

-import java.util.Vector;
+import javolution.util.FastMap;
 
 import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.ThreadPoolManager;
@@ -52,7 +52,7 @@
         // Get skill power (which is used as baseRate).
         final double skillPower = skill.getPower();
         
-        Vector<L2Skill> cancelledBuffs = new Vector<>();
+        FastMap<L2Skill, int[]> cancelledBuffs = new FastMap<>();
         
         for (L2Object obj : targets)
         {
@@ -108,9 +108,9 @@
                     // Stores the last canceled skill for further use.
                     lastCanceledSkillId = effect.getSkill().getId();
                     
-                    if (!cancelledBuffs.contains(effect.getSkill()))
+                    if (!cancelledBuffs.containsKey(effect.getSkill()))
                     {
-                        cancelledBuffs.add(effect.getSkill());
+                        cancelledBuffs.put(effect.getSkill(), new int[] { effect.getCount(), effect.getTime() });
                     }
                     
                     // Exit the effect.

and

 package net.sf.l2j.gameserver.model.entity.custom;
 
-import java.util.Vector;
+import javolution.util.FastMap;
 
+import net.sf.l2j.gameserver.model.L2Effect;
 import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.skills.Env;
+import net.sf.l2j.gameserver.skills.effects.EffectTemplate;
 
 /**
  * @author Anarchy
@@ -26,9 +29,9 @@
 public class CustomCancelTask implements Runnable
 {
     private L2PcInstance _player = null;
-    private Vector<L2Skill> _buffs = null;
+    private FastMap<L2Skill, int[]> _buffs = null;
         
-    public CustomCancelTask(L2PcInstance _player, Vector<L2Skill> _buffs)
+    public CustomCancelTask(L2PcInstance _player, FastMap<L2Skill, int[]> _buffs)
     {
         this._player = _player;
         this._buffs = _buffs;
@@ -42,7 +45,7 @@
             return;
         }
             
-        for (L2Skill s : _buffs)
+        for (L2Skill s : _buffs.keySet())
         {
             if (s == null)
             {
@@ -49,7 +52,21 @@
                 continue;
             }
                 
-            s.getEffects(_player, _player);
+             Env env = new Env();
+             env.player = _player;
+             env.target = _player;
+             env.skill = s;
+             L2Effect ef;
+             for (EffectTemplate et : s.getEffectTemplates())
+             {
+                ef = et.getEffect(env);
+                 if (ef != null)
+                 {
+                     ef.setCount(_buffs.get(s)[0]);
+                     ef.setFirstTime(_buffs.get(s)[1]);
+                     ef.scheduleEffect();
+                 }
+             }
         }
     }
 }
\ No newline at end of file

or check the topic 

 

here the link

 

http://www.maxcheate...r-cancellation/

 

and i am sorry for my bad english

 

and i can't speak english im using google translate

 

please help

 

thanks.

 

 

 

10 answers to this question

Recommended Posts

  • 0
Posted

Can someone adapt this code for l2reunion?

 

And where to put it because i am new and i don't know how to put it so please can someone help me and adapt?

-import java.util.Vector;
+import javolution.util.FastMap;
 
 import net.sf.l2j.Config;
 import net.sf.l2j.gameserver.ThreadPoolManager;
@@ -52,7 +52,7 @@
         // Get skill power (which is used as baseRate).
         final double skillPower = skill.getPower();
         
-        Vector<L2Skill> cancelledBuffs = new Vector<>();
+        FastMap<L2Skill, int[]> cancelledBuffs = new FastMap<>();
         
         for (L2Object obj : targets)
         {
@@ -108,9 +108,9 @@
                     // Stores the last canceled skill for further use.
                     lastCanceledSkillId = effect.getSkill().getId();
                     
-                    if (!cancelledBuffs.contains(effect.getSkill()))
+                    if (!cancelledBuffs.containsKey(effect.getSkill()))
                     {
-                        cancelledBuffs.add(effect.getSkill());
+                        cancelledBuffs.put(effect.getSkill(), new int[] { effect.getCount(), effect.getTime() });
                     }
                     
                     // Exit the effect.

and

 package net.sf.l2j.gameserver.model.entity.custom;
 
-import java.util.Vector;
+import javolution.util.FastMap;
 
+import net.sf.l2j.gameserver.model.L2Effect;
 import net.sf.l2j.gameserver.model.L2Skill;
 import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.skills.Env;
+import net.sf.l2j.gameserver.skills.effects.EffectTemplate;
 
 /**
  * @author Anarchy
@@ -26,9 +29,9 @@
 public class CustomCancelTask implements Runnable
 {
     private L2PcInstance _player = null;
-    private Vector<L2Skill> _buffs = null;
+    private FastMap<L2Skill, int[]> _buffs = null;
         
-    public CustomCancelTask(L2PcInstance _player, Vector<L2Skill> _buffs)
+    public CustomCancelTask(L2PcInstance _player, FastMap<L2Skill, int[]> _buffs)
     {
         this._player = _player;
         this._buffs = _buffs;
@@ -42,7 +45,7 @@
             return;
         }
             
-        for (L2Skill s : _buffs)
+        for (L2Skill s : _buffs.keySet())
         {
             if (s == null)
             {
@@ -49,7 +52,21 @@
                 continue;
             }
                 
-            s.getEffects(_player, _player);
+             Env env = new Env();
+             env.player = _player;
+             env.target = _player;
+             env.skill = s;
+             L2Effect ef;
+             for (EffectTemplate et : s.getEffectTemplates())
+             {
+                ef = et.getEffect(env);
+                 if (ef != null)
+                 {
+                     ef.setCount(_buffs.get(s)[0]);
+                     ef.setFirstTime(_buffs.get(s)[1]);
+                     ef.scheduleEffect();
+                 }
+             }
         }
     }
 }
\ No newline at end of file

or check the topic 

 

here the link

 

http://www.maxcheate...r-cancellation/

 

and i am sorry for my bad english

 

and i can't speak english im using google translate

 

please help

 

thanks.

with this code buffs give back and in olympiad not only in pvp i have tested

  • 0
Posted

bump

for adapt correct 1 code must have the pack of you want to adapt. and havent all the l2jreunion pack for help you. so add the code, change the imports and if you have errors post here.

  • 0
Posted

for adapt correct 1 code must have the pack of you want to adapt. and havent all the l2jreunion pack for help you. so add the code, change the imports and if you have errors post here.

i don't know how to change the imports and adapt :( i'm so new and n00b

 

if you want to download the l2r pack you can download it here

 

 

DOWNLOAD LINK

Rar Password : www.l2reunion.eu

 

or go there and download it IF YOU WANT :(

 

and thank you for your reply

  • 0
Posted

i don't know how to change the imports and adapt :( i'm so new and n00b

 

if you want to download the l2r pack you can download it here

 

 

or go there and download it IF YOU WANT :(

 

and thank you for your reply

ok listen me. 1st of all you must learn how add java codes.read any guide for uderstund how it works. 2nd  the import is this:  

 

import net.sf.l2j.gameserver.model.L2Effect . (interlude)

 

 

import com.l2jserver.gameserver. blabla  (l2jfreya)

 

so if you want to adapt the imports from interlude to freya you must change to this:

 

import com.l2jserver.gameserver.model.L2Effect

 

so read guides how add java codes, if you read guides you understund me what i say before. so if you uderstund me you can adapt the code. i cant give you the code adapted cuz i must download the pack and bla bla...and i havent the time. after you must learn how add java codes. good luck from me :)

  • 0
Posted

Will i tried to adapt the imports and i failed, i told you i don't know how to adapt

 

JzjtFnK.png

man listen me. with these errors in console you have alot of errors in eclipse. you have forgot alot of ; and } go to fix this and read guides about coding. i havent the time for download pack import in eclipse and alot of work and i havent the time. read guides how add java codes and check your errors in eclipse i think you have alot of errors

  • 0
Posted

Can someone adapt it or give me tutorials how to adapt i searched everywhere and i didn't find any thing!

 

my request is it hard or what? just give the tutorial how to adapt  or the easy way: adapt it for me xD

 

please :((

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Posts

    • Server owners, Top.MaxCheaters.com is now live and accepting Lineage 2 server listings. There is no voting, no rankings manipulation, and no paid advantages. Visibility is clean and equal, and early listings naturally appear at the top while the platform grows. If your server is active, it should already be listed. Submit here  https://Top.MaxCheaters.com This platform is part of the MaxCheaters.com network and is being built as a long-term reference point for the Lineage 2 community. — MaxCheaters.com Team
    • Someone knows if there is a free download in some place for get it?. Thanks!
    • NEWS Elysian Realms   LINEAGE 2 PRIVATE PUBLIC SERVER A complete, optimized, and feature-rich Lineage 2 experience — ready to launch, play, and scale.  OVERVIEW Elysian Realms is a high-quality Lineage 2 private public server pack, crafted for stability, balance, and long-term gameplay enjoyment. Every system is preconfigured and battle-tested, allowing server owners to focus on community and growth rather than constant fixes. Whether you aim for classic nostalgia or a modern custom experience, Elysian Realms adapts to your vision. STABLE & SECURE CORE Performance-focused and scalable core High uptime & low latency Bug-free, smooth gameplay Designed for long-term server stability Your players stay focused on the world — not server issues.  CUSTOM FEATURES WITHOUT COMPROMISE Authentic Lineage 2 feeling enhanced with smart QoL systems:  Interface & Visuals Unique UI tweaks Custom skins, armors, weapons, tattoos & cloaks Special camera effects on death Color Choose Player system Vitality 16+ special armor effects  Gameplay Systems Balanced skills & stats (fully tested) Unique Rebirth Manager (Doll Skills) Dolls items with custom skills Rune XP Bonus system (XP / SP / Drop boosts) Auto Pots system (.menu) Buff cancel (5 sec return)  PVE & FARMING CONTENT Expanded PvE zones Solo farm zones (Top / Mid / Low LS) Tyrannosaurus addons with top LS drops Party Farm Event Dungeon Manager Top Farm Items Manager Global Drop System Farm Protection (Captcha) Solo & Zerg protection system  PVP & COMPETITIVE EVENTS Flag Raid Zones (PvP zones) PvP Top Player events + rewards Special PvP & PK rankings (spawned in Giran) Tournament events (x3 / x5 / x9) TvT & CTF Random 1vs1 Event Hero Boss Event System Race of Wars (Unique Event) Elysian Ultimate Zones – God Zone RAIDS & WORLD CONTENT Raid HP announcements Special Gatekeeper: Farm Zones PvP Zones Raid Zones Event Zones Party Farms Random Locations Flagged Raid Zones (PvP enabled) AUTOMATION & SMART SYSTEMS Auto Farm (VIP) Auto Gold Bar system Auto NPC announcements (Giran Town) Auto login & online record announcements Auto Vote system with global rewards Auto Zones Timed Items Dungeon Unique. REWARDS, PROGRESSION & ECONOMY Achievement Manager Mission System (Cafe Points + Random Rewards) Capsule Boxes. Top Boxes system with configurable rewards Roll Dice System (Lucky Manager x2 rewards) Donate Manager (clean & transparent) Auction Manager (extended icon support)  FULLY DOCUMENTED & DEVELOPER FRIENDLY Complete server & client documentation  MULTIVERSE-READY CORE Supports C4-style to High Five gameplay Multi-language support Scalable rates Modular scripts & systems One core. Endless possibilities.  DESIGNED FOR Indie server owners & developers Event & GvG organizers Modders & hobbyists Fans of classic & custom Lineage 2 PROVEN & BATTLE-TESTED Previously online with 100+ active players All systems tested in live environment Balanced for both PvE & PvP longevity ELYSIAN REALMS PHILOSOPHY Elysian Realms isn’t just a server pack — it’s a complete Lineage 2 ecosystem built for players and creators alike. Ready to enter the Elysian World? Launch. Customize. Dominate.   https://www.l2elysian.com/
    • Case: medical report edits aligned with KYC logic ▪ The request looked “simple”: replace patient data and adjust values. In reality, it was a high-risk case where consistency matters more than numbers. What was done: → aligned name, gender, dates, and internal identifiers into a single logic → synchronized sample collection time, lab intake, and result print timestamps → carefully reduced values without exceeding reference ranges → added doctor’s signature and stamp with no repeating patterns → delivered the final document as a clean PDF with no editor traces ▪ Critical point: if you change only values while ignoring timing and service fields, the document fails on the very first checker. Conclusion: Medical reports are read as a system. Any mismatch in dates, timing, or layout breaks approval. ▪ We work with data logic, not with pictures — that’s why the result passes verification. If you have a similar case — we analyze the risks first, then proceed. › TG: @mustang_service ( https:// t.me/ mustang_service ) › Channel: Mustang Service ( https:// t.me/ +6RAKokIn5ItmYjEx ) #redraw #verification #documents #KYC #antifraud
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..