Jump to content
  • 0

Level up Mob


TouchAndDie

Question

4 answers to this question

Recommended Posts

  • 0

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);
		}

 

 

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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.

Link to comment
Share on other sites

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

AdBlock Extension Detected!

Our website is made possible by displaying online advertisements to our members.

Please disable AdBlock browser extension first, to be able to use our community.

I've Disabled AdBlock