Jump to content
  • 0

[help][core] Guard npc


Question

Posted

How to make npc what it attacked faction?  (l2jserver gracia final)

Tried to put in L2AttackableAi.java:

 

if (target instanceof L2PcInstance && ((L2PcInstance) target).getFactionId () != 1)

if (target instanceof L2PcInstance && ((L2PcInstance) target).getFactionId () == 1)

 

But npc all the same does not attack. I use faction mod by Laikeriz

 

12 answers to this question

Recommended Posts

  • 0
Posted

Make a new instance.

Make a new KnownList for that Instance and make it only add targets who are on the opposite faction.

Also change the boolean isAutoAttackable.

  • 0
Posted

Sorry. I'm here to help not to give you free features.

 

If you want to make a Faction based Server than I advice you to learn Java.

  • 0
Posted

Sorry. I'm here to help not to give you free features.

 

If you want to make a Faction based Server than I advice you to learn Java.

-beep- Yeah xD

 

Anyway its easyer to do this from attackable ai ^^

  • 0
Posted

-beep- Yeah xD

 

Anyway its easyer to do this from attackable ai ^^

Yes it is.

I adviced him to change the KnownList so that he could understand a bit better how NPCs work ^^

 

But he ain't going to do it so lool..

  • 0
Posted

Make a new instance.

Make a new KnownList for that Instance and make it only add targets who are on the opposite faction.

Also change the boolean isAutoAttackable.

Many thanks! Thanks to your helps I have made that that wanted!

 

 

 

The theme can be closed

Guest
This topic is now closed to further replies.


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