Jump to content

Question

Posted (edited)

Hey there again... i wanted to add in my server a code to Make the players not able to attacks Npcs

everything worked fine expect this it says that i have to add it inside L2NpcINstance.java

I currently use acis project

@@ -324,5 +324,5 @@
 	public boolean isAttackable()
     {
-        return false;
+        return Config.ALT_ATTACKABLE_NPCS;
     }
Edited by mikemaster

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

And what is your problem, cuz I don't get it.. ?

 

 

Just add this check @ L2NpcInstance.java . With that, you won't be able to hit npcs inside a town zone. Drop the check or leave, make a config or w/e :P

@Override
public boolean isAttackable()
{
    if(isInsideZone(ZoneId.TOWN))
        return false;

    return true;
}
Edited by SweeTs

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