Alliance.java 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 village_master.Alliance;
  20. import com.l2jserver.gameserver.model.actor.L2Npc;
  21. import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  22. import com.l2jserver.gameserver.model.quest.Quest;
  23. /**
  24. * @author UnAfraid
  25. */
  26. public final class Alliance extends Quest
  27. {
  28. // @formatter:off
  29. private static final int[] NPCS =
  30. {
  31. 30026,30031,30037,30066,30070,30109,30115,30120,30154,30174,
  32. 30175,30176,30187,30191,30195,30288,30289,30290,30297,30358,
  33. 30373,30462,30474,30498,30499,30500,30503,30504,30505,30508,
  34. 30511,30512,30513,30520,30525,30565,30594,30595,30676,30677,
  35. 30681,30685,30687,30689,30694,30699,30704,30845,30847,30849,
  36. 30854,30857,30862,30865,30894,30897,30900,30905,30910,30913,
  37. 31269,31272,31276,31279,31285,31288,31314,31317,31321,31324,
  38. 31326,31328,31331,31334,31336,31755,31958,31961,31965,31968,
  39. 31974,31977,31996,32092,32093,32094,32095,32096,32097,32098,
  40. 32145,32146,32147,32150,32153,32154,32157,32158,32160,32171,
  41. 32193,32196,32199,32202,32205,32206,32209,32210,32213,32214,
  42. 32217,32218,32221,32222,32225,32226,32229,32230,32233,32234
  43. };
  44. // @formatter:on
  45. private Alliance()
  46. {
  47. super(-1, Alliance.class.getSimpleName(), "village_master");
  48. addStartNpc(NPCS);
  49. addTalkId(NPCS);
  50. }
  51. @Override
  52. public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
  53. {
  54. if (!"9001-01.htm".equals(event) && (player.getClan() == null))
  55. {
  56. return "9001-04.htm";
  57. }
  58. return event;
  59. }
  60. @Override
  61. public String onTalk(L2Npc npc, L2PcInstance talker)
  62. {
  63. return "9001-01.htm";
  64. }
  65. public static void main(String[] args)
  66. {
  67. new Alliance();
  68. }
  69. }