Jump to content
  • 0

Special Time Buff for VIP


Question

Posted

Hi , I'm trying to set up a special time for players who are vip.

I've made the field in characters for VIP, and added in L2pcinstance.

Ok..

 

My problem is anytime you need to do the comparison and check if the player is or is not vip.

By the time I did this setting in Config.java, but I'm not getting through to see if the player.isVip == True, shows no error, but when you start the server would not start.

        ENABLE_VIP_DURATION = Boolean.parseBoolean(COSettings.getProperty("VipTempoCustom", "True"));
                                   
                                   
                                    L2PcInstance player = null;
         
                                    if (ENABLE_VIP_DURATION && player.isVip())
                                   {
                                       String[] propertySplit = COSettings.getProperty("SkillVipDuration", "").split(";");
                                        SKILL_DURACAO = new TIntIntHashMap(propertySplit.length);
                                        for (String skill : propertySplit)
                                       {
                                           String[] skillSplit = skill.split(",");
                                           if (skillSplit.length != 2)
                                             _log.warning(StringUtil.concat("[skillVipDuration]: invalid config property -> SkillDurationList \"", skill, "\""));
                                            else
                                            {
                                                try
                                                {
                                                    SKILL_DURACAO.put(Integer.parseInt(skillSplit[0]), Integer.parseInt(skillSplit[1]));
                                                }
                                                catch (NumberFormatException nfe)
                                                {
                                                    if (!skill.isEmpty())
                                                    {
                                                        _log.warning(StringUtil.concat("[skillVipDuration]: invalid config property -> SkillList \"", skillSplit[0], "\"", skillSplit[1]));
                                                    }
                                                }
                                            }
                                        }
                                    }
                                    

Recommended Posts

  • 0
Posted

you may change the buff effect time from com.l2jserver.gameserver.model.L2Effect.

To get the player instance using the buff, use getEffected() inside that class

  • 0
Posted

show me how can I accomplish this? but I would pick the skills that would change the time.

is possible that the way I said? or if not, tell me how to do the way you speak.

 

Thankkk!

  • 0
Posted
Index: java/com/l2jserver/gameserver/model/L2Effect.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Effect.java	(revision 4536)
+++ java/com/l2jserver/gameserver/model/L2Effect.java	(working copy)
@@ -357,7 +357,13 @@
		if (_period > 0)
		{
			stopEffectTask();
-			final int initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			int initialDelay = 0;
+			L2PcInstance plr = getEffected().getActingPlayer();
+			if(plr != null && plr.isVip() && getSkill().getSkillType() == L2SkillType.BUFF)
+				initialDelay = YOUR_VIP_BUFF_TIME_GOES_HERE;
+			else
+				initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			
			if (_count > 1)
				_currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _period * 1000);
			else

  • 0
Posted
Index: java/com/l2jserver/gameserver/model/L2Effect.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Effect.java	(revision 4536)
+++ java/com/l2jserver/gameserver/model/L2Effect.java	(working copy)
@@ -357,7 +357,13 @@
		if (_period > 0)
		{
			stopEffectTask();
-			final int initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			int initialDelay = 0;
+			L2PcInstance plr = getEffected().getActingPlayer();
+			if(plr != null && plr.isVip() && getSkill().getSkillType() == L2SkillType.BUFF)
+				initialDelay = YOUR_VIP_BUFF_TIME_GOES_HERE;
+			else
+				initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			
			if (_count > 1)
				_currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _period * 1000);
			else

  • 0
Posted

 

thank you, one question in this case all the skills that are defined as a "buffer" will have more time right?

 

in this case, there is a way I can define the skills that have changed over time?

 

 

THankkk BIG!

  • 0
Posted

 

thank you, one question in this case all the skills that are defined as a "buffer" will have more time right?

 

in this case, there is a way I can define the skills that have changed over time?

 

 

THankkk BIG!

  • 0
Posted

1) I corrected the code i posted, since before, it would change the time of all effects, with the new code just buffs time are changed

2) Didnt understand your question

  • 0
Posted

1) I corrected the code i posted, since before, it would change the time of all effects, with the new code just buffs time are changed

2) Didnt understand your question

  • 0
Posted

Index: java/com/l2jserver/gameserver/model/L2Effect.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Effect.java	(revision 4536)
+++ java/com/l2jserver/gameserver/model/L2Effect.java	(working copy)
@@ -357,7 +357,13 @@
		if (_period > 0)
		{
			stopEffectTask();
-			final int initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			final int initialDelay = 0;
+			final L2PcInstance plr = getEffected().getActingPlayer();
+			if(plr != null && plr.isVip() && getSkill().canModifyTime())
+				initialDelay = YOUR_VIP_BUFF_TIME_IN_MILLIS_GOES_HERE;
+			else
+				initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			
			if (_count > 1)
				_currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _period * 1000);
			else
Index: java/com/l2jserver/gameserver/model/L2Skill.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Skill.java	(revision 4536)
+++ java/com/l2jserver/gameserver/model/L2Skill.java	(working copy)
@@ -291,8 +291,10 @@
	private final boolean _excludedFromCheck;
	private final boolean _simultaneousCast;

-	private L2ExtractableSkill _extractableItems = null;;
+	private L2ExtractableSkill _extractableItems = null;

+	private boolean _canModifyTime = false;
+	
	protected L2Skill(StatsSet set)
	{
		_id = set.getInteger("skill_id");
@@ -532,6 +534,8 @@

			_extractableItems = parseExtractableSkill(_id, _level, capsuled_items);
		}
+		
+		_canModifyTime = set.getBool("canModifyTime", false);
	}

	public abstract void useSkill(L2Character caster, L2Object[] targets);
@@ -541,6 +545,11 @@
		return _isPotion;
	}

+	public final boolean canModifyTime()
+	{
+		return _canModifyTime;
+	}
+	
	public final int getArmorsAllowed()
	{
		return _armorsAllowed;

 

In those skill where you would like to modify the time based if the player is vip or not, you would have to add

 

<set name="canModifyTime" val="true" />

  • 0
Posted

Index: java/com/l2jserver/gameserver/model/L2Effect.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Effect.java	(revision 4536)
+++ java/com/l2jserver/gameserver/model/L2Effect.java	(working copy)
@@ -357,7 +357,13 @@
		if (_period > 0)
		{
			stopEffectTask();
-			final int initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			final int initialDelay = 0;
+			final L2PcInstance plr = getEffected().getActingPlayer();
+			if(plr != null && plr.isVip() && getSkill().canModifyTime())
+				initialDelay = YOUR_VIP_BUFF_TIME_IN_MILLIS_GOES_HERE;
+			else
+				initialDelay = Math.max((_period - _periodFirstTime) * 1000, 5);
+			
			if (_count > 1)
				_currentFuture = ThreadPoolManager.getInstance().scheduleEffectAtFixedRate(new EffectTask(), initialDelay, _period * 1000);
			else
Index: java/com/l2jserver/gameserver/model/L2Skill.java
===================================================================
--- java/com/l2jserver/gameserver/model/L2Skill.java	(revision 4536)
+++ java/com/l2jserver/gameserver/model/L2Skill.java	(working copy)
@@ -291,8 +291,10 @@
	private final boolean _excludedFromCheck;
	private final boolean _simultaneousCast;

-	private L2ExtractableSkill _extractableItems = null;;
+	private L2ExtractableSkill _extractableItems = null;

+	private boolean _canModifyTime = false;
+	
	protected L2Skill(StatsSet set)
	{
		_id = set.getInteger("skill_id");
@@ -532,6 +534,8 @@

			_extractableItems = parseExtractableSkill(_id, _level, capsuled_items);
		}
+		
+		_canModifyTime = set.getBool("canModifyTime", false);
	}

	public abstract void useSkill(L2Character caster, L2Object[] targets);
@@ -541,6 +545,11 @@
		return _isPotion;
	}

+	public final boolean canModifyTime()
+	{
+		return _canModifyTime;
+	}
+	
	public final int getArmorsAllowed()
	{
		return _armorsAllowed;

 

In those skill where you would like to modify the time based if the player is vip or not, you would have to add

 

<set name="canModifyTime" val="true" />

  • 0
Posted

Very Good Big...

 

I will test to see how he was.

In case if I do not want a particular skill increase the time it just add the xml line and =false right?

 

Thank very much

  • 0
Posted

Very Good Big...

 

I will test to see how he was.

In case if I do not want a particular skill increase the time it just add the xml line and =false right?

 

Thank very much

Guest
This topic is now closed to further replies.


  • Posts

    • 🔥 L2Pride Interlude by DVP is NOW LIVE! 🔥 📅 Opened on June 10, 2026 at 21:00 GMT+2 ⚔️ The server is currently in the Tier 1 stage, giving everyone a fair chance to gear up and compete. 🔓 Tier 2 Items will be unlocked on June 27, 2026! ✅ Active players ✅ Stable server ✅ Competitive PvP ✅ Growing community Whether you're a solo player, clan leader, or PvP enthusiast, now is the perfect time to join and prepare for the next stage of progression. See you in-game, warriors! ⚔️ WEB: www.l2pride.ddns.net DISCORD: https://discord.gg/JVdpESC5Ry
    • Stock updates constantly. Only top items are posted on the forum. For current availability and ordering, message us on Telegram.   G2G Business 🇪🇺 EU Fully verified seller's account.   Revolut Business 🇪🇺 EU | Multi-currency IBAN, Virtual & physical cards, Instant SEPA transfers, ₿ Crypto exchange & settlements.   SumUp Business 🇬🇧 GB | POS, 1 physical card, 2 virtual cards. Payouts time: 1 day even on weekends and bank holidays, Multi-user access.   Vivid Business | Merchant POS, DE IBAN, up to 50 IBANs, SEPA Instant, unlimited transfers, up to 25 virtual and 3 physical cards.
    • 🔎 Find us: 👉🏼 Website: L2Dexter.eu 👉🏼 Discord: discord.gg/dttX9FE23W 👉🏼 Facebook: facebook.com/L2Dexter
    • G Support: https://t.me/buyingproxysup | Channel: https://t.me/buyingproxycom Discord support: #buyingproxy | Server: Join the BuyingProxy Discord Server!  Create your free account here
    • REAL PHOTOS ALWAYS «BREAK» ▪ Think a high-quality photo should be perfect? Think again. In real shots, something is almost always “off”: ▪ Noise in the shadows — especially noticeable in low light ▪ Local overexposures on highlights and glossy surfaces ▪ Loss of fine details in the brightest and darkest areas ▪ Overall “dirt” and unevenness that no editor can fully remove ▪  It’s exactly these imperfections that make the frame look alive. Algorithms already know well: a sterile clean image without these “flaws” is almost always a fake. Reality is never perfect. A fake tries to be.  Want photos that look genuinely “broken,” like they were taken on a real phone? Write to us — we’ll make even the flaws work in your favor. › TG: @mustang_service_ms ( https:// t.me/ mustang_service_ms ) › Channel: Mustang Service ( https:// t.me/ +JPpJCETg-xM1NjNl ) #documents #drawing #photoshop #verication #fake
  • 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..