浏览代码

Clan hall siege update.
- Abstracting and optimizing bandit stronghold siege
- Taking bandit stronghold siege closer to retail like behaviour
- Adding Wild Beast Reserver Siege
DP Side

BiggBoss 13 年之前
父节点
当前提交
65fb0bd464
共有 91 个文件被更改,包括 875 次插入272 次删除
  1. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  2. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_1.htm
  3. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_10.htm
  4. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_11.htm
  5. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_12.htm
  6. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_13.htm
  7. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_15.htm
  8. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_16.htm
  9. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_17.htm
  10. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_18.htm
  11. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_22.htm
  12. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_23.htm
  13. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_24.htm
  14. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_25.htm
  15. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_26.htm
  16. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_6.htm
  17. 0 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_9.htm
  18. 132 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/BanditStronghold.java
  19. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1choose.htm
  20. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1result.htm
  21. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2choose.htm
  22. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2result.htm
  23. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3choose.htm
  24. 0 2
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3result.htm
  25. 1 1
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4choose.htm
  26. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4result.htm
  27. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5choose.htm
  28. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5result.htm
  29. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_allychoose.htm
  30. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_attackersqueuefull.htm
  31. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_cannotunregister.htm
  32. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanalreadyregistered.htm
  33. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clannotregistered.htm
  34. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanqueuefull.htm
  35. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_curownermessage.htm
  36. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag1.htm
  37. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag2.htm
  38. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag3.htm
  39. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag4.htm
  40. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag5.htm
  41. 7 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_initial.htm
  42. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_leaderdidnotchooseyet.htm
  43. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noclanmember.htm
  44. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nomoney.htm
  45. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nonsiegeinitial.htm
  46. 1 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noquest.htm
  47. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_notclannotleader.htm
  48. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_onlyleaderselectally.htm
  49. 11 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registeredclans.htm
  50. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registrationpassed.htm
  51. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/siege_date.htm
  52. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/teleporter.htm
  53. 203 198
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java
  54. 138 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/WildBeastReserve.java
  55. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally1choose.htm
  56. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally1result.htm
  57. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally2choose.htm
  58. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally2result.htm
  59. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally3choose.htm
  60. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally3result.htm
  61. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally4choose.htm
  62. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally4result.htm
  63. 6 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally5choose.htm
  64. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally5result.htm
  65. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_allychoose.htm
  66. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_attackersqueuefull.htm
  67. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_cannotunregister.htm
  68. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clanalreadyregistered.htm
  69. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clannotregistered.htm
  70. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clanqueuefull.htm
  71. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clanregistered.htm
  72. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_curownermessage.htm
  73. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag1.htm
  74. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag2.htm
  75. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag3.htm
  76. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag4.htm
  77. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag5.htm
  78. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_initial.htm
  79. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_leaderdidnotchooseyet.htm
  80. 9 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_nonsiegeinitial.htm
  81. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_noquest.htm
  82. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_notclannotleader.htm
  83. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_registeredclans.htm
  84. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_registrationpassed.htm
  85. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/siege_date.htm
  86. 5 0
      L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/teleporter.htm
  87. 10 0
      L2J_DataPack_BETA/dist/game/data/zones/clan_hall_zones.xml
  88. 140 0
      L2J_DataPack_BETA/dist/game/data/zones/clanhall_teleport_zones.xml
  89. 13 52
      L2J_DataPack_BETA/dist/sql/game/clanhall_siege_guards.sql
  90. 2 1
      L2J_DataPack_BETA/dist/sql/game/siegable_hall_flagwar_attackers.sql
  91. 2 1
      L2J_DataPack_BETA/dist/sql/game/siegable_hall_flagwar_attackers_members.sql

+ 2 - 1
L2J_DataPack_BETA/dist/game/data/scripts.cfg

@@ -706,7 +706,8 @@ vehicles/SoIController/SoIController.java
 vehicles/SoDController/SoDController.java
 
 # Conquerable Clan Halls
-conquerablehalls/BanditStrongHold/BanditStrongHold.java
+conquerablehalls/flagwar/BanditStrongHold/BanditStrongHold.java
+conquerablehalls/flagwar/WildBeastReserve/WildBeastReserve.java
 conquerablehalls/DevastatedCastle/DevastatedCastle.java
 conquerablehalls/FortressOfResistance/FortressOfResistance.java
 conquerablehalls/FortressOfTheDead/FortressOfTheDead.java

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_1.htm

@@ -1 +0,0 @@
-<html><head><body>I'm just here to make sure the siege comes off without a hitch. I'll try to stay out of the way. Knock yourselves out!<br><a action="bypass -h Quest BanditStrongHold register_clan wQuest">Register a clan (must be a clan leader)</a><br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select a Clan NPC (must be a clan leader)</a><br><a action="bypass -h Quest BanditStrongHold view_clan_npc">View a Clan NPC (any clan member)</a><br><a action="bypass -h Quest BanditStrongHold register_member">Register as a clan member. (Any clan member)</a><br><br><a action="bypass -h npc_%objectId%_Quest 504_CompetitionfortheBanditStronghold">Quest</a></body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_10.htm

@@ -1 +0,0 @@
-<html><head><body>You clan leader is dithering on his selection of allies! Go and tell him to hurry up and decide!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_11.htm

@@ -1 +0,0 @@
-<html><head><body>Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.<br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br><a action="bypass -h Quest BanditStrongHold select_clan_npc 35428">Form an alliance.</a></body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_12.htm

@@ -1 +0,0 @@
-<html><head><body>The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br><a action="bypass -h Quest BanditStrongHold  agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br><a action="bypass -h Quest BanditStrongHold select_clan_npc 35429">Form an alliance.</a></body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_13.htm

@@ -1 +0,0 @@
-<html><head><body>The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...<br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br><a action="bypass -h Quest BanditStrongHold select_clan_npc 35430">Form an alliance.</a></body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_15.htm

@@ -1 +0,0 @@
-<html><head><body>Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique method to bind his legs.<br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br><a action="bypass -h Quest BanditStrongHold select_clan_npc 35432">Form an alliance.</a></body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_16.htm

@@ -1 +0,0 @@
-<html><head><body>
Your clan leader has not yet chosen who he will ally himself with! Go and tell him that his decision is required!
</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_17.htm

@@ -1 +0,0 @@
-<html><head><body>
Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.<br>
<a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br>
<a action="bypass -h Quest BanditStrongHold select_clan_npc 35428">Form an alliance.</a>
</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_18.htm

@@ -1 +0,0 @@
-<html><head><body>
+++The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br>
+++<a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br>
+++<a action="bypass -h Quest BanditStrongHold select_clan_npc 35429">Form an alliance.</a>
+++</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_22.htm

@@ -1 +0,0 @@
-<html><head><body>
Oh, sir, a master such as yourself need not prove himself! Leave such matters to the youngsters! Enjoy the show!
</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_23.htm

@@ -1 +0,0 @@
-<html><head><body>
Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique strategy to bind his legs.
<br>
<a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br>
<a action="bypass -h Quest BanditStrongHold select_clan_npc 35432">Form an alliance.</a>
</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_24.htm

@@ -1 +0,0 @@
-<html><head><body>
What's that, you want to register without qualifying? Well, maybe we can work something out... 200,000 adena might get this conversation started...
<br><a action="bypass -h Quest BanditStrongHold register_clan wFee">Pay the adena and register a clan. (clan leader)</a>
</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_25.htm

@@ -1 +0,0 @@
-<html><head><body>
+++Haven't you learned anything? Surely you don't think you can just walk away from our agreement! See you on the battlefield!
+++</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_26.htm

@@ -1 +0,0 @@
-<html><head><body>
So you want to register for free, eh? There is a way... You can take a test if you can't afford the fee...<br>
<center>
<a action="bypass -h npc_%objectId%_Quest Q504_CompetitionfortheBanditStronghold">"I want to take the test."</a><br>
</center>
</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_6.htm

@@ -1 +0,0 @@
-<html><head><body>This siege requires that you ally with an ol mahum warrior for battle. All five of these have good reputations. Now choose!<br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_11.htm">ol mahum berserker</a><br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_12.htm">ol mahum patrol </a><br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_13.htm">ol mahum prefect</a><br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_14.htm">ol mahum cleric</a><br><a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_15.htm">ol mahum thief</a><br></body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_9.htm

@@ -1 +0,0 @@
-<html><head><body>Ah, yes! Here is your registration! You are all set. Don't be late!</body></html>

+ 132 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/BanditStronghold.java

@@ -0,0 +1,132 @@
+/**
+ * 
+ */
+package conquerablehalls.flagwar.BanditStronghold;
+
+import com.l2jserver.gameserver.instancemanager.ZoneManager;
+import com.l2jserver.gameserver.model.L2CharPosition;
+import com.l2jserver.gameserver.model.zone.type.L2ResidenceHallTeleportZone;
+
+import conquerablehalls.flagwar.FlagWar;
+
+/**
+ * @author BiggBoss
+ */
+public final class BanditStronghold extends FlagWar
+{
+	static
+	{
+		qn = "BanditStronghold";
+		
+		FLAG_RED			= 35423;
+		FLAG_YELLOW			= 35424;
+		FLAG_GREEN			= 35425;
+		FLAG_BLUE			= 35426;
+		FLAG_PURPLE			= 35427;
+		
+		ALLY_1				= 35428;
+		ALLY_2				= 35429;
+		ALLY_3				= 35430;
+		ALLY_4				= 35431;
+		ALLY_5				= 35432;
+		
+		TELEPORT_1			= 35561;
+				
+		MESSENGER 			= 35437;
+
+		FLAG_COORDS[0] = new int[]{83607,-17541,-1829};
+		FLAG_COORDS[1] = new int[]{84965,-16140,-1829};
+		FLAG_COORDS[2] = new int[]{83280,-15171,-1832};
+		FLAG_COORDS[3] = new int[]{81629,-15004,-1831};
+		FLAG_COORDS[4] = new int[]{81596,-16562,-1848};
+		
+		ALLY_COORDS[0] = new int[] {83409,-17362,-1829};
+		ALLY_COORDS[1] = new int[] {85074,-16408,-1829};
+		ALLY_COORDS[2] = new int[] {83366,-15371,-1835};
+		ALLY_COORDS[3] = new int[] {81889,-14986,-1833};
+		ALLY_COORDS[4] = new int[] {81431,-16272,-1856};
+		
+		java.util.Collection<L2ResidenceHallTeleportZone> zoneList 
+		= ZoneManager.getInstance().getAllZones(L2ResidenceHallTeleportZone.class);
+		
+		for(L2ResidenceHallTeleportZone teleZone : zoneList)
+		{
+			if(teleZone.getResidenceId() != BANDIT_STRONGHOLD)
+				continue;
+			
+			int id = teleZone.getResidenceZoneId();
+			
+			if(id < 0 || id >= 5)						// Shouldnt happen
+				continue;
+			
+			TELE_ZONES[id] = teleZone;
+		}
+			
+		QUEST_REWARD 		= 5009;
+		CENTER 				= new L2CharPosition(82882,-16280,-1894,0);
+	}
+	
+	public BanditStronghold(int questId, String name, String descr, int hallId)
+	{
+		super(questId, name, descr, hallId);
+	}
+
+	@Override
+	public String getFlagHtml(int flag)
+	{
+		String result = null;
+		
+		switch(flag)
+		{
+			case 35423:
+				result = "messenger_flag1.htm";
+				break;
+			case 35424:
+				result = "messenger_flag2.htm";
+				break;
+			case 35425:
+				result = "messenger_flag3.htm";
+				break;
+			case 35426:
+				result = "messenger_flag4.htm";
+				break;
+			case 35427:
+				result = "messenger_flag5.htm";
+				break;
+		}
+		
+		return result;
+	}
+	
+	@Override
+	public String getAllyHtml(int ally)
+	{
+		String result = null;
+		
+		switch(ally)
+		{
+			case 35428:
+				result = "messenger_ally1result.htm";
+				break;
+			case 35429:
+				result = "messenger_ally2result.htm";
+				break;
+			case 35430:
+				result = "messenger_ally3result.htm";
+				break;
+			case 35431:
+				result = "messenger_ally4result.htm";
+				break;
+			case 35432:
+				result = "messenger_ally5result.htm";
+				break;
+		}
+		
+		return result;
+	}
+	
+	public static void main(String[] args)
+	{
+		new BanditStronghold(-1, qn, "conquerablehalls/flagwar", BANDIT_STRONGHOLD);
+	}
+}

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1choose.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.<br>
+<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
+<a action="bypass -h Quest BanditStrongHold select_clan_npc 35428">Form an alliance.</a>
+</body></html>

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally1result.htm

@@ -0,0 +1 @@
+<html><head><body>
+Ol mahum berserkers live for the most appalling aspects of war. An alliance with them would be quite useful to you. They are superior examples of their kind, but their enthusiasm for battle often prevents their proper healing after injury. They are a challenge to handle but are worth the effort.<br>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2choose.htm

@@ -0,0 +1,4 @@
+<html><head><body>The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br>
+<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
+<a action="bypass -h Quest BanditStrongHold select_clan_npc 35429">Form an alliance.</a>
+</body></html>

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally2result.htm

@@ -0,0 +1 @@
+<html><head><body>
+The ol mahum patrol may not appear to be anything special, but he is a slippery foe. I have never seen one captured by a knight!<br>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3choose.htm

@@ -0,0 +1,4 @@
+<html><head><body>The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...<br>
+<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
+<a action="bypass -h Quest BanditStrongHold select_clan_npc 35430">Form an alliance.</a>
+</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_19.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally3result.htm

@@ -1,5 +1,3 @@
 <html><head><body>
 The ol mahum prefects possess a powerful magic. They have been known to burn their enemies alive! Ah, yes, the infamous Aura Burn! They are also masters of their staffs, and are strong enough to withstand attack by swords or clubs. Their only weakness is a susceptibility to magic spells...<br>
-<a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br>
-<a action="bypass -h Quest BanditStrongHold select_clan_npc 35430">Form an alliance.</a>
 </body></html>

+ 1 - 1
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_14.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4choose.htm

@@ -1 +1 @@
-<html><head><body>Let me tell you what my opinion is regarding the Oel Mahum Clerics... Ah, even Oel Mahums have a god they worship. It is not the same god called Ein... something that you guys believe in. But, having a god for themselves won't change their natural temperament, will it? They would rather kill than eat. Whenever they get into a fight, they fret themselves  to death while trying to blow their enemies' heads off. If an oel mahum feels threatened he will not hesitate to run away and heal himself.... They are the kind of people who always leave a bad taste in your mouth.<br>
+++<a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select another NPC.</a><br><a action="bypass -h Quest BanditStrongHold select_clan_npc 35431">Form an alliance.</a></body></html>
+<html><head><body>Let me tell you what my opinion is regarding the Oel Mahum Clerics... Ah, even Oel Mahums have a god they worship. It is not the same god called Ein... something that you guys believe in. But, having a god for themselves won't change their natural temperament, will it? They would rather kill than eat. Whenever they get into a fight, they fret themselves  to death while trying to blow their enemies' heads off. If an oel mahum feels threatened he will not hesitate to run away and heal himself.... They are the kind of people who always leave a bad taste in your mouth.<br>
+<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
+<a action="bypass -h Quest BanditStrongHold select_clan_npc 35431">Form an alliance.</a>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_20.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally4result.htm


+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5choose.htm

@@ -0,0 +1,4 @@
+<html><head><body>Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique method to bind his legs.<br>
+<a action="bypass -h Quest BanditStrongHold messenger_allychoose.htm">Select another NPC.</a><br>
+<a action="bypass -h Quest BanditStrongHold select_clan_npc 35432">Form an alliance.</a>
+</body></html>

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_ally5result.htm

@@ -0,0 +1 @@
+<html><head><body>
+Ol mahum thieves are amusing little fellows. Shorter than the average ol mahum, they are exceptionally lithe. If they think they have the advantage, they will attack a target. But if they feel threatened they will evade direct conflict with the enemy while using a unique strategy to bind his legs.
+<br>
+</body></html>

+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_allychoose.htm

@@ -0,0 +1,7 @@
+<html><head><body>This siege requires that you ally with an ol mahum warrior for battle. All five of these have good reputations. Now choose!<br>
+<a action="bypass -h Quest BanditStrongHold messenger_ally1choose.htm">ol mahum berserker</a><br>
+<a action="bypass -h Quest BanditStrongHold messenger_ally2choose.htm">ol mahum patrol </a><br>
+<a action="bypass -h Quest BanditStrongHold messenger_ally3choose.htm">ol mahum prefect</a><br>
+<a action="bypass -h Quest BanditStrongHold messenger_ally4choose.htm">ol mahum cleric</a><br>
+<a action="bypass -h Quest BanditStrongHold messenger_ally5choose.htm">ol mahum thief</a><br>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_21.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_attackersqueuefull.htm


+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_cannotunregister.htm

@@ -0,0 +1 @@
+<html><head><body>
+Haven't you learned anything? Surely you don't think you can just walk away from our agreement! See you on the battlefield!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanalreadyregistered.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Ah, yes! Here is your registration! You are all set. Don't be late!
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_7.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clannotregistered.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_8.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_clanqueuefull.htm


+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_curownermessage.htm

@@ -0,0 +1 @@
+<html><head><body>
+Oh, sir, a master such as yourself need not prove himself! Leave such matters to the youngsters! Enjoy the show!
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_4a.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag1.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_4b.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag2.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_4c.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag3.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_4d.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag4.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_4e.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_flag5.htm


+ 7 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_initial.htm

@@ -0,0 +1,7 @@
+<html><head><body>I'm just here to make sure the siege comes off without a hitch. I'll try to stay out of the way. Knock yourselves out!<br>
+<a action="bypass -h Quest BanditStrongHold register_clan wQuest">Register a clan (must be a clan leader)</a><br>
+<a action="bypass -h Quest BanditStrongHold agit_oel_mahum_messenger_6.htm">Select a Clan NPC (must be a clan leader)</a><br>
+<a action="bypass -h Quest BanditStrongHold view_clan_npc">View a Clan NPC (any clan member)</a><br>
+<a action="bypass -h Quest BanditStrongHold register_member">Register as a clan member. (Any clan member)</a><br><br>
+<a action="bypass -h npc_%objectId%_Quest 504_CompetitionfortheBanditStronghold">Quest</a>
+</body></html>

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_leaderdidnotchooseyet.htm

@@ -0,0 +1 @@
+<html><head><body>
+Your clan leader has not yet chosen who he will ally himself with! Go and tell him that his decision is required!
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_5.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noclanmember.htm


+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nomoney.htm

@@ -0,0 +1 @@
+<html><head><body>
+So you want to register for free, eh? There is a way... You can take a test if you can't afford the fee...<br>
+<center>
+<a action="bypass -h npc_%objectId%_Quest Q504_CompetitionfortheBanditStronghold">"I want to take the test."</a><br>
+</center>
+</body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_nonsiegeinitial.htm

@@ -0,0 +1,8 @@
+<html><head>
+
+<body>Messenger:<br> What do you want from me?  I don't like that strangers can walk around on this land as they like.<br>
+Whew~,  but the stronghold is under the rule of <font color="00FFFF">%clanName%</font>clans at present...<br>
+<a action="bypass -h npc_%objectId%_Quest 504_CompetitionfortheBanditStronghold">Clan Hall War Registration Qualification Test</a><br>
+<a action="bypass -h Quest BanditStronghold register_clan"> Register for Clan Hall War</a><br>
+<a action="bypass -h Quest BanditStronghold view_attacker_list">View Clans Participating in Tournaments </a><br>
+</body></html>

+ 1 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_noquest.htm

@@ -0,0 +1 @@
+<html><head><body>
+What's that, you want to register without qualifying? Well, maybe we can work something out... 200,000 adena might get this conversation started...
+<br><a action="bypass -h Quest BanditStrongHold register_clan wFee">Pay the adena and register a clan. (clan leader)</a>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_2.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_notclannotleader.htm


+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_onlyleaderselectally.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+You clan leader is dithering on his selection of allies! Go and tell him to hurry up and decide!
+</body></html>

+ 11 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registeredclans.htm

@@ -0,0 +1,11 @@
+<html><head>
+<body>Messenger: <br>
+ If you're having second thoughts, now's the time to back out.  <br>The following Clans are participating in preliminaries:<br>
+=== Clans Registered for the Preliminary Contest ===
+<BR>1. <FONT color=00ffff>%clan1%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)
+<BR>2. <FONT color=00ffff>%clan2%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem2%</FONT>)
+<BR>3. <FONT color=00ffff>%clan3%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem3%</FONT>)
+<BR>4. <FONT color=00ffff>%clan4%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem4%</FONT>)
+<BR>5. <FONT color=00ffff>%clan5%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem5%</FONT>)
+<BR>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/agit_oel_mahum_messenger_3.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/messenger_registrationpassed.htm


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/azit_messenger_q0504_09.htm → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/siege_date.htm


+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/BanditStronghold/teleporter.htm

@@ -0,0 +1,5 @@
+<html>
+<body>
+You will be teleporter to the battlefield in 30 seconds.
+</body>
+</html>

+ 203 - 198
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/BanditStrongHold/BanditStrongHold.java → L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/FlagWar.java

@@ -1,18 +1,7 @@
-/*
- * This program is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation, either version 3 of the License, or (at your option) any later
- * version.
- * 
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
- * details.
+/**
  * 
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
  */
-package conquerablehalls.BanditStrongHold;
+package conquerablehalls.flagwar;
 
 import gnu.trove.map.hash.TIntObjectHashMap;
 
@@ -25,18 +14,21 @@ import com.l2jserver.L2DatabaseFactory;
 import com.l2jserver.gameserver.Announcements;
 import com.l2jserver.gameserver.ai.CtrlIntention;
 import com.l2jserver.gameserver.ai.L2SpecialSiegeGuardAI;
+import com.l2jserver.gameserver.cache.HtmCache;
 import com.l2jserver.gameserver.datatables.ClanTable;
 import com.l2jserver.gameserver.datatables.NpcTable;
 import com.l2jserver.gameserver.instancemanager.MapRegionManager.TeleportWhereType;
 import com.l2jserver.gameserver.model.L2CharPosition;
 import com.l2jserver.gameserver.model.L2Clan;
 import com.l2jserver.gameserver.model.L2SiegeClan;
-import com.l2jserver.gameserver.model.L2SiegeClan.SiegeClanType;
 import com.l2jserver.gameserver.model.L2Spawn;
 import com.l2jserver.gameserver.model.L2World;
+import com.l2jserver.gameserver.model.L2SiegeClan.SiegeClanType;
+import com.l2jserver.gameserver.model.Location;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.model.entity.clanhall.ClanHallSiegeEngine;
+import com.l2jserver.gameserver.model.zone.type.L2ResidenceHallTeleportZone;
 import com.l2jserver.gameserver.network.SystemMessageId;
 import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
 import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
@@ -44,102 +36,102 @@ import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
 
 /**
  * @author BiggBoss
- * Bandit Stronghold hall siege script
  */
-public final class BanditStrongHold extends ClanHallSiegeEngine
+public abstract class FlagWar extends ClanHallSiegeEngine
 {
-	private class ClanData
-	{
-		int flag = 0;
-		int npc = 0;
-		ArrayList<Integer> players = new ArrayList<Integer>(18);
-		ArrayList<L2PcInstance> playersInstance = new ArrayList<L2PcInstance>(18);
-		L2Spawn warrior = null;
-		L2Spawn flagInstance = null;
-	}
+	protected static String qn;
 	
-	private static final String qn = "BanditStrongHold";
+	private static final String SQL_LOAD_ATTACKERS			= "SELECT * FROM siegable_hall_flagwar_attackers WHERE hall_id = ?";
+	private static final String SQL_SAVE_ATTACKER 			= "INSERT INTO siegable_hall_flagwar_attackers_members VALUES (?,?,?)";
+	private static final String SQL_LOAD_MEMEBERS			= "SELECT object_id FROM siegable_hall_flagwar_attackers_members WHERE clan_id = ?";
+	private static final String SQL_SAVE_CLAN 				= "INSERT INTO siegable_hall_flagwar_attackers VALUES(?,?,?,?)";
+	private static final String SQL_SAVE_NPC				= "UPDATE siegable_hall_flagwar_attackers SET npc = ? WHERE clan_id = ?";
+	private static final String SQL_CLEAR_CLAN 				= "DELETE FROM siegable_hall_flagwar_attackers WHERE hall_id = ?";
+	private static final String SQL_CLEAR_CLAN_ATTACKERS 	= "DELETE FROM siegable_hall_flagwar_attackers_members WHERE hall_id = ?";
+
+	protected static int FLAG_RED;
+	protected static int FLAG_YELLOW;
+	protected static int FLAG_GREEN;
+	protected static int FLAG_BLUE;
+	protected static int FLAG_PURPLE;
 	
-	private static final String SQL_LOAD_ATTACKERS			= "SELECT * FROM bandit_stronghold_attackers";
-	private static final String SQL_SAVE_ATTACKER 			= "INSERT INTO bandit_stronghold_attackers_members VALUES (?,?)";
-	private static final String SQL_LOAD_MEMEBERS			= "SELECT object_id FROM bandit_stronghold_attackers_members WHERE clan_id = ?";
-	private static final String SQL_SAVE_CLAN 				= "INSERT INTO bandit_stronghold_attackers VALUES(?,?,?)";
-	private static final String SQL_SAVE_NPC				= "UPDATE bandit_stronghold_attackers SET npc = ? WHERE clan_id = ?";
-	private static final String SQL_CLEAR_CLAN 				= "DELETE FROM bandit_stronghold_attackers";
-	private static final String SQL_CLEAR_CLAN_ATTACKERS 	= "DELETE FROM bandit_stronghold_attackers_members";
+	protected static int ALLY_1;
+	protected static int ALLY_2;
+	protected static int ALLY_3;
+	protected static int ALLY_4;
+	protected static int ALLY_5;
 	
-	private static final int RED_FLAG = 35423;
-	private static final int YELLOW_FLAG = 35424;
-	private static final int GREEN_FLAG = 35425;
-	private static final int BLUE_FLAG = 35426;
-	private static final int PURPLE_FLAG = 35427;
+	protected static int TELEPORT_1;
 	
-	private static final int OEL_MAHUM_BERSERKER = 35428;
-	private static final int OEL_MAHUM_SCOUT = 35429;
-	private static final int OEL_MAHUM_LEADER = 35430;
-	private static final int OEL_MAHUM_CLERIC = 35431;
-	private static final int OEL_MAHUM_THIEF = 35432;
+	protected static int MESSENGER;
 	
-	private static final int MESSENGER = 35437;
+	protected static int[][] FLAG_COORDS = new int[5][3];
+	protected static int[][] ALLY_COORDS = new int[5][3];
 	
-	// Custom values
-	private static final int[][] FLAGS_COORDS =
-	{
-		{83607,-17541,-1829},
-		{84095,-15478,-1829},
-		{81768,-17036,-1826},
-		{81287,-16025,-1843},
-		{83243,-15077,-1829}
-	};
+	protected static L2ResidenceHallTeleportZone[] TELE_ZONES = new L2ResidenceHallTeleportZone[5];
 	
-	// Custom values
-	private static final int[][] MAHUM_COORDS =
-	{
-		{83658,-17337,-1829},
-		{84076,-15846,-1825},
-		{81990,-16900,-1839},
-		{81527,-15965,-1860},
-		{83168,-15319,-1848}
-	};
+	protected static int QUEST_REWARD;
 	
-	// Custom values
-	private static final L2CharPosition CENTER = new L2CharPosition(82882,-16280,-1894,0);
+	protected static L2CharPosition CENTER;
 	
-	private TIntObjectHashMap<ClanData> _data = new  TIntObjectHashMap<ClanData>();
-	private L2Clan _winner;
+	protected TIntObjectHashMap<ClanData> _data =  new TIntObjectHashMap<ClanData>();
+	protected L2Clan _winner;
 	
-	public BanditStrongHold(int questId, String name, String descr, final int hallId)
+	public FlagWar(int questId, String name, String descr, int hallId)
 	{
 		super(questId, name, descr, hallId);
+		
 		addStartNpc(MESSENGER);
 		addFirstTalkId(MESSENGER);
 		addTalkId(MESSENGER);
 		
-		addKillId(RED_FLAG);
-		addKillId(YELLOW_FLAG);
-		addKillId(GREEN_FLAG);
-		addKillId(BLUE_FLAG);
-		addKillId(PURPLE_FLAG);
+		for(int i = 0; i < 5; i++)
+			addFirstTalkId(TELEPORT_1 + i);
 		
-		addSpawnId(OEL_MAHUM_BERSERKER);
-		addSpawnId(OEL_MAHUM_SCOUT);
-		addSpawnId(OEL_MAHUM_LEADER);
-		addSpawnId(OEL_MAHUM_CLERIC);
-		addSpawnId(OEL_MAHUM_THIEF);
-		
-		// Load alredy registered attackers
-		loadAttackers();
+		addKillId(FLAG_RED);
+		addKillId(FLAG_YELLOW);
+		addKillId(FLAG_GREEN);
+		addKillId(FLAG_BLUE);
+		addKillId(FLAG_PURPLE);
 		
+		addSpawnId(ALLY_1);
+		addSpawnId(ALLY_2);
+		addSpawnId(ALLY_3);
+		addSpawnId(ALLY_4);
+		addSpawnId(ALLY_5);
+
 		// If siege ends w/ more than 1 flag alive, winner is old owner
 		_winner = ClanTable.getInstance().getClan(_hall.getOwnerId());
 	}
-	
+
 	@Override
 	public String onFirstTalk(L2Npc npc, L2PcInstance player)
 	{
+		String html = null;
+		/*
 		if(player.getQuestState(qn) == null)
 			newQuestState(player);
-		return "agit_oel_mahum_messenger_1.htm";
+		*/
+		if(npc.getNpcId() == MESSENGER)
+		{
+			if(!checkIsAttacker(player.getClan()))
+			{
+				L2Clan clan = ClanTable.getInstance().getClan(_hall.getOwnerId());
+				String content = HtmCache.getInstance().getHtm(null, "data/scripts/conquerablehalls/flagwar/"+qn+"/messenger_initial.htm");
+				content.replaceAll("%clanName%", clan == null? "no owner" : clan.getName());
+				content.replaceAll("%objectId%", String.valueOf(npc.getObjectId()));
+				html = content;
+			}
+			else
+				html = "messenger_initial.htm";
+		}
+		else
+		{
+			int index = npc.getNpcId() - TELEPORT_1;
+			TELE_ZONES[index].checkTeleporTask();
+			html = "teleporter.htm";
+		}
+		return html;
 	}
 	
 	@Override
@@ -148,27 +140,27 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		String html = event;
 		L2Clan clan = player.getClan();
 				
-		// Register the clan for the siege
-		if(event.startsWith("register_clan"))
+		if(event.startsWith("register_clan")) // Register the clan for the siege
 		{
-			if(!_hall.isWaitingBattle())
+			if(!_hall.isRegistering())
 			{
-				NpcHtmlMessage msg = new NpcHtmlMessage(5);
-				msg.setFile(null, "data/scripts/conquerablehalls/BanditStrongHold/azit_messenger_q0504_09.htm");
-				msg.replace("%objectId%", String.valueOf(npc.getObjectId()));
-				msg.replace("%nextSiege%", _hall.getSiegeDate().getTime().toString());
-				player.sendPacket(msg);
-				return null;
+				if(_hall.isInSiege())
+					html = "messenger_registrationpassed.htm";
+				else
+				{
+					sendRegistrationPageDate(player);
+					return null;
+				}
 			}
 			else if(clan == null || !player.isClanLeader())
-				html = "agit_oel_mahum_messenger_2.htm";
+				html = "messenger_notclannotleader.htm";
 			else if((_hall.getOwnerId() > 0 && getAttackers().size() >= 4)
 					|| getAttackers().size() >= 5)
-				html = "agit_oel_mahum_messenger_21.htm";
+				html = "messenger_attackersqueuefull.htm";
 			else if(checkIsAttacker(clan))
-				html = "agit_oel_mahum_messenger_9.htm";
+				html = "messenger_clanalreadyregistered.htm";
 			else if(_hall.getOwnerId() == clan.getClanId())
-				html = "agit_oel_mahum_messenger_22.htm";
+				html = "messenger_curownermessage.htm";
 			else
 			{
 				String[] arg = event.split(" ");
@@ -177,24 +169,24 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 					// Register passing the quest
 					if(arg[1].equals("wQuest"))
 					{
-						if(player.destroyItemByItemId("BanditStrongHold Siege", 5009, 1, npc, false)) // Quest passed
+						if(player.destroyItemByItemId(_hall.getName()+" Siege", QUEST_REWARD, 1, npc, false)) // Quest passed
 						{
 							registerClan(clan);
 							html = getFlagHtml(_data.get(clan.getClanId()).flag);
 						}
 						else // Quest not accoplished, try by paying
-							html = "agit_oel_mahum_messenger_24.htm";
+							html = "messenger_noquest.htm";
 					}
 					// Register paying the fee
-					else if(arg[1].equals("wFee"))
+					else if(arg[1].equals("wFee") && canPayRegistration())
 					{
-						if(player.reduceAdena("Bandit Stronghold registration", 200000, npc, true)) // Fee payed
+						if(player.reduceAdena(qn+" Siege", 200000, npc, false)) // Fee payed
 						{
 							registerClan(clan);
 							html = getFlagHtml(_data.get(clan.getClanId()).flag);
 						}
 						else // Fee couldnt be payed, try with quest
-							html = "agit_oel_mahum_messenger_26.htm";
+							html = "messenger_nomoney.htm";
 					}
 				}
 			}
@@ -203,9 +195,9 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		else if(event.startsWith("select_clan_npc"))
 		{
 			if(!player.isClanLeader())
-				html = "agit_oel_mahum_messenger_2.htm";
+				html = "messenger_onlyleaderselectally.htm";
 			else if(!_data.containsKey(clan.getClanId()))
-				html = "agit_oel_mahum_messenger_7.htm";
+				html = "messenger_clannotregistered.htm";
 			else
 			{
 				String[] var = event.split(" ");
@@ -215,51 +207,71 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 					try { id = Integer.parseInt(var[1]); }
 					catch(Exception e)
 					{
-						_log.warning("BanditStronghold->select_clan_npc->Wrong mahum warrior id: "+var[1]);
+						_log.warning(qn+"->select_clan_npc->Wrong mahum warrior id: "+var[1]);
 					}
-					if(id > 0 && (html = getMahumHtml(id)) != null)
+					if(id > 0 && (html = getAllyHtml(id)) != null)
 					{
 						_data.get(clan.getClanId()).npc = id;
 						saveNpc(id, clan.getClanId());
 					}
 				}
 				else
-					_log.warning("BanditStrongHold Siege: Not enough parameters to save clan npc for clan: "+clan.getName());
+					_log.warning(qn+" Siege: Not enough parameters to save clan npc for clan: "+clan.getName());
 			}
 		}
 		// View (and change ? ) the current selected mahum warrior
 		else if(event.startsWith("view_clan_npc"))
 		{
+			ClanData cd = null;
 			if(clan == null)
-				html = "agit_oel_mahum_messenger_2.htm";
-			ClanData cd = _data.get(clan.getClanId());
-			if(cd == null)
-				html = "agit_oel_mahum_messenger_7.htm";
+				html = "messenger_clannotregistered.htm";
+			else if((cd = _data.get(clan.getClanId())) == null)
+				html = "messenger_notclannotleader.htm";
 			else if(cd.npc == 0)
-				html = "agit_oel_mahum_messenger_10.htm";
+				html = "messenger_leaderdidnotchooseyet.htm";
 			else
-				html = getMahumHtml(cd.npc);
+				html = getAllyHtml(cd.npc);
 		}
 		// Register a clan member for the fight
 		else if(event.equals("register_member"))
 		{
 			if(clan == null)
-				html = "agit_oel_mahm_messenger_5.htm";
+				html = "messenger_clannotregistered.htm";
 			else if(!_hall.isRegistering())
-				html = "agit_oel_mahum_messenger_3.htm";
+				html = "messenger_registrationpassed.htm";
 			else if(!_data.containsKey(clan.getClanId()))
-				html = "agit_oel_mahum_messenger_7.htm";
+				html = "messenger_notclannotleader.htm";
 			else if(_data.get(clan.getClanId()).players.size() >= 18)
-				html = "agit_oel_mahum_messenger_8.htm";
+				html = "messenger_clanqueuefull.htm";
 			else
 			{
 				ClanData data = _data.get(clan.getClanId());
 				data.players.add(player.getObjectId());
 				saveMember(clan.getClanId(), player.getObjectId());
 				if(data.npc == 0)
-					html = "agit_oel_mahum_messenger_16.htm";
+					html = "messenger_leaderdidnotchooseyet.htm";
 				else
-					html = "agit_oel_mahum_messenger_9.htm";
+					html = "messenger_clanregistered.htm";
+			}
+		}
+		// Show cur attacker list
+		else if(event.equals("view_attacker_list"))
+		{
+			if(_hall.isRegistering())
+				sendRegistrationPageDate(player);
+			else
+			{
+				html = HtmCache.getInstance().getHtm(null, "data/scripts/conquerablehalls/flagwar/"+qn+"/messenger_registeredclans.htm");
+				for(int i = 0; i < _data.size(); i++)
+				{
+					L2Clan attacker = ClanTable.getInstance().getClan(_data.keys()[i]);
+					if(attacker == null)
+						continue;
+					html.replaceAll("%clan"+i+"%", clan.getName());
+					html.replaceAll("%clanMem"+i+"%", String.valueOf(((ClanData)_data.values()[i]).players.size()));
+				}
+				html.replaceAll("%clan", "Empty pos. ");
+				html.replaceAll("%clanMem", "Empty pos. ");
 			}
 		}
 		
@@ -296,10 +308,9 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 	public String onSpawn(L2Npc npc)
 	{
 		npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, CENTER);
-		npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
-		return super.onSpawn(npc);
+		return null;
 	}
-		
+	
 	@Override
 	public L2Clan getWinner()
 	{
@@ -326,7 +337,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 	@Override
 	public void onSiegeStarts()
 	{
-		for(ClanData data : _data.valueCollection())
+		for(ClanData data : _data.values())
 		{
 			try
 			{
@@ -335,18 +346,18 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 				
 				if(flagTemplate == null)
 				{
-					_log.warning("BanditStrongHoldSiege: Flag L2NpcTemplate["+data.flag+"] does not exist!");
+					_log.warning(qn+": Flag L2NpcTemplate["+data.flag+"] does not exist!");
 					continue;
 				}
 				if(mahumTemplate == null)
 				{
-					_log.warning("BanditStrongHoldSiege: Mahum L2NpcTemplate["+data.npc+"] does not exist!");
+					_log.warning(qn+": Ally L2NpcTemplate["+data.npc+"] does not exist!");
 					continue;
 				}
 						
 				data.flagInstance = new L2Spawn(flagTemplate);
-				int index = data.flag - 35423;
-				int[] flagCoords = FLAGS_COORDS[index];		
+				int index = data.flag - FLAG_RED;
+				int[] flagCoords = FLAG_COORDS[index];		
 				data.flagInstance.setLocx(flagCoords[0]);
 				data.flagInstance.setLocy(flagCoords[1]);
 				data.flagInstance.setLocz(flagCoords[2]);
@@ -365,10 +376,10 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 				}
 				
 				data.warrior = new L2Spawn(mahumTemplate);
-				int indexx = data.npc - 35428;
-				data.warrior.setLocx(MAHUM_COORDS[indexx][0]);
-				data.warrior.setLocy(MAHUM_COORDS[indexx][1]);
-				data.warrior.setLocz(MAHUM_COORDS[indexx][2]);
+				int indexx = data.npc - ALLY_1;
+				data.warrior.setLocx(ALLY_COORDS[indexx][0]);
+				data.warrior.setLocy(ALLY_COORDS[indexx][1]);
+				data.warrior.setLocz(ALLY_COORDS[indexx][2]);
 				data.warrior.setRespawnDelay(10000);
 				data.warrior.setAmount(1);
 				data.warrior.init();
@@ -378,7 +389,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 			catch(Exception e)
 			{
 				endSiege();
-				_log.warning(_hall.getName()+": Problems in siege initialization!");
+				_log.warning(qn+": Problems in siege initialization!");
 				e.printStackTrace();
 			}
 		}	
@@ -400,6 +411,29 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		clearTables();
 	}
 	
+	@Override
+	public final Location getInnerSpawnLoc(final L2PcInstance player)
+	{
+		Location loc = null;
+		ClanData cd = _data.get(player.getClanId());
+		if(cd != null)
+		{
+			// 0 is owner inner spawn point during no siege
+			int index = cd.npc - ALLY_1 + 1;
+			if(index >= 1 && index <= 5)
+				loc = _hall.getZone().getSpawns().get(index);
+			else 
+				throw new ArrayIndexOutOfBoundsException();
+		}
+		return loc;
+	}
+	
+	@Override
+	public final boolean canPlantFlag()
+	{
+		return false;
+	}
+	
 	private void registerClan(L2Clan clan)
 	{
 		final int clanId = clan.getClanId();
@@ -408,7 +442,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		getAttackers().put(clanId, sc);
 		
 		ClanData data = new ClanData();
-		data.flag = 35423 + _data.size();
+		data.flag = FLAG_RED + _data.size();
 		data.players.add(clan.getLeaderId());
 		_data.put(clanId, data);
 		
@@ -452,72 +486,34 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		}
 	}
 	
-	private String getFlagHtml(int flag)
+	public boolean canPayRegistration()
 	{
-		String result = null;
-		
-		switch(flag)
-		{
-			case RED_FLAG:
-				result = "agit_oel_mahum_messenger_4a.htm";
-				break;
-			case YELLOW_FLAG:
-				result = "agit_oel_mahum_messenger_4b.htm";
-				break;
-			case GREEN_FLAG:
-				result = "agit_oel_mahum_messenger_4c.htm";
-				break;
-			case BLUE_FLAG:
-				result = "agit_oel_mahum_messenger_4d.htm";
-				break;
-			case PURPLE_FLAG:
-				result = "agit_oel_mahum_messenger_4e.htm";
-				break;
-				default:
-					result = "<html><body>Are you kidding me?</body></html>";
-		}
-		
-		return result;
+		return true;
 	}
 	
-	private String getMahumHtml(int mahum)
+	private void sendRegistrationPageDate(L2PcInstance player)
 	{
-		String result = null;
-		
-		switch(mahum)
-		{
-			case OEL_MAHUM_BERSERKER:
-				result = "agit_oel_mahum_messenger_17.htm";
-				break;
-			case OEL_MAHUM_SCOUT:
-				result = "agit_oel_mahum_messenger_18.htm";
-				break;
-			case OEL_MAHUM_LEADER:
-				result = "agit_oel_mahum_messenger_19.htm";
-				break;
-			case OEL_MAHUM_CLERIC:
-				result = "agit_oel_mahum_messenger_20.htm";
-				break;
-			case OEL_MAHUM_THIEF:
-				result = "agit_oel_mahum_messenger_23.htm";
-				break;
-				default:
-					result = "<html><body>Are you kidding me?</body></html>";
-		}
-		
-		return result;
+		NpcHtmlMessage msg = new NpcHtmlMessage(5);
+		msg.setFile(null, "data/scripts/conquerablehalls/flagwar/"+qn+"/siege_date.htm");
+		msg.replace("%nextSiege%", _hall.getSiegeDate().getTime().toString());
+		player.sendPacket(msg);
 	}
 	
+	public abstract String getFlagHtml(int flag);	
+	public abstract String getAllyHtml(int ally);
+	
 	// =============================================
 	// Database access methods
 	// =============================================
-	private final void loadAttackers()
+	@Override
+	public final void loadAttackers()
 	{
 		Connection con = null;
 		try
 		{
 			con = L2DatabaseFactory.getInstance().getConnection();
 			PreparedStatement statement = con.prepareStatement(SQL_LOAD_ATTACKERS);
+			statement.setInt(1, _hall.getId());
 			ResultSet rset = statement.executeQuery();
 			while(rset.next())
 			{
@@ -525,7 +521,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 				
 				if(ClanTable.getInstance().getClan(clanId) == null)
 				{
-					_log.warning("BanditStronghold: Loaded an unexistent clan as attacker! Clan Id: "+clanId);
+					_log.warning(qn+": Loaded an unexistent clan as attacker! Clan Id: "+clanId);
 					continue;
 				}
 				
@@ -541,7 +537,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		}
 		catch(Exception e)
 		{
-			_log.warning("BanditStrongHold.loadAttackers()->"+e.getMessage());
+			_log.warning(qn+".loadAttackers()->"+e.getMessage());
 			e.printStackTrace();
 		}
 		finally
@@ -559,7 +555,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 			
 			if(listInstance == null)
 			{
-				_log.warning("BanditStronghold: Tried to load unregistered clan: "+clanId+"[clan Id]");
+				_log.warning(qn+": Tried to load unregistered clan: "+clanId+"[clan Id]");
 				return;
 			}
 			
@@ -577,7 +573,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		}
 		catch(Exception e)
 		{
-			_log.warning("BanditStrongHold.loadAttackerMembers()->"+e.getMessage());
+			_log.warning(qn+".loadAttackerMembers()->"+e.getMessage());
 			e.printStackTrace();
 		}
 		finally
@@ -593,15 +589,16 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		{
 			con = L2DatabaseFactory.getInstance().getConnection();
 			PreparedStatement statement = con.prepareStatement(SQL_SAVE_CLAN);
-			statement.setInt(1, flag);
-			statement.setInt(2, 0);
-			statement.setInt(3, clanId);
+			statement.setInt(1, _hall.getId());
+			statement.setInt(2, flag);
+			statement.setInt(3, 0);
+			statement.setInt(4, clanId);
 			statement.execute();
 			statement.close();
 		}
 		catch(Exception e)
 		{
-			_log.warning("BanditStrongHold.saveClan()->"+e.getMessage());
+			_log.warning(qn+".saveClan()->"+e.getMessage());
 			e.printStackTrace();
 		}
 		finally
@@ -624,7 +621,7 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		}
 		catch(Exception e)
 		{
-			_log.warning("BanditStrongHold.saveNpc()->"+e.getMessage());
+			_log.warning(qn+".saveNpc()->"+e.getMessage());
 			e.printStackTrace();
 		}
 		finally
@@ -640,14 +637,15 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		{
 			con = L2DatabaseFactory.getInstance().getConnection();
 			PreparedStatement statement = con.prepareStatement(SQL_SAVE_ATTACKER);
-			statement.setInt(1, clanId);
-			statement.setInt(2, objectId);
+			statement.setInt(1, _hall.getId());
+			statement.setInt(2, clanId);
+			statement.setInt(3, objectId);
 			statement.execute();
 			statement.close();
 		}
 		catch(Exception e)
 		{
-			_log.warning("BanditStronghold.saveMember()->"+e.getMessage());
+			_log.warning(qn+".saveMember()->"+e.getMessage());
 			e.printStackTrace();
 		}
 		finally
@@ -664,16 +662,18 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 			con = L2DatabaseFactory.getInstance().getConnection();
 			
 			PreparedStatement stat1 = con.prepareStatement(SQL_CLEAR_CLAN);
+			stat1.setInt(1, _hall.getId());
 			stat1.execute();
 			stat1.close();
 			
 			PreparedStatement stat2 = con.prepareStatement(SQL_CLEAR_CLAN_ATTACKERS);
+			stat2.setInt(1, _hall.getId());
 			stat2.execute();
 			stat2.close();
 		}
 		catch(Exception e)
 		{
-			_log.warning("BanditStrongHold.clearTables()->"+e.getMessage());
+			_log.warning(qn+".clearTables()->"+e.getMessage());
 			e.printStackTrace();
 		}
 		finally
@@ -682,8 +682,13 @@ public final class BanditStrongHold extends ClanHallSiegeEngine
 		}
 	}
 	
-	public static void main(String[] args)
+	class ClanData
 	{
-		new BanditStrongHold(-1, qn, "conquerablehalls", BANDIT_STRONGHOLD);
+		int flag = 0;
+		int npc = 0;
+		ArrayList<Integer> players = new ArrayList<Integer>(18);
+		ArrayList<L2PcInstance> playersInstance = new ArrayList<L2PcInstance>(18);
+		L2Spawn warrior = null;
+		L2Spawn flagInstance = null;
 	}
-}
+}

+ 138 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/WildBeastReserve.java

@@ -0,0 +1,138 @@
+/**
+ * 
+ */
+package conquerablehalls.flagwar.WildBeastReserve;
+
+import com.l2jserver.gameserver.instancemanager.ZoneManager;
+import com.l2jserver.gameserver.model.L2CharPosition;
+import com.l2jserver.gameserver.model.zone.type.L2ResidenceHallTeleportZone;
+
+import conquerablehalls.flagwar.FlagWar;
+
+/**
+ * @author BiggBoss
+ */
+public final class WildBeastReserve extends FlagWar
+{
+	static
+	{
+		qn = "WildBeastReserve";
+		
+		FLAG_RED					= 35607;	// White flag
+		FLAG_YELLOW					= 35608;	// Red flag
+		FLAG_GREEN					= 35609;	// Blue flag
+		FLAG_BLUE					= 35610;	// Green flag
+		FLAG_PURPLE					= 35611;	// Black flag
+		
+		ALLY_1						= 35618;
+		ALLY_2						= 35619;
+		ALLY_3						= 35620;
+		ALLY_4						= 35621;
+		ALLY_5						= 35622;
+		
+		TELEPORT_1 					= 35613;
+		
+		MESSENGER 					= 35627;
+		
+		FLAG_COORDS[0] = new int[]{59489,-91704,-1359};
+		FLAG_COORDS[1] = new int[]{57448,-90896,-1359};
+		FLAG_COORDS[2] = new int[]{56013,-92601,-1358};
+		FLAG_COORDS[3] = new int[]{57270,-94211,-1360};
+		FLAG_COORDS[4] = new int[]{59478,-94270,-1355};
+		
+		ALLY_COORDS[0] = new int[]{59342,-91632,-1360};
+		ALLY_COORDS[1] = new int[]{57325,-91094,-1354};
+		ALLY_COORDS[2] = new int[]{56184,-92742,-1358};
+		ALLY_COORDS[3] = new int[]{57511,-94009,-1368};
+		ALLY_COORDS[4] = new int[]{57537,-93921,-1360};
+		
+		java.util.Collection<L2ResidenceHallTeleportZone> zoneList 
+		= ZoneManager.getInstance().getAllZones(L2ResidenceHallTeleportZone.class);
+		
+		for(L2ResidenceHallTeleportZone teleZone : zoneList)
+		{
+			if(teleZone.getResidenceId() != BEAST_FARM)
+				continue;
+			
+			int id = teleZone.getResidenceZoneId();
+			
+			if(id < 0 || id >= 5)						// Shouldnt happen
+				continue;
+			
+			TELE_ZONES[id] = teleZone;
+		}
+		
+		QUEST_REWARD = 0;
+		CENTER = new L2CharPosition(57762,-92696,-1359,0);
+	}
+
+	public WildBeastReserve(int questId, String name, String descr, int hallId)
+	{
+		super(questId, name, descr, hallId);
+	}
+
+	@Override
+	public String getFlagHtml(int flag)
+	{
+		String result = null;
+		
+		switch(flag)
+		{
+			case 35607:
+				result = "messenger_flag1.htm";
+				break;
+			case 35608:
+				result = "messenger_flag2.htm";
+				break;
+			case 35609:
+				result = "messenger_flag3.htm";
+				break;
+			case 35610:
+				result = "messenger_flag4.htm";
+				break;
+			case 35611:
+				result = "messenger_flag5.htm";
+				break;
+		}
+		
+		return result;
+	}
+
+	@Override
+	public String getAllyHtml(int ally)
+	{
+		String result = null;
+		
+		switch(ally)
+		{
+			case 35618:
+				result = "messenger_ally1result.htm";
+				break;
+			case 35619:
+				result = "messenger_ally2result.htm";
+				break;
+			case 35620:
+				result = "messenger_ally3result.htm";
+				break;
+			case 35621:
+				result = "messenger_ally4result.htm";
+				break;
+			case 35622:
+				result = "messenger_ally5result.htm";
+				break;
+		}
+		
+		return result;
+	}
+	
+	@Override
+	public boolean canPayRegistration()
+	{
+		return false;
+	}
+	
+	public static void main(String[] args)
+	{
+		new WildBeastReserve(-1, qn, "conquerablehalls/flagwar", BEAST_FARM);
+	}
+}

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally1choose.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+As you probably guessed, Cougars are known for their bite! They're also much stronger than other beasts... They're worth taming, but if they get hungry, watch out! They fight tirelessly, with no thought to their own safety, or even survival! They require a very special type of handler...<br>
+<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
+<a action="bypass -h Quest WildBeastReserve selet_npc 35618"> "I want to form an alliance."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally1result.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Cougars are literally fighting machines, who only know how to rip, twist, destroy and kill! If you form an alliance with them, you'll have a mighty war machine at your disposal! They're far stronger than any other beast! But beware... They're so crazy that they stop at nothing! They'll go after the next enemy even when they're gravely injured! They're quite a challenge to handle...
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally2choose.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+Buffaloes may seem slow, but they can run faster than the fastest bull! They're huge and resilient beasts...<br>
+<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm"> "I want to choose another NPC."</a><br>
+<a action="bypass -h Quest WildBeastReserve select_npc 35619"> "I want to form an alliance."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally2result.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Buffaloes may appear to possess no special abilities, but they are great at running away! I assume you've witnessed these huge beasts stamping on the ground to make their enemies freeze on the spot? I've never seen that trick work on a Buffalo!
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally3choose.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+Kookaburras are quite rare. They possess unusually long legs and brilliantly-colored feathers... They peck the enemy with their beaks and use a mysterious and extremely powerful magic. They don't respond well to beatings. The only reason I was able to capture them is their susceptibility to magic.<br>
+<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
+<a action="bypass -h Quest WildBeastReserve 35620">"I want to form an alliance."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally3result.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Kookaburras... How to describe them...? They're truly magical beasts! They burn their enemy with supernatural powers! What's it called?...  Aura Burn, maybe? Occasionally, they'll peck at their enemy with their beaks! They're strong enough to withstand sword and stick attacks. One drawback, though... they're surprisingly susceptible to magic...
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally4choose.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+Baby Buffalos are among the most fearsome beasts. It prefers fighting to food, and lives to break an enemy's head in battle. When it finds itself in danger, it retreats and heals itself with magic... But I must admit, it's not a very attractive beast.<br>
+<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
+<a action="bypass -h Quest WildBeastReserve select_npc 35621">"I want to form an alliance."</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally4result.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+As for Baby Buffalos... They're truly the king of beasts, though certainly not the most attractive! They actually prefer fighting to food! They're capable of retreating from battle when injured to heal themselves... 
+</body></html>

+ 6 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally5choose.htm

@@ -0,0 +1,6 @@
+<html><head>
+<body>
+Baby Cougars may look cute, but they have sharp claws and are deadly fast! They're almost impossible to hit, and they have the unique ability to ensnare the enemy's legs on the rare occasion that they find themselves at a disadvantage in battle.<br>
+<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">"I want to choose another NPC."</a><br>
+<a action="bypass -h Quest WildBeastReserve select_npc 35622">"I want to form an alliance."</a>
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_ally5result.htm

@@ -0,0 +1,5 @@
+<html><head>
+<body>
+Ah, the Baby Cougars... They may look cute, but they're as fast as lightning with their sharp claws! They're hard to hit, and  have a unique ability to restrain the enemy's movements when
+they find themselves at a disadvantage in battle.
+</body></html>

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_allychoose.htm

@@ -0,0 +1,8 @@
+<html><head><body>
+During the coming war, your Clan must ally with one of the following five most vicious types of wild beasts:<br>
+<a action="bypass -h Quest WildBeastReserve messenger_ally1choose.htm">Frenzied Cougar </a><br>
+<a action="bypass -h Quest WildBeastReserve messenger_ally2choose.htm">Frenzied Buffalo </a><br>
+<a action="bypass -h Quest WildBeastReserve messenger_ally3choose.htm">Frenzied Kookaburra </a><br>
+<a action="bypass -h Quest WildBeastReserve messenger_ally4choose.htm">Frenzied Baby Buffalo </a><br>
+<a action="bypass -h Quest WildBeastReserve messenger_ally5choose.htm">Frenzied Baby Cougar </a><br>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_attackersqueuefull.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+All five clans have already registered for this Clan Hall Battle. You're too late! Next time, get here earlier!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_cannotunregister.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+You don't remember what you did in the previous battle? Surely you don't intend to break the alliance... Or do you? <br>Confirm it yourself on the battlefield!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clanalreadyregistered.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Have you forgotten so soon? You're already registered! If you have the time, you should read a book called "How to Tame Beasts".<br>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clannotregistered.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Humm... What did you say your clan name was? Well... Hey! You're not even registered for this Clan Hall Battle! You must follow the proper procedure! Get your act together!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clanqueuefull.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Your clan is no longer accepting new members. All 18 clan members have been registered! You must be a common soldier.
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_clanregistered.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Registration was successful! Make sure you're not late for the Clan Hall Battle!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_curownermessage.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+There's no need for you to go through the preliminaries designed for common soldiers, master! Enjoy the fights, sir!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag1.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+We'll rendezvous in front of our yellow team banner before the battle! Don't forget!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag2.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+We'll rendezvous in front of our red team banner before the battle! Don't forget!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag3.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+We'll rendezvous in front of our blue team banner before the battle! Don't forget!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag4.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+We'll rendezvous in front of our green team banner before the battle! Don't forget!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_flag5.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+We'll rendezvous in front of our purple team banner before the battle! Don't forget!
+</body></html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_initial.htm

@@ -0,0 +1,9 @@
+<html><head>
+<body>
+Are you ready? Remember, these are wild animals! Don't let them bite you! It won't be easy! <br>
+<a action="bypass -h Quest WildBeastReserve register_clan">Clan Register (Leader)</a><br>
+<a action="bypass -h Quest WildBeastReserve messenger_allychoose.htm">Choose Clan NPC (Leader)</a><br>
+<a action="bypass -h Quest WildBeastReserve view_clan_npc">See Clan NPC (Member)</a><br>
+<a action="bypass -h Quest WildBeastReserver register_member">Clan Member Register (Member)</a>
+<br><br><a action="bypass -h npc_%objectId%_Quest 655_AGrandPlanforTamingWildBeasts">Quest</a>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_leaderdidnotchooseyet.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Your Clan Leader hasn't decided which beast to tame. He must be taking his time...
+</body></html>

+ 9 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_nonsiegeinitial.htm

@@ -0,0 +1,9 @@
+<HTML>
+<BODY>
+Messenger:<BR>What brings you to this place? I can't be responsible for your safety here!<BR>
+Unless, that is, you're a member of the <FONT color=00ffff><?my_pledge_name?></FONT> Clan in charge of the farm.<BR>
+<a action="bypass -h npc_%objectId%_Quest 655_AGrandPlanforTamingWildBeasts">Qualification Test for Clan Hall Battle Registration</A><BR>
+<a action="bypass -h Quest WildBeastReserve register_clan">Register for Clan Hall Battle</A><BR>
+<a action="bypass -h Quest WildBeastReserve view_attacker_list">Clans Participating in the Preliminaries</A><BR>
+</BODY></HTML>
+

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_noquest.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Before you can register for the Clan Hall Battle, you must learn to tame beasts. Come back when you're ready. <br>
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_notclannotleader.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+Only Clan Leaders may register their clans. Scram!
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_registeredclans.htm

@@ -0,0 +1,10 @@
+<HTML><BODY>
+Messenger: <BR>The following Clans have applied for entry to the preliminary contest. This would be a good time to study their strategies. <BR><BR>
+=== Clans Registered for the Preliminary Contest ===
+<BR>1. <FONT color=00ffff>%clan1%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)
+<BR>2. <FONT color=00ffff>%clan2%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)
+<BR>3. <FONT color=00ffff>%clan3%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)
+<BR>4. <FONT color=00ffff>%clan4%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)
+<BR>5. <FONT color=00ffff>%clan5%</FONT> (Number of Participants :  <FONT color=00ffff>%clanMem1%</FONT>)
+<BR>
+</BODY></HTML>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/messenger_registrationpassed.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>
+The deadline for registration has passed! Get here earlier next time!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/siege_date.htm

@@ -0,0 +1,4 @@
+<html><head>
+<body>Messenger:<br>Registration begins an hour before the Clan Hall War.  <br>
+As far as I know, the next Clan Hall War is around %nextSiege%. Check back then.
+</body></html>

+ 5 - 0
L2J_DataPack_BETA/dist/game/data/scripts/conquerablehalls/flagwar/WildBeastReserve/teleporter.htm

@@ -0,0 +1,5 @@
+<html>
+<body>
+You will be teleporter to the battlefield in 30 seconds.
+</body>
+</html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/zones/clan_hall_zones.xml

@@ -308,6 +308,11 @@
 		<node X="79196" Y="-13584" />
 		<!-- owner_restart_point_list -->
 		<spawn X="80339" Y="-15442" Z="-1804" />
+		<spawn X="83367" Y="-18136" Z="-1247" /> <!-- Temporary battle spawn 1 -->
+		<spawn X="85268" Y="-15443" Z="-1247" /> <!-- Temporary battle spawn 2 -->
+		<spawn X="83681" Y="-14487" Z="-1249" /> <!-- Temporary battle spawn 3 -->
+		<spawn X="81831" Y="-14200" Z="-1249" /> <!-- Temporary battle spawn 4 -->
+		<spawn X="81225" Y="-17481" Z="-1249" /> <!-- Temporary battle spawn 5 -->
 		<!-- other_restart_village_list -->
 		<spawn X="80304" Y="56241" Z="-1500" isOther="true" />
 		<spawn X="80594" Y="55837" Z="-1500" isOther="true" />
@@ -833,6 +838,11 @@
 		<node X="56049" Y="-94619" />
 		<!-- owner_restart_point_list -->
 		<spawn X="60608" Y="-94016" Z="-1349" />
+		<spawn X="60219" Y="-92396" Z="-1360" /> <!-- Temporary battle spawn 1 -->
+		<spawn X="58298" Y="-90302" Z="-1360" /> <!-- Temporary battle spawn 2 -->
+		<spawn X="55759" Y="-91603" Z="-1360" /> <!-- Temporary battle spawn 3 -->
+		<spawn X="56250" Y="-94332" Z="-1360" /> <!-- Temporary battle spawn 4 -->
+		<spawn X="58972" Y="-94795" Z="-1360" /> <!-- Temporary battle spawn 5 -->
 		<!-- other_restart_village_list -->
 		<spawn X="38096" Y="-46976" Z="899" isOther="true" />
 		<spawn X="38608" Y="-47168" Z="899" isOther="true" />

+ 140 - 0
L2J_DataPack_BETA/dist/game/data/zones/clanhall_teleport_zones.xml

@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="zones.xsd">
+	<!-- Clan Hall Teleport Zones -->
+	<zone name="bandit_stronghold_restart_territory_1" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="35" />
+		<stat name="residenceZoneId" val="0" />  <!-- Identifier inside hall's teleport zones -->
+		<node X="83536" Y="-18012" />
+		<node X="83499" Y="-18378" />
+		<node X="83326" Y="-18455" />
+		<node X="83185" Y="-18317" />
+		<node X="83220" Y="-17986" />
+		<spawn X="83909" Y="-17481" Z="-1830" /> <!-- Battlefield spawn zone -->
+	</zone>
+	<zone name="bandit_stronghold_restart_territory_2" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="35" />
+		<stat name="residenceZoneId" val="1" />
+		<node X="84997" Y="-15613" />
+		<node X="85158" Y="-15305" />
+		<node X="85364" Y="-15270" />
+		<node X="85434" Y="-15466" />
+		<node X="85270" Y="-15764" />
+		<spawn X="84877" Y="-16048" Z="-1829" />
+	</zone>
+	<zone name="bandit_stronghold_restart_territory_3" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="35" />
+		<stat name="residenceZoneId" val="2" />
+		<node X="83463" Y="-14772" />
+		<node X="83528" Y="-14441" />
+		<node X="83713" Y="-14349" />
+		<node X="83852" Y="-14515" />
+		<node X="83778" Y="-14832" />
+		<spawn X="83025" Y="-15259" Z="-1846" />
+	</zone>
+	<zone name="bandit_stronghold_restart_territory_4" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="35" />
+		<stat name="residenceZoneId" val="3" />
+		<node X="81638" Y="-14510" />
+		<node X="81676" Y="-14159" />
+		<node X="81845" Y="-14058" />
+		<node X="81995" Y="-14200" />
+		<node X="81957" Y="-14541" />
+		<spawn X="81522" Y="-15206" Z="-1829" />
+	</zone>
+	<zone name="bandit_stronghold_restart_territory_5" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="35" />
+		<stat name="residenceZoneId" val="4" />
+		<node X="81492" Y="-17235" />
+		<node X="81361" Y="-17550" />
+		<node X="81168" Y="-17602" />
+		<node X="81071" Y="-17412" />
+		<node X="81206" Y="-17110" />
+		<spawn X="81702" Y="-16641" Z="-1846" />
+	</zone>
+	
+	<zone name="wild_beast_reserve_restart_territory_1" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="63" />
+		<stat name="residenceZoneId" val="0" />
+		<node X="60335" Y="-92873" />
+		<node X="59641" Y="-92960" />
+		<node X="59587" Y="-92680" />
+		<node X="59336" Y="-92708" />
+		<node X="59286" Y="-92330" />
+		<node X="59547" Y="-92304" />
+		<node X="59500" Y="-91980" />
+		<node X="60202" Y="-91869" />
+		<node X="60220" Y="-91986" />
+		<node X="60356" Y="-91987" />
+		<node X="60462" Y="-92711" />
+		<node X="60318" Y="-92759" />
+		<spawn X="59315" Y="-91798" Z="-1356" />
+	</zone>
+	<zone name="wild_beast_reserve_restart_territory_2" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1360" maxZ="-1281">
+		<stat name="residenceId" val="63" />
+		<stat name="residenceZoneId" val="1" />
+		<node X="58821" Y="-90419" />
+		<node X="58684" Y="-91068" />
+		<node X="58417" Y="-91047" />
+		<node X="58363" Y="-91289" />
+		<node X="57975" Y="-91224" />
+		<node X="58020" Y="-90983" />
+		<node X="57712" Y="-90910" />
+		<node X="57824" Y="-90219" />
+		<node X="57936" Y="-90243" />
+		<node X="57994" Y="-90103" />
+		<node X="58702" Y="-90225" />
+		<node X="58699" Y="-90363" />
+		<spawn X="57325" Y="-91094" Z="-1354" />
+	</zone>
+	<zone name="wild_beast_reserve_restart_territory_3" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="63" />
+		<stat name="residenceZoneId" val="2" />
+		<node X="55979" Y="-91116" />
+		<node X="55914" Y="-91224" />
+		<node X="56597" Y="-91452" />
+		<node X="56487" Y="-91696" />
+		<node X="56712" Y="-91815" />
+		<node X="56526" Y="-92170" />
+		<node X="56312" Y="-92032" />
+		<node X="56152" Y="-92328" />
+		<node X="55530" Y="-92031" />
+		<node X="55581" Y="-91939" />
+		<node X="55462" Y="-91837" />
+		<node X="55785" Y="-91191" />
+		<spawn X="56268" Y="-92538" Z="-1362" />
+	</zone>
+	<zone name="wild_beast_reserve_restart_territory_4" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="63" />
+		<stat name="residenceZoneId" val="3" />
+		<node X="55844" Y="-93986" />
+		<node X="56339" Y="-93521" />
+		<node X="56530" Y="-93688" />
+		<node X="56714" Y="-93521" />
+		<node X="56994" Y="-93798" />
+		<node X="56812" Y="-93977" />
+		<node X="57035" Y="-94204" />
+		<node X="56543" Y="-94704" />
+		<node X="56472" Y="-94630" />
+		<node X="56347" Y="-94704" />
+		<node X="55834" Y="-94198" />
+		<node X="55915" Y="-94067" />
+		<spawn X="57267" Y="-93871" Z="-1371" />
+	</zone>
+	<zone name="wild_beast_reserve_restart_territory_5" type="ResidenceHallTeleportZone" shape="NPoly" minZ="-1840" maxZ="-1540">
+		<stat name="residenceId" val="63" />
+		<stat name="residenceZoneId" val="4" />
+		<node X="58478" Y="-95028" />
+		<node X="58188" Y="-94413" />
+		<node X="58422" Y="-94266" />
+		<node X="58320" Y="-94053" />
+		<node X="58658" Y="-93878" />
+		<node X="58784" Y="-94085" />
+		<node X="59064" Y="-93972" />
+		<node X="59390" Y="-94582" />
+		<node X="59290" Y="-94648" />
+		<node X="59330" Y="-94776" />
+		<node X="58674" Y="-95107" />
+		<node X="58590" Y="-94988" />
+		<spawn X="59227" Y="-93925" Z="-1360" />
+	</zone>
+</list>

+ 13 - 52
L2J_DataPack_BETA/dist/sql/game/clanhall_siege_guards.sql

@@ -397,60 +397,21 @@ INSERT INTO `clanhall_siege_guards` VALUES
 (21,35383,43129,108841,-1980,0,60,'false'),
 (21,35375,44525,108867,-2020,0,10800,'true'); 
 
+INSERT INTO `clanhall_siege_guards` VALUES
+-- Bandit Stronghold
+(35,35561,83341,-18309,-1247,16102,1200,'false'),
+(35,35562,85190,-15583,-1247,11451,1200,'false'),
+(35,35563,83654,-14663,-1247,12309,1200,'false'),
+(35,35564,81809,-14375,-1247,14954,1200,'false'),
+(35,35565,81299,-17283,-1247,46120,1200,'false');
+
 INSERT INTO `clanhall_siege_guards` VALUES
 -- Beast Farm
-(63,35618,57058,-92275,-1360,57344,1200,'false'),
-(63,35619,57058,-92275,-1360,57344,1200,'false'),
-(63,35620,57058,-92275,-1360,57344,1200,'false'),
-(63,35621,57058,-92275,-1360,57344,1200,'false'),
-(63,35622,57058,-92275,-1360,57344,1200,'false'),
-(63,35618,58071,-91756,-1360,47274,1200,'false'),
-(63,35619,58071,-91756,-1360,47274,1200,'false'),
-(63,35620,58071,-91756,-1360,47274,1200,'false'),
-(63,35621,58071,-91756,-1360,47274,1200,'false'),
-(63,35622,58071,-91756,-1360,47274,1200,'false'),
-(63,35618,58800,-92560,-1360,34450,1200,'false'),
-(63,35619,58800,-92560,-1360,34450,1200,'false'),
-(63,35620,58800,-92560,-1360,34450,1200,'false'),
-(63,35621,58800,-92560,-1360,34450,1200,'false'),
-(63,35622,58800,-92560,-1360,34450,1200,'false'),
-(63,35618,58297,-93503,-1361,21100,1200,'false'),
-(63,35619,58297,-93503,-1361,21100,1200,'false'),
-(63,35620,58297,-93503,-1361,21100,1200,'false'),
-(63,35621,58297,-93503,-1361,21100,1200,'false'),
-(63,35622,58297,-93503,-1361,21100,1200,'false'),
-(63,35618,57215,-93306,-1359,8400,1200,'false'),
-(63,35619,57215,-93306,-1359,8400,1200,'false'),
-(63,35620,57215,-93306,-1359,8400,1200,'false'),
-(63,35621,57215,-93306,-1359,8400,1200,'false'),
-(63,35622,57215,-93306,-1359,8400,1200,'false'),
--- Beast Farm Final
-(63,35618,56560,-92880,-1360,64000,1200,'false'),
-(63,35619,56560,-92880,-1360,64000,1200,'false'),
-(63,35620,56560,-92880,-1360,64000,1200,'false'),
-(63,35621,56560,-92880,-1360,64000,1200,'false'),
-(63,35622,56560,-92880,-1360,64000,1200,'false'),
-(63,35618,58989,-93234,-1303,31000,1200,'false'),
-(63,35619,58989,-93234,-1303,31000,1200,'false'),
-(63,35620,58989,-93234,-1303,31000,1200,'false'),
-(63,35621,58989,-93234,-1303,31000,1200,'false'),
-(63,35622,58989,-93234,-1303,31000,1200,'false');
--- Beast Farm Pet
--- (63,16019,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16023,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16021,anywhere,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16019,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16023,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16021,anywhere,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16019,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16023,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16021,anywhere,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16019,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16023,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16021,anywhere,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16019,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16023,anywhere - total 2,0,1800,'false'), TODO: needs support for random spawn by zone.
--- (63,16021,anywhere,0,1800,'false'); TODO: needs support for random spawn by zone.
+(63,35613,59785,-92481,-1360,1093,1200,'false'),
+(63,35614,58270,-90756,-1360,14325,1200,'false'),
+(63,35615,56203,-91740,-1360,25072,1200,'false'),
+(63,35616,56450,-94020,-1360,39350,1200,'false'),
+(63,35617,58706,-94427,-1360,53417,1200,'false');
 
 INSERT INTO `clanhall_siege_guards` VALUES
 -- Fortress of the Dead

+ 2 - 1
L2J_DataPack_BETA/dist/sql/game/bandit_stronghold_attackers.sql → L2J_DataPack_BETA/dist/sql/game/siegable_hall_flagwar_attackers.sql

@@ -1,4 +1,5 @@
-CREATE TABLE IF NOT EXISTS `bandit_stronghold_attackers` (
+CREATE TABLE IF NOT EXISTS `siegable_hall_flagwar_attackers` (
+`hall_id` int(2) UNSIGNED NOT NULL DEFAULT '0',
 `flag` int(10) UNSIGNED NOT NULL DEFAULT '0',
 `npc` int(10) UNSIGNED NOT NULL DEFAULT '0',
 `clan_id` int(10) UNSIGNED NOT NULL DEFAULT '0',

+ 2 - 1
L2J_DataPack_BETA/dist/sql/game/bandit_stronghold_attackers_members.sql → L2J_DataPack_BETA/dist/sql/game/siegable_hall_flagwar_attackers_members.sql

@@ -1,4 +1,5 @@
-CREATE TABLE IF NOT EXISTS `bandit_stronghold_attackers_members` (
+CREATE TABLE IF NOT EXISTS `siegable_hall_flagwar_attackers_members` (
+`hall_id` int(2) UNSIGNED NOT NULL DEFAULT '0',
 `clan_id` int(10) UNSIGNED NOT NULL DEFAULT '0',
 `object_id` int(10) UNSIGNED NOT NULL DEFAULT '0'
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;