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
  • 0
Posted

I make it already the shifr click on npcs.. But i dont work at al...

Only monster boss etc :) i ll try it when go home to test it.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..