Jump to content

Question

7 answers to this question

Recommended Posts

  • 0
Posted

You might try either:

if(target.isMonster())//If target is null, this will throw NullPointerException

{
something;

}

 

or

 

if(target instanceof L2MonsterInstance)//Name of the class might be different(depends on your pack), like MonsterInstance, L2Monster

{

something;

}

  • 0
Posted (edited)

For admin or player? If for player, then you should make the shift click possible from onActionShift() (L2Npc.java) method, it's only gonna work on npcs.

 

To restrict it only to monsters use

 

 

if (this instanceof L2MonsterInstance)
{
     ...
}

 

Else, you could add the overriden method onActionShift into L2MonsterInstance, that could work, I guess, not rly sure.

Edited by SweeTs

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...