Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ai.group_template;
- import ai.npc.AbstractNpcAI;
- import com.l2jserver.gameserver.datatables.SpawnTable;
- import com.l2jserver.gameserver.model.L2Spawn;
- import com.l2jserver.gameserver.model.actor.L2Npc;
- public final class NonLethalableNpcs extends AbstractNpcAI
- {
- // @formatter:off
- private static final int[] HEADQUARTERS =
- {
- 35062,
- 20431, 20453, 20487, //Abyss20
- 20945, 20594, 20646, //Abyss40
- 18008, 21578, 22506, //Abyss60
- 31847, 22748, 25598, //Abyss80
- 27217, 20821, 20762, //stage3
- 21580, 21083, 22550, //stage4
- 22518, 22362, 18490, //stage5
- 80030, 80031, 80032, 80033, 80034, 80035, 80036, 80037, 80038, 80039, 80040, 80042, 80043, 80044, //Rts
- 80045, 80046, 80047, 80048, 80049, 80050, 80051, 80052, 80053, 80054, 80055, 80056, 80057, 80058, //Rts
- };
- // @formatter:on
- public NonLethalableNpcs()
- {
- super(NonLethalableNpcs.class.getSimpleName(), "ai/group_template");
- addSpawnId(HEADQUARTERS);
- for (int npcId : HEADQUARTERS)
- {
- for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(npcId))
- {
- onSpawn(spawn.getLastSpawn());
- }
- }
- /** for (L2Spawn spawn : SpawnTable.getInstance().getSpawns(HEADQUARTERS))
- * {
- * onSpawn(spawn.getLastSpawn());
- * }
- */
- }
- @Override
- public String onSpawn(L2Npc npc)
- {
- npc.setLethalable(false);
- return super.onSpawn(npc);
- }
- public static void main(String[] args)
- {
- new NonLethalableNpcs();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement