Advertisement
CostyKiller

Roiental AI and spawn

Mar 12th, 2021
776
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 13.97 KB | None | 0 0
  1. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01.html
  2. ===================================================================
  3. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01.html  (nonexistent)
  4. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01.html  (working copy)
  5. @@ -0,0 +1,9 @@
  6. +<html><body>Roiental:<br>
  7. +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
  8. +If you want to challenge Goldberg, you need to be a member of a <font color="LEVEL">Lv. 7 clan</font>. To fight Mary Reed your clan needs to be at least <font color="LEVEL">Lv. 10</font>, while Tauti can only be confronted by a <font color="LEVEL">Lv. 13 clan</font>.<br>
  9. +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
  10. +So, what would you like?<br>
  11. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Roiental enterGoldberg">Go to Throne of Heroes - Goldberg</Button>
  12. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Roiental enterMaryReed">Go to Throne of Heroes - Mary Reed</Button>
  13. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Roiental enterTauti">Go to Throne of Heroes - Tauti</Button>
  14. +</body></html>
  15. \ No newline at end of file
  16. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01a.html
  17. ===================================================================
  18. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01a.html (nonexistent)
  19. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01a.html (working copy)
  20. @@ -0,0 +1,7 @@
  21. +<html><body>Roiental:<br>
  22. +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
  23. +If you want to challenge Goldberg, you need to be a member of a <font color="LEVEL">Lv. 7 clan</font>.<br>
  24. +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
  25. +So, would you like to enter?<br>
  26. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesGoldberg enterInstance">Yes go to Throne of Heroes - Goldberg</Button>
  27. +</body></html>
  28. \ No newline at end of file
  29. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01b.html
  30. ===================================================================
  31. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01b.html (nonexistent)
  32. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01b.html (working copy)
  33. @@ -0,0 +1,7 @@
  34. +<html><body>Roiental:<br>
  35. +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
  36. +If you want to challenge Mary Reed your clan needs to be at least <font color="LEVEL">Lv. 10</font>.<br>
  37. +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
  38. +So, would you like to enter?<br>
  39. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesMaryReed enterInstance">Yes go to Throne of Heroes - Mary Reed</Button>
  40. +</body></html>
  41. \ No newline at end of file
  42. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01c.html
  43. ===================================================================
  44. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01c.html (nonexistent)
  45. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-01c.html (working copy)
  46. @@ -0,0 +1,7 @@
  47. +<html><body>Roiental:<br>
  48. +Heroes whose strength grows day after day can put their abilities to the test and ascend the renovated Throne of Heroes.<br>
  49. +If you want to challenge Tauti, you need to be a member of a <font color="LEVEL">Lv. 13 clan</font>.<br>
  50. +The request to enter the Throne of Heroes can only be submitted by the clan leader of a clan member who has been granted the requisite authority.<br>
  51. +So, would you like to enter?<br>
  52. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesTauti enterInstance">Yes go to Throne of Heroes - Tauti</Button>
  53. +</body></html>
  54. \ No newline at end of file
  55. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02a.html
  56. ===================================================================
  57. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02a.html (nonexistent)
  58. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02a.html (working copy)
  59. @@ -0,0 +1,4 @@
  60. +<html><body>Roiental:<br>
  61. +Your party members are participating in battle. I'll move you to them.<br>
  62. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesGoldberg reenterInstance">"Thanks!"</Button>
  63. +</body></html>
  64. \ No newline at end of file
  65. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02b.html
  66. ===================================================================
  67. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02b.html (nonexistent)
  68. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02b.html (working copy)
  69. @@ -0,0 +1,4 @@
  70. +<html><body>Roiental:<br>
  71. +Your party members are participating in battle. I'll move you to them.<br>
  72. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesMaryReed reenterInstance">"Thanks!"</Button>
  73. +</body></html>
  74. \ No newline at end of file
  75. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02c.html
  76. ===================================================================
  77. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02c.html (nonexistent)
  78. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-02c.html (working copy)
  79. @@ -0,0 +1,4 @@
  80. +<html><body>Roiental:<br>
  81. +Your party members are participating in battle. I'll move you to them.<br>
  82. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest ThroneOfHeroesTauti reenterInstance">"Thanks!"</Button>
  83. +</body></html>
  84. \ No newline at end of file
  85. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03a.html
  86. ===================================================================
  87. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03a.html (nonexistent)
  88. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03a.html (working copy)
  89. @@ -0,0 +1,4 @@
  90. +<html><body>Roiental:<br>
  91. +You are not a clan member or your clan hasn't reached Lv. 7 yet.<br>
  92. +(The Throne of Heroes can only be ascended by members of a command channel from the same clan (4-100 participants). The clan must have reached Lv. 7.)
  93. +</body></html>
  94. \ No newline at end of file
  95. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03b.html
  96. ===================================================================
  97. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03b.html (nonexistent)
  98. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03b.html (working copy)
  99. @@ -0,0 +1,4 @@
  100. +<html><body>Roiental:<br>
  101. +You are not a clan member or your clan hasn't reached Lv. 10 yet.<br>
  102. +(The Throne of Heroes can only be ascended by members of a command channel from the same clan (4-100 participants). The clan must have reached Lv. 10.)
  103. +</body></html>
  104. \ No newline at end of file
  105. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03c.html
  106. ===================================================================
  107. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03c.html (nonexistent)
  108. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-03c.html (working copy)
  109. @@ -0,0 +1,4 @@
  110. +<html><body>Roiental:<br>
  111. +You are not a clan member or your clan hasn't reached Lv. 13 yet.<br>
  112. +(The Throne of Heroes can only be ascended by members of a command channel from the same clan (4-100 participants). The clan must have reached Lv. 13.)
  113. +</body></html>
  114. \ No newline at end of file
  115. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-AlreadyDone.html
  116. ===================================================================
  117. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-AlreadyDone.html (nonexistent)
  118. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-AlreadyDone.html (working copy)
  119. @@ -0,0 +1,3 @@
  120. +<html><body>Roiental:<br>
  121. +Your clan mates already challenged one of the Throne of Heroes raids today.<br>
  122. +</body></html>
  123. \ No newline at end of file
  124. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-NoLevel.html
  125. ===================================================================
  126. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-NoLevel.html (nonexistent)
  127. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental-NoLevel.html (working copy)
  128. @@ -0,0 +1,4 @@
  129. +<html><body>Roiental:<br>
  130. +You are not strong enough yet.<br>
  131. +(The Throne of Heroes can only be ascended by characters of level 110 or above.)
  132. +</body></html>
  133. \ No newline at end of file
  134. Index: dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental.java
  135. ===================================================================
  136. --- dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental.java (nonexistent)
  137. +++ dist/game/data/scripts/ai/areas/Rune/Roiental/Roiental.java (working copy)
  138. @@ -0,0 +1,142 @@
  139. +/*
  140. + * This file is part of the L2J Mobius project.
  141. + *
  142. + * This program is free software: you can redistribute it and/or modify
  143. + * it under the terms of the GNU General Public License as published by
  144. + * the Free Software Foundation, either version 3 of the License, or
  145. + * (at your option) any later version.
  146. + *
  147. + * This program is distributed in the hope that it will be useful,
  148. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  149. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  150. + * General Public License for more details.
  151. + *
  152. + * You should have received a copy of the GNU General Public License
  153. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  154. + */
  155. +package ai.areas.Rune.Roiental;
  156. +
  157. +import org.l2jmobius.gameserver.instancemanager.InstanceManager;
  158. +import org.l2jmobius.gameserver.model.actor.Npc;
  159. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  160. +import org.l2jmobius.gameserver.model.instancezone.Instance;
  161. +
  162. +import ai.AbstractNpcAI;
  163. +
  164. +/**
  165. + * Roiental AI.
  166. + * @author CostyKiller
  167. + */
  168. +public class Roiental extends AbstractNpcAI
  169. +{
  170. +   // NPCs
  171. +   private static final int ROIENTAL = 34571;
  172. +   // Misc
  173. +   private static final int TOH_GB_TEMPLATE_ID = 307; // Throne of Heroes - Goldberg
  174. +   private static final int TOH_MR_TEMPLATE_ID = 308; // Throne of Heroes - Mary Reed
  175. +   private static final int TOH_TA_TEMPLATE_ID = 309; // Throne of Heroes - Tauti
  176. +   private static final int MIN_LVL = 110;
  177. +   private static final int CLAN_MIN_LVL_GB = 7;
  178. +   private static final int CLAN_MIN_LVL_MR = 10;
  179. +   private static final int CLAN_MIN_LVL_TA = 13;
  180. +  
  181. +   private Roiental()
  182. +   {
  183. +       addStartNpc(ROIENTAL);
  184. +       addFirstTalkId(ROIENTAL);
  185. +       addTalkId(ROIENTAL);
  186. +   }
  187. +  
  188. +   @Override
  189. +   public String onAdvEvent(String event, Npc npc, PlayerInstance player)
  190. +   {
  191. +       String htmltext = null;
  192. +       if (event.equals("enterGoldberg"))
  193. +       {
  194. +           if (player.getLevel() < MIN_LVL)
  195. +           {
  196. +               htmltext = "Roiental-NoLevel.html";
  197. +           }
  198. +           else if ((player.getClan() == null) || (player.getClan().getLevel() < CLAN_MIN_LVL_GB))
  199. +           {
  200. +               htmltext = "Roiental-03a.html";
  201. +           }
  202. +           else if ((player.getClan() == null) || player.getClan().getVariables().hasVariable("TOH_DONE"))
  203. +           {
  204. +               htmltext = "Roiental-AlreadyDone.html";
  205. +           }
  206. +           else
  207. +           {
  208. +               htmltext = "Roiental-01a.html";
  209. +           }
  210. +       }
  211. +       if (event.equals("enterMaryReed"))
  212. +       {
  213. +           if (player.getLevel() < MIN_LVL)
  214. +           {
  215. +               htmltext = "Roiental-NoLevel.html";
  216. +           }
  217. +           else if ((player.getClan() == null) || (player.getClan().getLevel() < CLAN_MIN_LVL_MR))
  218. +           {
  219. +               htmltext = "Roiental-03b.html";
  220. +           }
  221. +           else if ((player.getClan() == null) || player.getClan().getVariables().hasVariable("TOH_DONE"))
  222. +           {
  223. +               htmltext = "Roiental-AlreadyDone.html";
  224. +           }
  225. +           else
  226. +           {
  227. +               htmltext = "Roiental-01b.html";
  228. +           }
  229. +       }
  230. +       if (event.equals("enterTauti"))
  231. +       {
  232. +           if (player.getLevel() < MIN_LVL)
  233. +           {
  234. +               htmltext = "Roiental-NoLevel.html";
  235. +           }
  236. +           else if ((player.getClan() == null) || (player.getClan().getLevel() < CLAN_MIN_LVL_TA))
  237. +           {
  238. +               htmltext = "Roiental-03c.html";
  239. +           }
  240. +           else if ((player.getClan() == null) || player.getClan().getVariables().hasVariable("TOH_DONE"))
  241. +           {
  242. +               htmltext = "Roiental-AlreadyDone.html";
  243. +           }
  244. +           else
  245. +           {
  246. +               htmltext = "Roiental-01c.html";
  247. +           }
  248. +       }
  249. +       return htmltext;
  250. +   }
  251. +  
  252. +   @Override
  253. +   public String onFirstTalk(Npc npc, PlayerInstance player)
  254. +   {
  255. +       String htmltext = null;
  256. +       final Instance instance = InstanceManager.getInstance().getPlayerInstance(player, false);
  257. +       if ((instance != null) && ((instance.getTemplateId() == TOH_GB_TEMPLATE_ID)))
  258. +       {
  259. +           htmltext = "Roiental-02a.html";
  260. +       }
  261. +       else if ((instance != null) && ((instance.getTemplateId() == TOH_MR_TEMPLATE_ID)))
  262. +       {
  263. +           htmltext = "Roiental-02b.html";
  264. +       }
  265. +       else if ((instance != null) && ((instance.getTemplateId() == TOH_TA_TEMPLATE_ID)))
  266. +       {
  267. +           htmltext = "Roiental-02c.html";
  268. +       }
  269. +       else
  270. +       {
  271. +           htmltext = "Roiental-01.html";
  272. +       }
  273. +       return htmltext;
  274. +   }
  275. +  
  276. +   public static void main(String[] args)
  277. +   {
  278. +       new Roiental();
  279. +   }
  280. +}
  281. \ No newline at end of file
  282. Index: dist/game/data/spawns/Rune/TownOfRune.xml
  283. ===================================================================
  284. --- dist/game/data/spawns/Rune/TownOfRune.xml   (revision 8419)
  285. +++ dist/game/data/spawns/Rune/TownOfRune.xml   (working copy)
  286. @@ -151,6 +151,7 @@
  287.             <npc id="30981" x="44040" y="-47336" z="-804" heading="16383" respawnTime="60sec" /> <!-- Dark Judge -->
  288.             <npc id="31126" x="43712" y="-47208" z="-802" heading="21220" respawnTime="60sec" /> <!-- Blacksmith of Mammon -->
  289.             <npc id="33737" x="43790" y="-47194" z="-802" heading="19739" respawnTime="60sec" /> <!-- Merchant of Mammon -->
  290. +           <npc id="34571" x="45432" y="-49880" z="-799" heading="23924" respawnTime="60sec" /> <!-- Roiental -->
  291.         </group>
  292.     </spawn>
  293.  </list>
  294. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement