I'm trying to make NPC Flag wich you can capture by killing it. Capturing works fine. If you kill the flag it becomes your factions flag. But... problem is that the flag is imortal. Only way to kill it is by //kill.
⏳ L2Elixir Open Beta goes live in less than 4 hours!
This Saturday, November 15th at 21:00 (UTC +2), the gates open for our biggest testing phase!
🔥 Don’t miss the first 30 minutes — exclusive rewards await!
A special NPC, “The Judge”, will appear in Giran, offering unique bonuses to early participants:
🏅 Open Beta Rewards:
- The first 2 players who talk to The Judge → Premium Account for Launch
- Another 2 random players who interact → Premium Account
- Everyone who speaks to the NPC within the first 30 minutes → Legendary Starter Pack for all characters on launch day (Nov 28th, 2025)
📌 The NPC will spawn exactly at 21:00 (UTC+2).
⏱️ Follow the countdown on our website — the hype is real!
Create your account & download the Updater to be ready!
🔗 https://l2elixir.org/connect/
💬 Discord: https://discord.gg/5ydPHvhbxs
Question
xuinia
I'm trying to make NPC Flag wich you can capture by killing it. Capturing works fine. If you kill the flag it becomes your factions flag. But... problem is that the flag is imortal. Only way to kill it is by //kill.
I added this code to L2TpFlaginstance.java:
@Override public void reduceCurrentHp(double damage, L2Character attacker, L2Skill skill) { L2PcInstance plajor = null; boolean cord = false; if (attacker instanceof L2PcInstance) plajor = (L2PcInstance) attacker; else if (attacker instanceof L2SummonInstance) plajor = ((L2SummonInstance) attacker).getOwner(); if (/*plajor.inWorld() == 1 && */plajor.getFactionId() != getFlagFactionId()) cord = true; if (cord) super.reduceCurrentHp(damage, attacker, skill); }But that doesnt seem to do anything. HP of the flag is not decreasing when I hit it.
How can I make it mortal?
Working with latesr rev of l2jserver
8 answers to this question
Recommended Posts