crazyshock Posted April 7, 2011 Posted April 7, 2011 I want to create an option if the player is a VIP slots have more space in the buffer. Exmple: BUFFS_MAX_AMOUNT = default is 20 e Dance 12 correct? If the player would have more VIP. exmpl: BUFFS_MAX_ = 30 and Dance/SONG = 20 which file must be changed to leave it the way I mentioned?
0 vampir Posted April 7, 2011 Posted April 7, 2011 com.l2jserver.gameserver.model.actor.L2Character.java the answer is in that file! Only file is needed as requested so i wont give u any more clues, java is the key to success :P
0 crazyshock Posted April 7, 2011 Author Posted April 7, 2011 public int getMaxBuffCount(L2PcInstance player) { if ( player.isVip()) return Config.VIP_SLOTS + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); else return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); } Will she work this way?
0 TsIpIzTiK® Posted April 7, 2011 Posted April 7, 2011 public int getMaxBuffCount(L2PcInstance player) { if ( player.isVip()) return Config.VIP_SLOTS + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); else return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); } Will she work this way? try it maybe will work. but make and config
0 vampir Posted April 8, 2011 Posted April 8, 2011 are u getting any errors? if not then replace it with this: public int getMaxBuffCount(L2PcInstance player) { if ( player.isVip()) return 5 + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); else return Config.BUFFS_MAX_AMOUNT + Math.max(0, getSkillLevel(L2Skill.SKILL_DIVINE_INSPIRATION)); } so u dont need to make config for it, if its still not working then there is probably something wrong with player.isVip()
0 crazyshock Posted April 9, 2011 Author Posted April 9, 2011 No mistake with player.isVip (). And the code does not return error, but does not work.
Question
crazyshock
I want to create an option if the player is a VIP slots have more space in the buffer.
Exmple: BUFFS_MAX_AMOUNT = default is 20 e Dance 12 correct?
If the player would have more VIP.
exmpl: BUFFS_MAX_ = 30 and Dance/SONG = 20
which file must be changed to leave it the way I mentioned?
6 answers to this question
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now