浏览代码

BETA: Unardcoding instance of Territory Managers:
* Using retail htmls.
* Removed all the duplicated htmls, same way as retail does, we send Gludio's Npc htmls.
* Added all retail conditions to become noblesse.
* Inspired by malyelfik's work.
* Now noblesse quest are completed and related items are removed.
* Subclass quest is completed, depending if player's race is Kamael or not.
* If the player is under level 40 or hasn't completed the second class transfer, the Territory Manager will send a different html.
* Added level 75 missing check.
* Reworked the way item Ids and territory Ids are generated, bypass won't be exploited.
* Implementing AbstractNpcAI by UnAfraid and me.
* Sets a new standard to make NPC AIs, outside the core.
* Extends L2Script, you can use Listeners!
* Keeps the script and the htmls together, easy to modify and easy to disable/enable.
* Features removed in upcoming versions, could be retained as L2J customs.

Zoey76 12 年之前
父节点
当前提交
09a69e3d5a
共有 88 个文件被更改,包括 496 次插入307 次删除
  1. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-10.htm
  2. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-2.htm
  3. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-4.htm
  4. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-6.htm
  5. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-7.htm
  6. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490.htm
  7. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-1.htm
  8. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-10.htm
  9. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-2.htm
  10. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-4.htm
  11. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-6.htm
  12. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-7.htm
  13. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491.htm
  14. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-1.htm
  15. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-10.htm
  16. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-2.htm
  17. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-6.htm
  18. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-7.htm
  19. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492.htm
  20. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-1.htm
  21. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-10.htm
  22. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-2.htm
  23. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-4.htm
  24. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-6.htm
  25. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-7.htm
  26. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493.htm
  27. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-1.htm
  28. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-10.htm
  29. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-2.htm
  30. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-4.htm
  31. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-6.htm
  32. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-7.htm
  33. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494.htm
  34. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-1.htm
  35. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-10.htm
  36. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-2.htm
  37. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-4.htm
  38. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-6.htm
  39. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-7.htm
  40. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495.htm
  41. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-1.htm
  42. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-10.htm
  43. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-2.htm
  44. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-4.htm
  45. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-6.htm
  46. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-7.htm
  47. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496.htm
  48. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-1.htm
  49. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-10.htm
  50. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-2.htm
  51. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-4.htm
  52. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-6.htm
  53. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-7.htm
  54. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497.htm
  55. 0 3
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-1.htm
  56. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-10.htm
  57. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-2.htm
  58. 0 2
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-4.htm
  59. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-6.htm
  60. 0 1
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-7.htm
  61. 0 10
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498.htm
  62. 0 7
      L2J_DataPack_BETA/dist/game/data/html/mercmanager/nobless.htm
  63. 3 2
      L2J_DataPack_BETA/dist/game/data/scripts.cfg
  64. 40 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java
  65. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-02.html
  66. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-03.html
  67. 8 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-04.html
  68. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-05.html
  69. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-06.html
  70. 3 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-07.html
  71. 4 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-08.html
  72. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490.html
  73. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36491.html
  74. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36492.html
  75. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36493.html
  76. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36494.html
  77. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36495.html
  78. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36496.html
  79. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36497.html
  80. 10 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36498.html
  81. 316 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/TerritoryManagers.java
  82. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-0a.html
  83. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-0b.html
  84. 3 3
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-1.html
  85. 0 0
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-2.html
  86. 2 1
      L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-3.html
  87. 4 101
      L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/TerritoryWar.java
  88. 9 9
      L2J_DataPack_BETA/dist/sql/game/npc.sql

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13757 364900001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13757 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 81">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36491.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13758 364910001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13758 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 82">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13759 364920001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13759 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 83">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36493.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13760 364930001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13760 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 84">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36494.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13761 364940001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13761 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 85">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36495.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13762 364950001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13762 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 86">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36496.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13763 364960001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13763 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 87">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36497.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13764 364970001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13764 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 88">Quest</a>
-</center>
-</body></html>

+ 0 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-1.htm

@@ -1,3 +0,0 @@
-<html><body>
-You can obtain the badge by carrying out various missions assigned by the lord during a Territory War. You may access his orders through the Territory Managers or by participating in the Territory War.
-</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-10.htm

@@ -1,2 +0,0 @@
-<html><body>Do you know what goes on during a battle?<br>
-If weren't already engaged, I'd jump at the chance to make some money...er, I mean fight the enemy! Heh...</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-2.htm

@@ -1,2 +0,0 @@
-<html><body>You require more training.<br>
-(You must have completed your 2nd class change and be at least level 40.)</body></html>

+ 0 - 2
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-4.htm

@@ -1,2 +0,0 @@
-<html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-6.htm

@@ -1 +0,0 @@
-<html><body>You do not have enough badges yet to be recognized for your activities on behalf of the territory.</body></html>

+ 0 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498-7.htm

@@ -1 +0,0 @@
-<html><body>I will expect big things from you. Congratulations!</body></html>

+ 0 - 10
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36498.htm

@@ -1,10 +0,0 @@
-<html><body>
-I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
-<center>
-<a action="bypass -h npc_%objectId%_TW_Multisell 13765 364980001">Buy special products.</a><br>
-<a action="bypass -h npc_%objectId%_TW_Buy_List 13765 nobless.htm">Ask about the tasks.</a><br>
-<a action="bypass -h npc_%objectId%_Chat 1">Ask about becoming a Noblesse.</a><br>
-<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
-<a action="bypass -h npc_%objectId%_CalcRewards 89">Quest</a>
-</center>
-</body></html>

+ 0 - 7
L2J_DataPack_BETA/dist/game/data/html/mercmanager/nobless.htm

@@ -1,7 +0,0 @@
-<html><body>
-If you can prove you're qualified, I can personally appoint you as a Noblesse on the lord's behalf. 
-Bring me %noblessBadge% terrirory badges to prove your worth.<br><br>
-<a action="bypass -h npc_%objectId%_TW_Buy %itemId% %noblessBadge% 0" msg="2964">"I have all that you require. Please make me a Noblesse!"</a>
-<br>
-(Please note: doing this will cancel all Noblesse-related quests in your quest log.)
-</body></html>

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

@@ -5,11 +5,12 @@
 #
 # Note: You can also load an script during server runtime using the Admin Panel
 
-# AI Section
-
 # Load Handlers
 handlers/MasterHandler.java
 
+# AI Section
+
+ai/npc/TerritoryManagers/TerritoryManagers.java
 ai/fantasy_isle/MC_Show.java
 ai/fantasy_isle/HandysBlockCheckerEvent.java
 

+ 40 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/AbstractNpcAI.java

@@ -0,0 +1,40 @@
+/*
+ * 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 ai.npc;
+
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.scripting.scriptengine.impl.L2Script;
+
+/**
+ * Abstract NPC AI class for datapack based AIs.
+ * @author UnAfraid, Zoey76
+ */
+public abstract class AbstractNpcAI extends L2Script
+{
+	/**
+	 * Simple on first talk event handler.
+	 */
+	@Override
+	public String onFirstTalk(L2Npc npc, L2PcInstance player)
+	{
+		return npc.getNpcId() + ".html";
+	}
+	
+	public AbstractNpcAI(String name, String descr)
+	{
+		super(-1, name, descr);
+	}
+}

+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-02.html

@@ -0,0 +1,8 @@
+<html><body>
+We all want peace and prosperity... But if you want to be able to purchase special products or advance to higher positions, you must first do something of merit for this territory. Show me your badge and I'll show you as many special products as you want!<br>
+<center>
+<br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Ask about badges.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36490-1.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-03.html


+ 8 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-04.html

@@ -0,0 +1,8 @@
+<html><body>Territory Manager:<br>
+If you can prove you're qualified, I can personally appoint you as a Noblesse on the lord's behalf. Bring me %badge% territory badges to prove your worth.<br>
+<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers MakeMeNoble" msg="2964">"I have all that you require. Please make me a Noblesse!"</a><br>
+(Please note: doing this will cancel all Noblesse-related quests in your quest log.)
+</center>
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-05.html

@@ -0,0 +1,3 @@
+<html><body>
+Aren't you already Noblesse? Is your strength simply a charade?
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-06.html

@@ -0,0 +1,3 @@
+<html><body>
+In order to be recognized as Noblesse, you must be level 75 or higher.
+</body></html>

+ 3 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-07.html

@@ -0,0 +1,3 @@
+<html><body>
+Congratulations! You are now a mighty Noble. Act honorably and win fame and glory for yourself!
+</body></html>

+ 4 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490-08.html

@@ -0,0 +1,4 @@
+<html><body>
+You require more training.<br>
+(You must have completed your 2nd class transfer and be at least level 40.)
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36490.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the fortress's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36491.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36492.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36493.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36494.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36495.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36496.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36497.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 10 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/36498.html

@@ -0,0 +1,10 @@
+<html><body>Territory Manager:<br>
+I'm a merchant dispatched by the lord in order to announce his intentions and distribute special products to his subjects. I'm also in charge of assigning tasks for certain positions.<br>
+<center>
+<a action="bypass -h Quest TerritoryManagers BuyProducts">Buy special products.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-04.html">Make me a Noblesse.</a><br>
+<a action="bypass -h Quest TerritoryManagers 36490-03.html">Tell me about badges.</a><br>
+<a action="bypass -h npc_%objectId%_TerritoryStatus">Ask about the territory's current status.</a><br>
+<a action="bypass -h Quest TerritoryManagers CalcRewards">Quest</a>
+</center>
+</body></html>

+ 316 - 0
L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/TerritoryManagers.java

@@ -0,0 +1,316 @@
+/*
+ * 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 ai.npc.TerritoryManagers;
+
+import ai.npc.AbstractNpcAI;
+
+import com.l2jserver.gameserver.datatables.MultiSell;
+import com.l2jserver.gameserver.instancemanager.CastleManager;
+import com.l2jserver.gameserver.instancemanager.QuestManager;
+import com.l2jserver.gameserver.instancemanager.TerritoryWarManager;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.base.Race;
+import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
+import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
+import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
+import com.l2jserver.gameserver.network.serverpackets.UserInfo;
+
+/**
+ * Retail AI for Territory Managers.
+ * @author Zoey76
+ * @version 1.0b
+ */
+public class TerritoryManagers extends AbstractNpcAI
+{
+	private static final int[] preciousSoul1ItemIds =
+	{
+		7587,
+		7588,
+		7589,
+		7597,
+		7598,
+		7599
+	};
+	private static final int[] preciousSoul2ItemIds =
+	{
+		7595
+	};
+	private static final int[] preciousSoul3ItemIds =
+	{
+		7678,
+		7591,
+		7592,
+		7593
+	};
+	
+	@Override
+	public String onFirstTalk(L2Npc npc, L2PcInstance player)
+	{
+		if ((player.getClassId().level() < 2) || (player.getLevel() < 40))
+		{
+			// If the player does not have the second class transfer or is under level 40, it cannot continue.
+			return "36490-08.html";
+		}
+		return npc.getNpcId() + ".html";
+	}
+	
+	@Override
+	public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+	{
+		String htmltext = null;
+		final int npcId = npc.getNpcId();
+		final int itemId = 13757 + (npcId - 36490);
+		final int territoryId = 81 + (npcId - 36490);
+		switch (event)
+		{
+			case "36490-04.html":
+			{
+				// L2J Custom for minimum badges required.
+				final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
+				html.setFile(player.getHtmlPrefix(), "data/scripts/ai/npc/TerritoryManagers/36490-04.html");
+				html.replace("%badge%", String.valueOf(TerritoryWarManager.MINTWBADGEFORNOBLESS));
+				player.sendPacket(html);
+				break;
+			}
+			case "BuyProducts":
+			{
+				if (player.getInventory().getItemByItemId(itemId) != null)
+				{
+					// If the player has at least one Territory Badges then show the multisell.
+					final int multiSellId = 364900001 + ((npcId - 36490) * 10000);
+					MultiSell.getInstance().separateAndSend(multiSellId, player, npc, false);
+				}
+				else
+				{
+					// If the player does not have Territory Badges, it cannot continue.
+					htmltext = "36490-02.html";
+				}
+				break;
+			}
+			case "MakeMeNoble":
+			{
+				if (player.getInventory().getInventoryItemCount(itemId, -1) < TerritoryWarManager.MINTWBADGEFORNOBLESS)
+				{
+					// If the player does not have enough Territory Badges, it cannot continue.
+					htmltext = "36490-02.html";
+				}
+				else if (player.isNoble())
+				{
+					// If the player is already Noblesse, it cannot continue.
+					htmltext = "36490-05.html";
+				}
+				else if (player.getLevel() < 75)
+				{
+					// If the player is not level 75 or greater, it cannot continue.
+					htmltext = "36490-06.html";
+				}
+				else
+				{
+					// Complete the Noblesse related quests.
+					// Possessor of a Precious Soul - 1 (241)
+					processNoblesseQuest(player, 241, preciousSoul1ItemIds);
+					// Possessor of a Precious Soul - 2 (242)
+					processNoblesseQuest(player, 242, preciousSoul2ItemIds);
+					// Possessor of a Precious Soul - 3 (246)
+					processNoblesseQuest(player, 246, preciousSoul3ItemIds);
+					// Possessor of a Precious Soul - 4 (247)
+					processNoblesseQuest(player, 247, null);
+					
+					// Take the Territory Badges.
+					player.destroyItemByItemId(event, itemId, TerritoryWarManager.MINTWBADGEFORNOBLESS, npc, true);
+					// Give Noblesse Tiara to the player.
+					player.addItem(event, 7694, 1, npc, true);
+					// Set Noblesse status to the player.
+					player.setNoble(true);
+					player.sendPacket(new UserInfo(player));
+					player.sendPacket(new ExBrExtraUserInfo(player));
+					// Complete the sub-class related quest.
+					// Complete quest Seeds of Chaos (236) for Kamael characters.
+					// Complete quest Mimir's Elixir (235) for other races characters.
+					final Quest q = QuestManager.getInstance().getQuest((player.getRace() == Race.Kamael) ? 236 : 235);
+					if (q != null)
+					{
+						QuestState qs = player.getQuestState(q.getName());
+						if (qs == null)
+						{
+							qs = q.newQuestState(player);
+							qs.setState(State.STARTED);
+						}
+						// Completes the quest.
+						qs.exitQuest(false);
+					}
+					// Remove the following items
+					// Caradine's Letter
+					deleteIfExist(player, 7678, event, npc);
+					// Caradine's Letter
+					deleteIfExist(player, 7679, event, npc);
+					// Star of Destiny
+					deleteIfExist(player, 5011, event, npc);
+					// Virgil's Letter
+					deleteIfExist(player, 1239, event, npc);
+					// Arkenia's Letter
+					deleteIfExist(player, 1246, event, npc);
+				}
+				break;
+			}
+			case "CalcRewards":
+			{
+				final int[] reward = TerritoryWarManager.getInstance().calcReward(player);
+				final NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
+				final String prefix = player.getHtmlPrefix();
+				if (TerritoryWarManager.getInstance().isTWInProgress() || (reward[0] == 0))
+				{
+					html.setFile(prefix, "data/scripts/ai/npc/TerritoryManagers/reward-0a.html");
+				}
+				else if (reward[0] != territoryId)
+				{
+					html.setFile(prefix, "data/scripts/ai/npc/TerritoryManagers/reward-0b.html");
+					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
+				}
+				else if (reward[1] == 0)
+				{
+					html.setFile(prefix, "data/scripts/ai/npc/TerritoryManagers/reward-0a.html");
+				}
+				else
+				{
+					html.setFile(prefix, "data/scripts/ai/npc/TerritoryManagers/reward-1.html");
+					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
+					html.replace("%badge%", String.valueOf(reward[1]));
+					html.replace("%adena%", String.valueOf(reward[1] * 5000));
+				}
+				html.replace("%territoryId%", String.valueOf(territoryId));
+				html.replace("%objectId%", String.valueOf(npc.getObjectId()));
+				player.sendPacket(html);
+				player.sendPacket(ActionFailed.STATIC_PACKET);
+				break;
+			}
+			case "ReceiveRewards":
+			{
+				int badgeId = 57;
+				if (TerritoryWarManager.getInstance().TERRITORY_ITEM_IDS.containsKey(territoryId))
+				{
+					badgeId = TerritoryWarManager.getInstance().TERRITORY_ITEM_IDS.get(territoryId);
+				}
+				int[] reward = TerritoryWarManager.getInstance().calcReward(player);
+				NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
+				if (TerritoryWarManager.getInstance().isTWInProgress() || (reward[0] == 0))
+				{
+					html.setFile(player.getHtmlPrefix(), "data/scripts/ai/npc/TerritoryManagers/reward-0a.html");
+				}
+				else if (reward[0] != territoryId)
+				{
+					html.setFile(player.getHtmlPrefix(), "data/scripts/ai/npc/TerritoryManagers/reward-0b.html");
+					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
+				}
+				else if (reward[1] == 0)
+				{
+					html.setFile(player.getHtmlPrefix(), "data/scripts/ai/npc/TerritoryManagers/reward-0a.html");
+				}
+				else
+				{
+					html.setFile(player.getHtmlPrefix(), "data/scripts/ai/npc/TerritoryManagers/reward-2.html");
+					player.addItem("ReceiveRewards", badgeId, reward[1], npc, true);
+					player.addAdena("ReceiveRewards", reward[1] * 5000, npc, true);
+					TerritoryWarManager.getInstance().resetReward(player);
+				}
+				
+				html.replace("%objectId%", String.valueOf(npc.getObjectId()));
+				player.sendPacket(html);
+				player.sendPacket(ActionFailed.STATIC_PACKET);
+				break;
+			}
+			default:
+			{
+				htmltext = event;
+				break;
+			}
+		}
+		return htmltext;
+	}
+	
+	/**
+	 * Complete the following quests and delete its quest specific items.
+	 * @param player the active player that will be processed
+	 * @param questId the quest Id of the quest that will be processed
+	 * @param itemIds the item Ids should be deleted
+	 */
+	private static void processNoblesseQuest(L2PcInstance player, int questId, int[] itemIds)
+	{
+		final Quest q = QuestManager.getInstance().getQuest(questId);
+		if (q == null)
+		{
+			return;
+		}
+		
+		QuestState qs = player.getQuestState(q.getName());
+		if (qs == null)
+		{
+			qs = q.newQuestState(player);
+			qs.setState(State.STARTED);
+		}
+		
+		if (!qs.isCompleted())
+		{
+			// Take the quest specific items.
+			if (itemIds != null)
+			{
+				for (int itemId : itemIds)
+				{
+					qs.takeItems(itemId, -1);
+				}
+			}
+			// Completes the quest.
+			qs.exitQuest(false);
+		}
+	}
+	
+	/**
+	 * Deletes the item if exists.
+	 * @param player the player owner of the item that must be deleted
+	 * @param itemId the item Id of the item that must be deleted
+	 * @param event the event leading to this deletion
+	 * @param npc the npc referencing this deletion
+	 */
+	private static void deleteIfExist(L2PcInstance player, int itemId, String event, L2Npc npc)
+	{
+		final L2ItemInstance item = player.getInventory().getItemByItemId(itemId);
+		if (item != null)
+		{
+			player.destroyItem(event, item, npc, true);
+		}
+	}
+	
+	public TerritoryManagers()
+	{
+		super(TerritoryManagers.class.getSimpleName(), "ai/npc/");
+		
+		for (int i = 0; i < 9; i++)
+		{
+			addFirstTalkId(36490 + i);
+			addTalkId(36490 + i);
+			addStartNpc(36490 + i);
+		}
+	}
+	
+	public static void main(String[] args)
+	{
+		new TerritoryManagers();
+	}
+}

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/html/mercmanager/reward-0a.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-0a.html


+ 0 - 0
L2J_DataPack_BETA/dist/game/data/html/mercmanager/reward-0b.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-0b.html


+ 3 - 3
L2J_DataPack_BETA/dist/game/data/html/mercmanager/reward-1.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-1.html

@@ -1,6 +1,6 @@
 <html><body>Territory Manager:<br>
 Thank you for your service to %castle% Territory during the recent war. For your efforts, I can reward you with %badge% numbers of Territory Badge and %adena% Adena.<br>
-If you continue your efforts on our behalf, I'll make sure you recive more in the future. What would you like to do?<br>
-<a action="bypass -h npc_%objectId%_Chat 4">Receive the reward later.</a><br>
-<a action="bypass -h npc_%objectId%_ReceiveRewards %territoryId%">Receive the reward now.</a>
+If you continue your efforts on our behalf, I'll make sure you receive more in the future. What would you like to do?<br>
+<a action="bypass -h Quest TerritoryManagers reward-3.html">Receive the reward later.</a><br>
+<a action="bypass -h Quest TerritoryManagers ReceiveRewards">Receive the reward now.</a>
 </body></html>

+ 0 - 0
L2J_DataPack_BETA/dist/game/data/html/mercmanager/reward-2.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-2.html


+ 2 - 1
L2J_DataPack_BETA/dist/game/data/html/mercmanager/36492-4.htm → L2J_DataPack_BETA/dist/game/data/scripts/ai/npc/TerritoryManagers/reward-3.html

@@ -1,2 +1,3 @@
 <html><body>Territory Manager:<br>
-If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!</body></html>
+If you go to another territory, all of your accomplishments here will vanish. Please do not forget. I hope to see you in our service again. Farewell!
+</body></html>

+ 4 - 101
L2J_DataPack_BETA/dist/game/data/scripts/handlers/bypasshandlers/TerritoryWar.java

@@ -19,29 +19,23 @@ import java.util.logging.Level;
 
 import com.l2jserver.gameserver.datatables.MultiSell;
 import com.l2jserver.gameserver.handler.IBypassHandler;
-import com.l2jserver.gameserver.instancemanager.CastleManager;
 import com.l2jserver.gameserver.instancemanager.TerritoryWarManager;
 import com.l2jserver.gameserver.model.actor.L2Character;
 import com.l2jserver.gameserver.model.actor.L2Npc;
 import com.l2jserver.gameserver.model.actor.instance.L2MercenaryManagerInstance;
 import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
 import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
-import com.l2jserver.gameserver.network.serverpackets.ExBrExtraUserInfo;
 import com.l2jserver.gameserver.network.serverpackets.ExShowDominionRegistry;
 import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
-import com.l2jserver.gameserver.network.serverpackets.UserInfo;
 
 public class TerritoryWar implements IBypassHandler
 {
 	private static final String[] COMMANDS =
 	{
-		"Territory", 
-		"TW_Multisell", 
+		"Territory",
 		"TW_Buy_List",
-		"TW_Buy", 
-		"TW_Buy_Elite", 
-		"CalcRewards", 
-		"ReceiveRewards"
+		"TW_Buy",
+		"TW_Buy_Elite"
 	};
 	
 	@Override
@@ -73,23 +67,7 @@ public class TerritoryWar implements IBypassHandler
 			}
 			
 			L2MercenaryManagerInstance mercman = ((L2MercenaryManagerInstance) target);
-			if (actualCommand.equalsIgnoreCase("TW_Multisell"))
-			{
-				if (st.countTokens() < 1)
-				{
-					return false;
-				}
-				int territoryItemId = Integer.parseInt(st.nextToken());
-				if (activeChar.getInventory().getItemByItemId(territoryItemId) == null)
-				{
-					mercman.showChatWindow(activeChar, 1);
-					return true;
-				}
-				
-				int val = Integer.parseInt(st.nextToken());
-				MultiSell.getInstance().separateAndSend(val, activeChar, mercman, false);
-			}
-			else if (actualCommand.equalsIgnoreCase("TW_Buy_List"))
+			if (actualCommand.equalsIgnoreCase("TW_Buy_List"))
 			{
 				if (st.countTokens() < 1)
 				{
@@ -120,16 +98,6 @@ public class TerritoryWar implements IBypassHandler
 						int boughtId = 0;
 						switch (type)
 						{
-							case 0:
-								if (activeChar.isNoble())
-								{
-									return false;
-								}
-								boughtId = 7694;
-								activeChar.setNoble(true);
-								activeChar.sendPacket(new UserInfo(activeChar));
-								activeChar.sendPacket(new ExBrExtraUserInfo(activeChar));
-								break;
 							case 1:
 								boughtId = 4422;
 								break;
@@ -171,71 +139,6 @@ public class TerritoryWar implements IBypassHandler
 					activeChar.sendPacket(ActionFailed.STATIC_PACKET);
 				}
 			}
-			else if (actualCommand.equalsIgnoreCase("CalcRewards"))
-			{
-				int territoryId = Integer.parseInt(st.nextToken());
-				int[] reward = TerritoryWarManager.getInstance().calcReward(activeChar);
-				NpcHtmlMessage html = new NpcHtmlMessage(mercman.getObjectId());
-				if (TerritoryWarManager.getInstance().isTWInProgress() || (reward[0] == 0))
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
-				}
-				else if (reward[0] != territoryId)
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0b.htm");
-					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
-				}
-				else if (reward[1] == 0)
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
-				}
-				else
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-1.htm");
-					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
-					html.replace("%badge%", String.valueOf(reward[1]));
-					html.replace("%adena%", String.valueOf(reward[1] * 5000));
-				}
-				html.replace("%territoryId%", String.valueOf(territoryId));
-				html.replace("%objectId%", String.valueOf(mercman.getObjectId()));
-				activeChar.sendPacket(html);
-				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
-			}
-			else if (actualCommand.equalsIgnoreCase("ReceiveRewards"))
-			{
-				int territoryId = Integer.parseInt(st.nextToken());
-				int badgeId = 57;
-				if (TerritoryWarManager.getInstance().TERRITORY_ITEM_IDS.containsKey(territoryId))
-				{
-					badgeId = TerritoryWarManager.getInstance().TERRITORY_ITEM_IDS.get(territoryId);
-				}
-				int[] reward = TerritoryWarManager.getInstance().calcReward(activeChar);
-				NpcHtmlMessage html = new NpcHtmlMessage(mercman.getObjectId());
-				if (TerritoryWarManager.getInstance().isTWInProgress() || (reward[0] == 0))
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
-				}
-				else if (reward[0] != territoryId)
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0b.htm");
-					html.replace("%castle%", CastleManager.getInstance().getCastleById(reward[0] - 80).getName());
-				}
-				else if (reward[1] == 0)
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-0a.htm");
-				}
-				else
-				{
-					html.setFile(activeChar.getHtmlPrefix(), "data/html/mercmanager/reward-2.htm");
-					activeChar.addItem("QUEST", badgeId, reward[1], mercman, true);
-					activeChar.addAdena("QUEST", reward[1] * 5000, mercman, true);
-					TerritoryWarManager.getInstance().resetReward(activeChar);
-				}
-				
-				html.replace("%objectId%", String.valueOf(mercman.getObjectId()));
-				activeChar.sendPacket(html);
-				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
-			}
 			return true;
 		}
 		catch (Exception e)

+ 9 - 9
L2J_DataPack_BETA/dist/sql/game/npc.sql

@@ -10404,15 +10404,15 @@ INSERT INTO `npc` VALUES
 (36487, 36487, "Mercenary Captain", 0, "Goddard", 0, "LineageMonster3.Kight_of_Dawn", 12, 24.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 2500, 6377, 0, 36.48, 160, 0, 1), 
 (36488, 36488, "Mercenary Captain", 0, "Rune", 0, "LineageMonster3.Kight_of_Dawn", 12, 24.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 2500, 6377, 0, 36.48, 160, 0, 1), 
 (36489, 36489, "Mercenary Captain", 0, "Schuttgart", 0, "LineageMonster3.Kight_of_Dawn", 12, 24.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 2500, 6377, 0, 36.48, 160, 0, 1), 
-(36490, 36490, "Territory Manager", 0, "Gludio", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36491, 36491, "Territory Manager", 0, "Dion", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36492, 36492, "Territory Manager", 0, "Giran", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36493, 36493, "Territory Manager", 0, "Oren", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36494, 36494, "Territory Manager", 0, "Aden", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36495, 36495, "Territory Manager", 0, "Innadril", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36496, 36496, "Territory Manager", 0, "Goddard", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36497, 36497, "Territory Manager", 0, "Rune", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
-(36498, 36498, "Territory Manager", 0, "Schuttgart", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2MercenaryManager", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36490, 36490, "Territory Manager", 0, "Gludio", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36491, 36491, "Territory Manager", 0, "Dion", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36492, 36492, "Territory Manager", 0, "Giran", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36493, 36493, "Territory Manager", 0, "Oren", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36494, 36494, "Territory Manager", 0, "Aden", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36495, 36495, "Territory Manager", 0, "Innadril", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36496, 36496, "Territory Manager", 0, "Goddard", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36497, 36497, "Territory Manager", 0, "Rune", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
+(36498, 36498, "Territory Manager", 0, "Schuttgart", 0, "LineageNPC2.feudal_custodian", 10, 22.5, 70, "male", "L2Npc", 40, 2444.46819, 1345.8, 7.5, 2.7, 40, 43, 30, 21, 20, 20, 0, 0, 688.86373, 295.91597, 470.40463, 216.53847, 253, 4, 333, 0, 0, 0, 50, 120, 0, 1), 
 (36499, 36499, "Territory Catapult", 0, "Gludio", 0, "LineageNpcEV.ballista", 112, 59, 80, "male", "L2Monster", 40, 3290.113069, 1674.8, 8.5, 3, 40, 43, 30, 21, 20, 20, 0, 0, 970.53755, 341.375, 662.75133, 249.80341, 253, 4, 333, 0, 0, 0, 1, 1, 0, 1), 
 (36500, 36500, "Territory Catapult", 0, "Dion", 0, "LineageNpcEV.ballista", 112, 59, 80, "male", "L2Monster", 40, 3290.113069, 1674.8, 8.5, 3, 40, 43, 30, 21, 20, 20, 0, 0, 970.53755, 341.375, 662.75133, 249.80341, 253, 4, 333, 0, 0, 0, 1, 1, 0, 1), 
 (36501, 36501, "Territory Catapult", 0, "Giran", 0, "LineageNpcEV.ballista", 112, 59, 80, "male", "L2Monster", 40, 3290.113069, 1674.8, 8.5, 3, 40, 43, 30, 21, 20, 20, 0, 0, 970.53755, 341.375, 662.75133, 249.80341, 253, 4, 333, 0, 0, 0, 1, 1, 0, 1),