CostyKiller

Updated Atelia Refinery Ai's

Apr 7th, 2021 (edited)
585
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 18.41 KB | None | 0 0
  1. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/34441-00.html
  2. ===================================================================
  3. --- dist/game/data/scripts/ai/areas/AteliaRefinery/34441-00.html    (nonexistent)
  4. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/34441-00.html    (working copy)
  5. @@ -0,0 +1,15 @@
  6. +<html><body>Atelia Refinery Teleport Device:<br>
  7. +A device for teleporting to Atelia Refinery settled by the Blackbird Clan.<br>
  8. +Choose your destination.<br><br>
  9. +<center>Places:<br>
  10. +Inward of Atelia Refinery,<br>
  11. +Atelia Outlet,<br>
  12. +the area controlled by Death Pondus,<br>
  13. +the area controlled by Devil Varos,<br>
  14. +the area controlled by Demonic Weiss.<br>
  15. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery entrance">Teleport to the Atelia Refinery</Button>
  16. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery outlet">Teleport to the Atelia Outlet</Button>
  17. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery first_area">Teleport to the area controlled by Demonic Pontus</Button>
  18. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery second_area">Teleport to the area controlled by Devil Varos</Button>
  19. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery third_area">Teleport to the area controlled by Demonic Weiss</Button>
  20. +</body></html>
  21. \ No newline at end of file
  22. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/34441.html
  23. ===================================================================
  24. --- dist/game/data/scripts/ai/areas/AteliaRefinery/34441.html   (revision 8538)
  25. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/34441.html   (working copy)
  26. @@ -7,7 +7,6 @@
  27.  the area controlled by Devil Varos,<br>
  28.  the area controlled by Demonic Weiss.<br>
  29.  <Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery entrance">Teleport to the Atelia Refinery</Button>
  30. -<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery outlet">Teleport to the Atelia Outlet</Button>
  31.  <Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery first_area">Teleport to the area controlled by Demonic Pontus</Button>
  32.  <Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery second_area">Teleport to the area controlled by Devil Varos</Button>
  33.  <Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest AteliaRefinery third_area">Teleport to the area controlled by Demonic Weiss</Button>
  34. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/AteliaRefinery.java
  35. ===================================================================
  36. --- dist/game/data/scripts/ai/areas/AteliaRefinery/AteliaRefinery.java  (revision 8538)
  37. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/AteliaRefinery.java  (working copy)
  38. @@ -19,6 +19,7 @@
  39.  import org.l2jmobius.gameserver.model.Location;
  40.  import org.l2jmobius.gameserver.model.actor.Npc;
  41.  import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  42. +import org.l2jmobius.gameserver.model.quest.QuestState;
  43.  
  44.  import ai.AbstractNpcAI;
  45.  
  46. @@ -32,6 +33,7 @@
  47.     // Teleport Locations
  48.     private static final Location[] TELE_LOCATIONS =
  49.     {
  50. +       new Location(-251728, 178576, -8928), // Atelia Outlet
  51.         new Location(-59493, 52620, -8610), // Entrance
  52.         new Location(-56096, 49688, -8729), // First Area
  53.         new Location(-56160, 45406, -8847), // Second Area
  54. @@ -76,30 +78,36 @@
  55.         String htmltext = null;
  56.         switch (event)
  57.         {
  58. -           case "entrance":
  59. +           case "outlet":
  60.             {
  61.                 player.teleToLocation(TELE_LOCATIONS[0]);
  62.                 htmltext = "34441-01.html";
  63.                 break;
  64.             }
  65. -           case "first_area":
  66. +           case "entrance":
  67.             {
  68.                 player.teleToLocation(TELE_LOCATIONS[1]);
  69.                 htmltext = "34441-01.html";
  70.                 break;
  71.             }
  72. -           case "second_area":
  73. +           case "first_area":
  74.             {
  75.                 player.teleToLocation(TELE_LOCATIONS[2]);
  76.                 htmltext = "34441-01.html";
  77.                 break;
  78.             }
  79. -           case "third_area":
  80. +           case "second_area":
  81.             {
  82.                 player.teleToLocation(TELE_LOCATIONS[3]);
  83.                 htmltext = "34441-01.html";
  84.                 break;
  85.             }
  86. +           case "third_area":
  87. +           {
  88. +               player.teleToLocation(TELE_LOCATIONS[4]);
  89. +               htmltext = "34441-01.html";
  90. +               break;
  91. +           }
  92.         }
  93.         return htmltext;
  94.     }
  95. @@ -123,6 +131,22 @@
  96.         return super.onKill(npc, killer, isSummon);
  97.     }
  98.    
  99. +   @Override
  100. +   public String onFirstTalk(Npc npc, PlayerInstance player)
  101. +   {
  102. +       final QuestState qs = player.getQuestState("Q10890_SaviorsPathHallOfEtina");
  103. +       String htmltext = null;
  104. +       if (((qs != null) && qs.isCompleted()))
  105. +       {
  106. +           htmltext = "34441-00.html";
  107. +       }
  108. +       else
  109. +       {
  110. +           htmltext = "34441.html";
  111. +       }
  112. +       return htmltext;
  113. +   }
  114. +  
  115.     public static void main(String[] args)
  116.     {
  117.         new AteliaRefinery();
  118. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-0.html
  119. ===================================================================
  120. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-0.html   (nonexistent)
  121. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-0.html   (working copy)
  122. @@ -0,0 +1,7 @@
  123. +<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  124. +Thank you. Without your help, we couldn't have won easily.<br>
  125. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Leona teleport"><font color="LEVEL">"I want to go to Etis Van Etina."</font></Button>
  126. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest EtisVanEtinaSolo enterInstance"><font color="LEVEL">"I want to go to Etis Van Etina."(Solo)</font></Button>
  127. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Leona tp_inner"><font color="LEVEL">"I want to go inside Atelia Refinery."</font></Button>
  128. +<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
  129. +</body></html>
  130. \ No newline at end of file
  131. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-1.html
  132. ===================================================================
  133. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-1.html   (nonexistent)
  134. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-1.html   (working copy)
  135. @@ -0,0 +1,4 @@
  136. +<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  137. +On the Etis van Etina there is an attack!<br>
  138. +At this time it's impossible to enter the temple.
  139. +</body></html>
  140. \ No newline at end of file
  141. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-2.html
  142. ===================================================================
  143. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-2.html   (nonexistent)
  144. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-2.html   (working copy)
  145. @@ -0,0 +1,4 @@
  146. +<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  147. +Etis van Etina? You're too late, friend.<br>
  148. +A group of warriors drove him off not long ago.
  149. +</body></html>
  150. \ No newline at end of file
  151. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-3.html
  152. ===================================================================
  153. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-3.html   (nonexistent)
  154. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-3.html   (working copy)
  155. @@ -0,0 +1,4 @@
  156. +<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  157. +You are overcome by a voice, a voice so powerful you are helpless as it speaks:<br>
  158. +(The players who belong to an association can only enter through the Association Leader.)
  159. +</body></html>
  160. \ No newline at end of file
  161. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-4.html
  162. ===================================================================
  163. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-4.html   (nonexistent)
  164. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-4.html   (working copy)
  165. @@ -0,0 +1,3 @@
  166. +<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  167. +(A command channel needs at least minimum: <font color="LEVEL">%min%</font> and maximum: <font color="LEVEL">%max%</font> members to challenge Etis van Etina.)
  168. +</body></html>
  169. \ No newline at end of file
  170. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-5.html
  171. ===================================================================
  172. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-5.html   (nonexistent)
  173. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426-5.html   (working copy)
  174. @@ -0,0 +1,3 @@
  175. +<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  176. +(A command channel members level must be minimum: <font color="LEVEL">%minLevel% Lvl</font> or higher to challenge Etis van Etina.)
  177. +</body></html>
  178. \ No newline at end of file
  179. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426.html
  180. ===================================================================
  181. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426.html (nonexistent)
  182. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34426.html (working copy)
  183. @@ -0,0 +1,5 @@
  184. +<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  185. +Thank you. Without your help, we couldn't have won easily.<br>
  186. +<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Leona tp_inner"><font color="LEVEL">"I want to go inside Atelia Refinery."</font></Button>
  187. +<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
  188. +</body></html>
  189. \ No newline at end of file
  190. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-1.html
  191. ===================================================================
  192. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-1.html   (revision 8538)
  193. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-1.html   (nonexistent)
  194. @@ -1,4 +0,0 @@
  195. -<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  196. -On the Etis van Etina there is an attack!<br>
  197. -At this time it's impossible to enter the temple.
  198. -</body></html>
  199. \ No newline at end of file
  200. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-2.html
  201. ===================================================================
  202. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-2.html   (revision 8538)
  203. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-2.html   (nonexistent)
  204. @@ -1,4 +0,0 @@
  205. -<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  206. -Etis van Etina? You're too late, friend.<br>
  207. -A group of warriors drove him off not long ago.
  208. -</body></html>
  209. \ No newline at end of file
  210. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-3.html
  211. ===================================================================
  212. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-3.html   (revision 8538)
  213. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-3.html   (nonexistent)
  214. @@ -1,4 +0,0 @@
  215. -<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  216. -You are overcome by a voice, a voice so powerful you are helpless as it speaks:<br>
  217. -(The players who belong to an association can only enter through the Association Leader.)
  218. -</body></html>
  219. \ No newline at end of file
  220. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-4.html
  221. ===================================================================
  222. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-4.html   (revision 8538)
  223. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-4.html   (nonexistent)
  224. @@ -1,3 +0,0 @@
  225. -<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  226. -(A command channel needs at least minimum: <font color="LEVEL">%min%</font> and maximum: <font color="LEVEL">%max%</font> members to challenge Etis van Etina.)
  227. -</body></html>
  228. \ No newline at end of file
  229. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-5.html
  230. ===================================================================
  231. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-5.html   (revision 8538)
  232. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-5.html   (nonexistent)
  233. @@ -1,3 +0,0 @@
  234. -<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  235. -(A command channel members level must be minimum: <font color="LEVEL">%minLevel% Lvl</font> or higher to challenge Etis van Etina.)
  236. -</body></html>
  237. \ No newline at end of file
  238. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-6.html
  239. ===================================================================
  240. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-6.html   (revision 8538)
  241. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504-6.html   (nonexistent)
  242. @@ -1,3 +0,0 @@
  243. -<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  244. -(You can't go on Etina's Instance solo right now.)
  245. -</body></html>
  246. \ No newline at end of file
  247. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504.html
  248. ===================================================================
  249. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504.html (revision 8538)
  250. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/34504.html (nonexistent)
  251. @@ -1,7 +0,0 @@
  252. -<html><body>Blackbird Clan Lord Leona Blackbird:<br>
  253. -Thank you. Without your help, we couldn't have won easily.<br>
  254. -<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Leona teleport"><font color="LEVEL">"I want to go to Etis Van Etina."</font></Button>
  255. -<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h npc_%objectId%_Chat 6"><font color="LEVEL">"I want to go to Etis Van Etina."(Solo)</font></Button>
  256. -<Button ALIGN=LEFT ICON="TELEPORT" action="bypass -h Quest Leona tp_inner"><font color="LEVEL">"I want to go inside Atelia Refinery."</font></Button>
  257. -<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
  258. -</body></html>
  259. \ No newline at end of file
  260. Index: dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/Leona.java
  261. ===================================================================
  262. --- dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/Leona.java (revision 8538)
  263. +++ dist/game/data/scripts/ai/areas/AteliaRefinery/Leona/Leona.java (working copy)
  264. @@ -24,6 +24,7 @@
  265.  import org.l2jmobius.gameserver.model.Party;
  266.  import org.l2jmobius.gameserver.model.actor.Npc;
  267.  import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  268. +import org.l2jmobius.gameserver.model.quest.QuestState;
  269.  import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
  270.  
  271.  import ai.AbstractNpcAI;
  272. @@ -34,7 +35,7 @@
  273.  public class Leona extends AbstractNpcAI
  274.  {
  275.     // NPCs
  276. -   private static final int LEONA = 34504;
  277. +   private static final int LEONA = 34426;
  278.     private static final int ETINA_RAID = 29318;
  279.     // Location
  280.     private static final Location ENTER_LOC = new Location(-245778, 181088, 2860);
  281. @@ -61,15 +62,15 @@
  282.             {
  283.                 if (status == 1)
  284.                 {
  285. -                   return "34504-1.html";
  286. +                   return "34426-1.html";
  287.                 }
  288.                 if (status == 2)
  289.                 {
  290. -                   return "34504-2.html";
  291. +                   return "34426-2.html";
  292.                 }
  293.                 if (!player.isInParty())
  294.                 {
  295. -                   return "34504-3.html";
  296. +                   return "34426-3.html";
  297.                 }
  298.                 final Party party = player.getParty();
  299.                 final boolean isInCC = party.isInCommandChannel();
  300. @@ -77,12 +78,12 @@
  301.                 final boolean isPartyLeader = (isInCC) ? party.getCommandChannel().isLeader(player) : party.isLeader(player);
  302.                 if (!isPartyLeader)
  303.                 {
  304. -                   return "34504-3.html";
  305. +                   return "34426-3.html";
  306.                 }
  307.                 if ((members.size() < Config.ETINA_MIN_PLAYERS) || (members.size() > Config.ETINA_MAX_PLAYERS))
  308.                 {
  309.                     final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
  310. -                   packet.setHtml(getHtm(player, "34504-4.html"));
  311. +                   packet.setHtml(getHtm(player, "34426-4.html"));
  312.                     packet.replace("%min%", Integer.toString(Config.ETINA_MIN_PLAYERS));
  313.                     packet.replace("%max%", Integer.toString(Config.ETINA_MAX_PLAYERS));
  314.                     player.sendPacket(packet);
  315. @@ -93,7 +94,7 @@
  316.                     if (member.getLevel() < Config.ETINA_MIN_PLAYER_LEVEL)
  317.                     {
  318.                         final NpcHtmlMessage packet = new NpcHtmlMessage(npc.getObjectId());
  319. -                       packet.setHtml(getHtm(player, "34504-5.html"));
  320. +                       packet.setHtml(getHtm(player, "34426-5.html"));
  321.                         packet.replace("%minlvl%", Integer.toString(Config.ETINA_MIN_PLAYER_LEVEL));
  322.                         player.sendPacket(packet);
  323.                         return null;
  324. @@ -119,7 +120,17 @@
  325.     @Override
  326.     public String onFirstTalk(Npc npc, PlayerInstance player)
  327.     {
  328. -       return "34504.html";
  329. +       final QuestState qs = player.getQuestState("Q10890_SaviorsPathHallOfEtina");
  330. +       String htmltext = null;
  331. +       if (((qs != null) && qs.isCompleted()))
  332. +       {
  333. +           htmltext = "34426-0.html";
  334. +       }
  335. +       else
  336. +       {
  337. +           htmltext = "34426.html";
  338. +       }
  339. +       return htmltext;
  340.     }
  341.    
  342.     public static void main(String[] args)
  343. Index: dist/game/data/spawns/DarkElf/AteliaRefinery.xml
  344. ===================================================================
  345. --- dist/game/data/spawns/DarkElf/AteliaRefinery.xml    (revision 8524)
  346. +++ dist/game/data/spawns/DarkElf/AteliaRefinery.xml    (working copy)
  347. @@ -3,7 +3,7 @@
  348.     <spawn name="AteliaRefinery">
  349.         <group>
  350.             <npc id="34473" x="-251896" y="178338" z="-8934" heading="527" respawnTime="60sec" /> <!-- Elikia -->
  351. -           <npc id="34504" x="-251722" y="178250" z="-8939" heading="16383" respawnTime="60sec" /> <!-- Leona Blackbird -->
  352. +           <npc id="34426" x="-251722" y="178250" z="-8939" heading="16383" respawnTime="60sec" /> <!-- Leona Blackbird -->
  353.             <npc id="34472" x="-251557" y="178337" z="-8934" heading="32767" respawnTime="60sec" /> <!-- Devianne -->
  354.             <npc id="34441" x="-51676" y="60086" z="-3358" heading="13828" respawnTime="60sec" /> <!-- Atelia Refinery Teleport Device -->
  355.             <npc id="34441" x="-59891" y="52625" z="-8606" heading="63477" respawnTime="60sec" /> <!-- Atelia Refinery Teleport Device -->
  356. @@ -11,7 +11,7 @@
  357.             <npc id="34425" x="-51803" y="60088" z="-3355" heading="15516" respawnTime="60sec" /> <!-- Leona Blackbird Blackbird Clan Lord -->
  358.             <npc id="34472" x="-251889" y="178337" z="-3355" heading="0" respawnTime="60sec" /> <!-- Devianne Truth Seeker (Inside) -->
  359.             <npc id="34473" x="-251557" y="178337" z="-3355" heading="32767" respawnTime="60sec" /> <!-- Elikia (Inside) -->
  360. -           <npc id="34504" x="-25722" y="178209" z="-8939" heading="15162" respawnTime="60sec" /> <!-- Leona Blackbird Blackbird Clan Lord (Inside)-->
  361. +           <npc id="34426" x="-25722" y="178209" z="-8939" heading="15162" respawnTime="60sec" /> <!-- Leona Blackbird Blackbird Clan Lord (Inside)-->
  362.             <npc id="24159" x="-55976" y="51464" z="-8728" heading="16383" respawnTime="60sec" /> <!-- Atelia Yuyurina -->
  363.             <npc id="24160" x="-56305" y="51139" z="-8728" heading="49412" respawnTime="60sec" /> <!-- Atelia Popobena -->
  364.             <npc id="24160" x="-56344" y="50744" z="-8728" heading="46564" respawnTime="60sec" /> <!-- Atelia Popobena -->
  365.  
Add Comment
Please, Sign In to add comment