SymbolMaker.java 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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.npc.SymbolMaker;
  20. import ai.npc.AbstractNpcAI;
  21. import com.l2jserver.gameserver.model.actor.L2Npc;
  22. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  23. import com.l2jserver.gameserver.network.serverpackets.HennaEquipList;
  24. import com.l2jserver.gameserver.network.serverpackets.HennaRemoveList;
  25. /**
  26. * Symbol Maker AI.
  27. * @author Adry_85
  28. */
  29. public final class SymbolMaker extends AbstractNpcAI
  30. {
  31. // NPCs
  32. private static final int[] NPCS =
  33. {
  34. 31046, // Marsden
  35. 31047, // Kell
  36. 31048, // McDermott
  37. 31049, // Pepper
  38. 31050, // Thora
  39. 31051, // Keach
  40. 31052, // Heid
  41. 31053, // Kidder
  42. 31264, // Olsun
  43. 31308, // Achim
  44. 31953, // Rankar
  45. };
  46. private SymbolMaker()
  47. {
  48. super(SymbolMaker.class.getSimpleName(), "ai/npc");
  49. addFirstTalkId(NPCS);
  50. addStartNpc(NPCS);
  51. addTalkId(NPCS);
  52. }
  53. @Override
  54. public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
  55. {
  56. String htmltext = null;
  57. switch (event)
  58. {
  59. case "symbol_maker.htm":
  60. case "symbol_maker-1.htm":
  61. case "symbol_maker-2.htm":
  62. case "symbol_maker-3.htm":
  63. {
  64. htmltext = event;
  65. break;
  66. }
  67. case "Draw":
  68. {
  69. player.sendPacket(new HennaEquipList(player));
  70. break;
  71. }
  72. case "Remove":
  73. {
  74. player.sendPacket(new HennaRemoveList(player));
  75. break;
  76. }
  77. }
  78. return htmltext;
  79. }
  80. @Override
  81. public String onFirstTalk(L2Npc npc, L2PcInstance player)
  82. {
  83. return "symbol_maker.htm";
  84. }
  85. public static void main(String[] args)
  86. {
  87. new SymbolMaker();
  88. }
  89. }