TouchAndDie Posted May 26, 2012 Share 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 Link to comment Share on other sites More sharing options...
0 ^Wyatt Posted May 31, 2012 Share 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 Link to comment Share on other sites More sharing options...
0 TouchAndDie Posted August 1, 2012 Author Share 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 Link to comment Share on other sites More sharing options...
0 TouchAndDie Posted August 3, 2012 Author Share Posted August 3, 2012 bump :'( Quote Link to comment Share on other sites More sharing options...
0 vampir Posted August 3, 2012 Share 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 Link to comment Share on other sites More sharing options...
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 ...
Link to comment
Share on other sites
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.