Vitality Reuse

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
kornom
Posts: 227
Joined: Thu Sep 26, 2013 3:48 pm

Vitality Reuse

Post by kornom »

If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision Number:Last
L2JDP Revision Number:Last

Hi could you friends help me here?
I want to reduce Vitality reuse time from 6 hours to 3 hours.
I figured that I have to do it in GiftOfVitality.java
But after playing with numbers I realised that I messed it up.
Could you help me out?

Code: Select all

            if (_streuse != null)                {                    _reuse = Long.parseLong(_streuse);                }                if (_reuse > System.currentTimeMillis())                {                    long remainingTime = (_reuse - System.currentTimeMillis()) / 1000;                    int hours = (int) (remainingTime / 3600);                    int minutes = (int) ((remainingTime % 3600) / 60);                    SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.AVAILABLE_AFTER_S1_S2_HOURS_S3_MINUTES);                    sm.addSkillName(23179);                    sm.addNumber(hours);                    sm.addNumber(minutes);                    player.sendPacket(sm);                    htmltext = "4306-notime.htm";                }                else                {                    player.doCast(GIFT_OF_VITALITY.getSkill());                    player.doSimultaneousCast(JOY_OF_VITALITY.getSkill());                    st.setState(State.STARTED);                    st.set("reuse", String.valueOf(System.currentTimeMillis() + (HOURS * 3600000)));                    htmltext = "4306-okvitality.htm";                }                break;
User avatar
Zoey76
L2j Inner Circle
L2j Inner Circle
Posts: 7008
Joined: Tue Aug 11, 2009 3:36 am

Re: Vitality Reuse

Post by Zoey76 »

Code: Select all

### Eclipse Workspace Patch 1.0#P L2J_DataPack_BETAIndex: dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java===================================================================--- dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java    (revision 10149)+++ dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java    (working copy)@@ -85,7 +85,7 @@    }        // Misc-   private static final int HOURS = 5; // Reuse between buffs+   private static final int HOURS = 3; // Reuse between buffs    private static final int MIN_LEVEL = 75;        @Override 
Powered by Eclipse 4.34 🌌 | Eclipse Temurin 21 ☕ | MariaDB 11.3.2 🗃️ | L2J Server 2.6.3.0 - High Five 🚀

🔗 Join our Discord! 🎮💬
kornom
Posts: 227
Joined: Thu Sep 26, 2013 3:48 pm

Re: Vitality Reuse

Post by kornom »

Thank you Zoey!
Post Reply