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

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

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


  • Posts

    • Our next easy-botting project, Kain, is right around the corner! Launching tomorrow, Saturday, April 26th at 9:00 ET (UTC -4)! If you haven’t, check out the features and join our Discord to catch up on the latest drama. See you very soon! Read more about L2Toggle and Kain on our site and forum!  
    • 🤣 You were talking about security — I want you to prove that it's actually insecure, try to hack it or something. You're just talking without any evidence, and that's not right. Without the personal key that's generated for each site, you can't do anything. And by the way, boberKurwa isn't even used — it's a joke, and you totally fell for it. You're being very unconstructive. I appreciate criticism based on facts, and here's a fact: Sphere 2 has been running publicly since October, and there haven't been any successful hacking attempts. If you doubt that, go ahead and prove me wrong.  
    • When a conversation loses its direction and turns into pointless justifications, maybe the problem isn't who's right it's who's insecure. The phrase "there is nothing for me to prove" shows confidence or indifference. But let’s look at it in PHP. class Logan22 { public bool $hasSomethingToProve = false; public string $communicationMode = 'normal'; public bool $usesChatGPT = false; public function respond(string $input): string { if (str_contains($input, 'prove')) { return "I have nothing to prove."; } if (str_contains($input, 'defensive')) { $this->communicationMode = 'defensive'; return "You got defensive – did something feel threatening?"; } if (str_contains($input, 'ChatGPT')) { $this->usesChatGPT = true; return "Yes, I use it for speed, accuracy, and because my spelling sucks."; } return "What did you just say again?"; } }  
    • You wrote complete nonsense. Everything you said is utter rubbish from someone who doesn’t understand a thing. As for the ticking time bomb — go ahead and try to prove it. No one has managed so far, and trust me, there’ve been plenty of “smart guys” before you.    
  • Topics

×
×
  • Create New...