Page 1 of 1

Vitality Reuse

Posted: Thu Jan 30, 2014 6:03 pm
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;

Re: Vitality Reuse

Posted: Sat Feb 01, 2014 12:10 pm
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 

Re: Vitality Reuse

Posted: Sun Feb 02, 2014 5:14 am
by kornom
Thank you Zoey!