TouchAndDie Posted May 26, 2012 Posted May 26, 2012 How can i make a mob example gremlin to give +5 levels every time when i kill one ? even if i have level 80 and the mob have level 1 ... Quote
0 ^Wyatt Posted May 31, 2012 Posted May 31, 2012 U can try to put it on doDie task of L2Attackable if (this.getNpcId()==NPC_ID && killer instanceof L2PcInstance) { int plus = 5; byte lvl = ((L2PcInstance)killer).getStat().getLevel(); byte lvlup = (byte) (lvl+plus); ((L2PcInstance)killer).getStat().setLevel(lvlup); } Quote
0 TouchAndDie Posted August 1, 2012 Author Posted August 1, 2012 U can try to put it on doDie task of L2Attackable if (this.getNpcId()==NPC_ID && killer instanceof L2PcInstance) { int plus = 5; byte lvl = ((L2PcInstance)killer).getStat().getLevel(); byte lvlup = (byte) (lvl+plus); ((L2PcInstance)killer).getStat().setLevel(lvlup); } is not workin Quote
0 vampir Posted August 3, 2012 Posted August 3, 2012 it is supposed to work, if its not: -You could put code in wrong place FIX: Check if code is actually running while death, if not then move the code somewhere else. -((L2PcInstance)killer).getStat().setLevel(lvlup); - its possible that this line will not update your level FIX: check for other methods that can increase level. Quote
Question
TouchAndDie
How can i make a mob example gremlin to give +5 levels every time when i kill one ? even if i have level 80 and the mob have level 1 ...
4 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.