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

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