SeeThroughSilentMove.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /*
  2. * Copyright (C) 2004-2015 L2J DataPack
  3. *
  4. * This file is part of L2J DataPack.
  5. *
  6. * L2J DataPack is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation, either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * L2J DataPack is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. package ai.group_template;
  20. import ai.npc.AbstractNpcAI;
  21. import com.l2jserver.gameserver.model.actor.L2Attackable;
  22. import com.l2jserver.gameserver.model.actor.L2Npc;
  23. /**
  24. * See Through Silent Move AI.
  25. * @author Gigiikun
  26. */
  27. public class SeeThroughSilentMove extends AbstractNpcAI
  28. {
  29. //@formatter:off
  30. private static final int[] MONSTERS =
  31. {
  32. 18001, 18002, 22199, 22215, 22216, 22217, 22327, 22746, 22747, 22748,
  33. 22749, 22750, 22751, 22752, 22753, 22754, 22755, 22756, 22757, 22758,
  34. 22759, 22760, 22761, 22762, 22763, 22764, 22765, 22794, 22795, 22796,
  35. 22797, 22798, 22799, 22800, 22843, 22857, 25725, 25726, 25727, 29009,
  36. 29010, 29011, 29012, 29013
  37. };
  38. //@formatter:on
  39. private SeeThroughSilentMove()
  40. {
  41. super(SeeThroughSilentMove.class.getSimpleName(), "ai/group_template");
  42. addSpawnId(MONSTERS);
  43. }
  44. @Override
  45. public String onSpawn(L2Npc npc)
  46. {
  47. if (npc.isAttackable())
  48. {
  49. ((L2Attackable) npc).setSeeThroughSilentMove(true);
  50. }
  51. return super.onSpawn(npc);
  52. }
  53. public static void main(String[] args)
  54. {
  55. new SeeThroughSilentMove();
  56. }
  57. }