BanditStronghold.java 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /*
  2. * Copyright (C) 2004-2014 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 conquerablehalls.flagwar.BanditStronghold;
  20. import java.util.Collection;
  21. import com.l2jserver.gameserver.instancemanager.ZoneManager;
  22. import com.l2jserver.gameserver.model.Location;
  23. import com.l2jserver.gameserver.model.zone.type.L2ResidenceHallTeleportZone;
  24. import conquerablehalls.flagwar.FlagWar;
  25. /**
  26. * @author BiggBoss
  27. */
  28. public final class BanditStronghold extends FlagWar
  29. {
  30. static
  31. {
  32. ROYAL_FLAG = 35422;
  33. FLAG_RED = 35423;
  34. FLAG_YELLOW = 35424;
  35. FLAG_GREEN = 35425;
  36. FLAG_BLUE = 35426;
  37. FLAG_PURPLE = 35427;
  38. ALLY_1 = 35428;
  39. ALLY_2 = 35429;
  40. ALLY_3 = 35430;
  41. ALLY_4 = 35431;
  42. ALLY_5 = 35432;
  43. TELEPORT_1 = 35560;
  44. MESSENGER = 35437;
  45. OUTTER_DOORS_TO_OPEN[0] = 22170001;
  46. OUTTER_DOORS_TO_OPEN[1] = 22170002;
  47. INNER_DOORS_TO_OPEN[0] = 22170003;
  48. INNER_DOORS_TO_OPEN[1] = 22170004;
  49. FLAG_COORDS[0] = new Location(83699, -17468, -1774, 19048);
  50. FLAG_COORDS[1] = new Location(82053, -17060, -1784, 5432);
  51. FLAG_COORDS[2] = new Location(82142, -15528, -1799, 58792);
  52. FLAG_COORDS[3] = new Location(83544, -15266, -1770, 44976);
  53. FLAG_COORDS[4] = new Location(84609, -16041, -1769, 35816);
  54. FLAG_COORDS[5] = new Location(81981, -15708, -1858, 60392);
  55. FLAG_COORDS[6] = new Location(84375, -17060, -1860, 27712);
  56. Collection<L2ResidenceHallTeleportZone> zoneList = ZoneManager.getInstance().getAllZones(L2ResidenceHallTeleportZone.class);
  57. for (L2ResidenceHallTeleportZone teleZone : zoneList)
  58. {
  59. if (teleZone.getResidenceId() != BANDIT_STRONGHOLD)
  60. {
  61. continue;
  62. }
  63. int id = teleZone.getResidenceZoneId();
  64. if ((id < 0) || (id >= 6))
  65. {
  66. continue;
  67. }
  68. TELE_ZONES[id] = teleZone;
  69. }
  70. QUEST_REWARD = 5009;
  71. CENTER = new Location(82882, -16280, -1894, 0);
  72. }
  73. private BanditStronghold()
  74. {
  75. super(BanditStronghold.class.getSimpleName(), BANDIT_STRONGHOLD);
  76. }
  77. @Override
  78. public String getFlagHtml(int flag)
  79. {
  80. String result = null;
  81. switch (flag)
  82. {
  83. case 35423:
  84. result = "messenger_flag1.htm";
  85. break;
  86. case 35424:
  87. result = "messenger_flag2.htm";
  88. break;
  89. case 35425:
  90. result = "messenger_flag3.htm";
  91. break;
  92. case 35426:
  93. result = "messenger_flag4.htm";
  94. break;
  95. case 35427:
  96. result = "messenger_flag5.htm";
  97. break;
  98. }
  99. return result;
  100. }
  101. @Override
  102. public String getAllyHtml(int ally)
  103. {
  104. String result = null;
  105. switch (ally)
  106. {
  107. case 35428:
  108. result = "messenger_ally1result.htm";
  109. break;
  110. case 35429:
  111. result = "messenger_ally2result.htm";
  112. break;
  113. case 35430:
  114. result = "messenger_ally3result.htm";
  115. break;
  116. case 35431:
  117. result = "messenger_ally4result.htm";
  118. break;
  119. case 35432:
  120. result = "messenger_ally5result.htm";
  121. break;
  122. }
  123. return result;
  124. }
  125. public static void main(String[] args)
  126. {
  127. new BanditStronghold();
  128. }
  129. }