Jump to content
  • 0

[help][core] Guard npc


finkOS

Question

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

 

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

to have that you need to edit the ai i guess or the L2GuardInstance pm to horus he have something like that so maybe he can help you

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

  • 0

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

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...