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? Quote
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 Quote
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? Quote
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 Quote
0 crazyshock Posted April 8, 2011 Author Posted April 8, 2011 I've done, but it did not work .. : ( Quote
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() Quote
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. Quote
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.