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
LaraCroft
Posts: 360 Joined: Sat Aug 08, 2009 1:37 am
Post
by LaraCroft » Thu Oct 22, 2009 10:19 am
If you want to receive support we need this info to help you properly.
» Find Revision
L2J Revision
Number : 3643
L2JDP Revision
Number : 6747
Hi guys...
In my server i'm using the CP and HP recovery, when the players die.
The HP recovery works fine.
But the CP recovery don't work.
Anyone can help me to solve this problem?
Thxxxxx...
!!!knowledge and intelligence must be shared!!!
acoby7
Posts: 64 Joined: Tue Apr 03, 2007 12:39 pm
Post
by acoby7 » Thu Oct 22, 2009 10:23 am
the code is commented iirc
right now i can't help you find it because i'm at uni but you can try to search in the core starting from the configs
when i'll come home i'll try to help you ^^
janiii
L2j Veteran
Posts: 4269 Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia
Post
by janiii » Thu Oct 22, 2009 10:55 am
Formulas.calcCpRegen() should work fine. for testing try to set it to higher number.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOO der dancing dEVIL oper ♀
I don't give private support - PM will be ignored!
LaraCroft
Posts: 360 Joined: Sat Aug 08, 2009 1:37 am
Post
by LaraCroft » Thu Oct 22, 2009 11:16 am
Where i find the code "Formulas.calcCpRegen() "??
On "Character.properties" i'm using this configs:
# Percent of HP, MP, and CP which is restored on character revival.
# Default: 0, 70, 70
RespawnRestoreCP = 100
RespawnRestoreHP = 100
RespawnRestoreMP = 100
HP and MP works fine.
But... CP not restore any percent.
This config "RespawnRestoreCP" is not working on server code??
Thx...
Last edited by
LaraCroft on Thu Oct 22, 2009 11:27 am, edited 1 time in total.
!!!knowledge and intelligence must be shared!!!
Probe
Posts: 915 Joined: Thu Sep 03, 2009 6:36 pm
Location: Israel
Contact:
Post
by Probe » Thu Oct 22, 2009 11:20 am
cleodj
Posts: 9 Joined: Wed Feb 04, 2009 5:17 pm
Post
by cleodj » Thu Oct 22, 2009 1:09 pm
maybe this way:
PS: just uncomment those 2 lines and should work.
PS2: not a diff file, just an example, tested and work here for what you need.
java/net/sf/l2j/gameserver/model/actor/L2Character.java
Code: Select all
else _status.setCurrentHp(getMaxHp() * Config.RESPAWN_RESTORE_HP);- //_status.setCurrentCp(getMaxCp() * Config.RESPAWN_RESTORE_CP);- //_Status.setCurrentMp(getMaxMp() * Config.RESPAWN_RESTORE_MP);+ _status.setCurrentCp(getMaxCp() * Config.RESPAWN_RESTORE_CP);+ _status.setCurrentMp(getMaxMp() * Config.RESPAWN_RESTORE_MP);
janiii
L2j Veteran
Posts: 4269 Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia
Post
by janiii » Thu Oct 22, 2009 1:14 pm
ah, yeah, i checked wrong property
dont forget to add parenthesis around all the restore
Code: Select all
Index: java/net/sf/l2j/gameserver/model/actor/L2Character.java===================================================================--- java/net/sf/l2j/gameserver/model/actor/L2Character.java (revision 3633)+++ java/net/sf/l2j/gameserver/model/actor/L2Character.java (working copy)@@ -2156,9 +2156,11 @@ _status.setCurrentMp(getMaxMp()); //and also confirmed } else+ { _status.setCurrentHp(getMaxHp() * Config.RESPAWN_RESTORE_HP);- //_status.setCurrentCp(getMaxCp() * Config.RESPAWN_RESTORE_CP);- //_Status.setCurrentMp(getMaxMp() * Config.RESPAWN_RESTORE_MP);+ _status.setCurrentCp(getMaxCp() * Config.RESPAWN_RESTORE_CP);+ _status.setCurrentMp(getMaxMp() * Config.RESPAWN_RESTORE_MP);+ } // Start broadcast status broadcastPacket(new Revive(this));
DO NOT EVEN TRY TO MESS WITH ME!
forum flOO der dancing dEVIL oper ♀
I don't give private support - PM will be ignored!
acoby7
Posts: 64 Joined: Tue Apr 03, 2007 12:39 pm
Post
by acoby7 » Thu Oct 22, 2009 2:26 pm
yeah exactly that comment should be removed
_DS_
L2j Veteran
Posts: 3437 Joined: Wed Apr 30, 2008 8:53 am
Location: Russia
Post
by _DS_ » Thu Oct 22, 2009 2:31 pm
Should CP be set only in L2PcInstance ? All other instances does not have CP at all.
Commiter of the shit
public static final int PI = 3.1415926535897932384626433832795;
LaraCroft
Posts: 360 Joined: Sat Aug 08, 2009 1:37 am
Post
by LaraCroft » Thu Oct 22, 2009 3:43 pm
Thx a lot to all...
!!!knowledge and intelligence must be shared!!!