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

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