WildBeastReserve.java 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  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 conquerablehalls.flagwar.WildBeastReserve;
  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 WildBeastReserve extends FlagWar
  29. {
  30. static
  31. {
  32. ROYAL_FLAG = 35606;
  33. FLAG_RED = 35607; // White flag
  34. FLAG_YELLOW = 35608; // Red flag
  35. FLAG_GREEN = 35609; // Blue flag
  36. FLAG_BLUE = 35610; // Green flag
  37. FLAG_PURPLE = 35611; // Black flag
  38. ALLY_1 = 35618;
  39. ALLY_2 = 35619;
  40. ALLY_3 = 35620;
  41. ALLY_4 = 35621;
  42. ALLY_5 = 35622;
  43. TELEPORT_1 = 35612;
  44. MESSENGER = 35627;
  45. FLAG_COORDS[0] = new Location(56963, -92211, -1303, 60611);
  46. FLAG_COORDS[1] = new Location(58090, -91641, -1303, 47274);
  47. FLAG_COORDS[2] = new Location(58908, -92556, -1303, 34450);
  48. FLAG_COORDS[3] = new Location(58336, -93600, -1303, 21100);
  49. FLAG_COORDS[4] = new Location(57152, -93360, -1303, 8400);
  50. FLAG_COORDS[5] = new Location(59116, -93251, -1302, 31000);
  51. FLAG_COORDS[6] = new Location(56432, -92864, -1303, 64000);
  52. OUTTER_DOORS_TO_OPEN[0] = 21150003;
  53. OUTTER_DOORS_TO_OPEN[1] = 21150004;
  54. INNER_DOORS_TO_OPEN[0] = 21150001;
  55. INNER_DOORS_TO_OPEN[1] = 21150002;
  56. Collection<L2ResidenceHallTeleportZone> zoneList = ZoneManager.getInstance().getAllZones(L2ResidenceHallTeleportZone.class);
  57. for (L2ResidenceHallTeleportZone teleZone : zoneList)
  58. {
  59. if (teleZone.getResidenceId() != BEAST_FARM)
  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 = 0;
  71. CENTER = new Location(57762, -92696, -1359, 0);
  72. }
  73. private WildBeastReserve()
  74. {
  75. super(WildBeastReserve.class.getSimpleName(), BEAST_FARM);
  76. }
  77. @Override
  78. public String getFlagHtml(int flag)
  79. {
  80. String result = null;
  81. switch (flag)
  82. {
  83. case 35607:
  84. result = "messenger_flag1.htm";
  85. break;
  86. case 35608:
  87. result = "messenger_flag2.htm";
  88. break;
  89. case 35609:
  90. result = "messenger_flag3.htm";
  91. break;
  92. case 35610:
  93. result = "messenger_flag4.htm";
  94. break;
  95. case 35611:
  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 35618:
  108. result = "messenger_ally1result.htm";
  109. break;
  110. case 35619:
  111. result = "messenger_ally2result.htm";
  112. break;
  113. case 35620:
  114. result = "messenger_ally3result.htm";
  115. break;
  116. case 35621:
  117. result = "messenger_ally4result.htm";
  118. break;
  119. case 35622:
  120. result = "messenger_ally5result.htm";
  121. break;
  122. }
  123. return result;
  124. }
  125. @Override
  126. public boolean canPayRegistration()
  127. {
  128. return false;
  129. }
  130. public static void main(String[] args)
  131. {
  132. new WildBeastReserve();
  133. }
  134. }