CostyKiller

Exalted Npc AIs Only Diff

Oct 8th, 2020 (edited)
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 14.33 KB | None | 0 0
  1. Index: dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-02.html
  2. ===================================================================
  3. --- dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-02.html   (revision 7680)
  4. +++ dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-02.html   (working copy)
  5. @@ -1,4 +1,4 @@
  6. -<html><head><body>Black Marketeer of Mammon:<br>
  7. +<html><body>Black Marketeer of Mammon:<br>
  8.  <font color="FF0000">[Exchange failure]</font><br>
  9.  You've entered an invalid value. Please input a correct amount.<br>
  10.  <Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest BlackMarketeerOfMammon 31092-01.html">Back</Button>
  11. Index: dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-03.html
  12. ===================================================================
  13. --- dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-03.html   (revision 7680)
  14. +++ dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-03.html   (working copy)
  15. @@ -1,4 +1,4 @@
  16. -<html><head><body>Black Marketeer of Mammon:<br>
  17. +<html><body>Black Marketeer of Mammon:<br>
  18.  <font color="FF0000">[Exchange failure]</font><br>
  19.  You don't have enough of the item that you're trying to exchange.<br>
  20.  <Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest BlackMarketeerOfMammon 31092-01.html">Back</Button>
  21. Index: dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-05.html
  22. ===================================================================
  23. --- dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-05.html   (revision 7680)
  24. +++ dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092-05.html   (nonexistent)
  25. @@ -1,7 +0,0 @@
  26. -<html><body>Black Marketeer of Mammon:<br>
  27. -Do you have a <font color="LEVEL">Guard Agathion Fragment</font>? Then you've come to the right place. I use those fragments to create <font color="LEVEL">Agathion Charms containing the power of Masia's, Paulina's or Tersi's Guard</font>.<br>
  28. -Also, I make exchanges with <font color="LEVEL">Book of Growth: Guard Agathion</font> which helps with the growth of the Guard Agathion. You'll need <font color="LEVEL">Angel's Breath</font> to exchange and it's sold a Merchant of Mammon.<br>
  29. -<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 310922001">"Exchange for Guard Agathion Charm."</Button>
  30. -<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 310922002">"Exchange for Book of Growth: Guard Agathion"</Button>
  31. -<Button ALIGN=LEFT ICON="RETURN" action="bypass -h Quest BlackMarketeerOfMammon 31092.html">To the beginning.</Button>
  32. -</body></html>
  33. \ No newline at end of file
  34. Index: dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092.html
  35. ===================================================================
  36. --- dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092.html  (revision 7680)
  37. +++ dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/31092.html  (working copy)
  38. @@ -1,5 +1,8 @@
  39.  <html><body>Black Marketeer of Mammon:<br>
  40.  The LordHush!<br>
  41. -TraditioThe government is out to get me, so I am forced to do business in the shadows.<br>
  42. +The government is out to get me, so I am forced to do business in the shadows.<br>
  43.  <Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest BlackMarketeerOfMammon 31092-01.html">"I want to exchange Ancient Adena for Adena."</Button>
  44. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 31092001">"I want to upgrade Talisman of Protection."</Button>
  45. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 31092002">"I want to get a Citrine Pendant."</Button>
  46. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 31092003">"I want to get a Proof of Battle (ForHonor Quest)."</Button>
  47.  </body></html>
  48. \ No newline at end of file
  49. Index: dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java
  50. ===================================================================
  51. --- dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java (revision 7680)
  52. +++ dist/game/data/scripts/ai/others/BlackMarketeerOfMammon/BlackMarketeerOfMammon.java (working copy)
  53. @@ -45,7 +45,7 @@
  54.     public String onAdvEvent(String event, Npc npc, PlayerInstance player)
  55.     {
  56.         String htmltext = event;
  57. -       if (event.equals("31092-01.html") || event.equals("31092-05.html"))
  58. +       if (event.equals("31092-01.html"))
  59.         {
  60.             return event;
  61.         }
  62. Index: dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection-01.html
  63. ===================================================================
  64. --- dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection-01.html  (nonexistent)
  65. +++ dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection-01.html  (working copy)
  66. @@ -0,0 +1,3 @@
  67. +<html><body>Flag of Protection:<br>
  68. +(Only characters who are performing For Victory sub quest, from the Exalted, One Who Shatters the Limit quest may take the reward.)<br><br>
  69. +</body></html>
  70. \ No newline at end of file
  71. Index: dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection.html
  72. ===================================================================
  73. --- dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection.html (nonexistent)
  74. +++ dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection.html (working copy)
  75. @@ -0,0 +1,6 @@
  76. +<html><body>Flag of Protection:<br>
  77. +(It's a Flag of Protection with the symbol of the castle. It's the same as what Merlot mentioned)<br><br>
  78. +<center>
  79. +<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10825_ForVictory mark">"I'll take this."</Button>
  80. +</center>
  81. +</body></html>
  82. \ No newline at end of file
  83. Index: dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection.java
  84. ===================================================================
  85. --- dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection.java (nonexistent)
  86. +++ dist/game/data/scripts/ai/others/CastleFlagOfProtection/CastleFlagOfProtection.java (working copy)
  87. @@ -0,0 +1,67 @@
  88. +/*
  89. + * This file is part of the L2J Mobius project.
  90. + *
  91. + * This program is free software: you can redistribute it and/or modify
  92. + * it under the terms of the GNU General Public License as published by
  93. + * the Free Software Foundation, either version 3 of the License, or
  94. + * (at your option) any later version.
  95. + *
  96. + * This program is distributed in the hope that it will be useful,
  97. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  98. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  99. + * General Public License for more details.
  100. + *
  101. + * You should have received a copy of the GNU General Public License
  102. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  103. + */
  104. +package ai.others.CastleFlagOfProtection;
  105. +
  106. +import org.l2jmobius.gameserver.model.actor.Npc;
  107. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  108. +import org.l2jmobius.gameserver.model.quest.QuestState;
  109. +
  110. +import ai.AbstractNpcAI;
  111. +
  112. +/**
  113. + * Castle Flag of Protection AI.
  114. + * @author CostyKiller
  115. + */
  116. +public class CastleFlagOfProtection extends AbstractNpcAI
  117. +{
  118. +   // Flag of Protection NPCs
  119. +   private static final int FLAG_GLUDIO = 36741; // 1 Gludio Castle
  120. +   private static final int FLAG_DION = 36742; // 2 Dion Castle
  121. +   private static final int FLAG_GIRAN = 36743; // 3 Giran Castle
  122. +   private static final int FLAG_OREN = 36744; // 4 Oren Castle
  123. +   private static final int FLAG_ADEN = 36745; // 5 Aden Castle
  124. +   private static final int FLAG_INNADRIL = 36746; // 6 Innadril Castle
  125. +   private static final int FLAG_GODDARD = 36747; // 7 Goddard Castle
  126. +   private static final int FLAG_RUNE = 36748; // 8 Rune Castle
  127. +   private static final int FLAG_SCHUTTGART = 36749; // 9 Schuttgart Castle
  128. +  
  129. +   private CastleFlagOfProtection()
  130. +   {
  131. +       addFirstTalkId(FLAG_GLUDIO, FLAG_DION, FLAG_GIRAN, FLAG_OREN, FLAG_ADEN, FLAG_INNADRIL, FLAG_GODDARD, FLAG_RUNE, FLAG_SCHUTTGART);
  132. +   }
  133. +  
  134. +   @Override
  135. +   public String onFirstTalk(Npc npc, PlayerInstance player)
  136. +   {
  137. +       String htmltext;
  138. +       final QuestState qs = player.getQuestState("Q10825_ForVictory");
  139. +       if (((qs != null) && qs.isCond(1)))
  140. +       {
  141. +           htmltext = "CastleFlagOfProtection.html";
  142. +       }
  143. +       else
  144. +       {
  145. +           htmltext = "CastleFlagOfProtection-01.html";
  146. +       }
  147. +       return htmltext;
  148. +   }
  149. +  
  150. +   public static void main(String[] args)
  151. +   {
  152. +       new CastleFlagOfProtection();
  153. +   }
  154. +}
  155. \ No newline at end of file
  156. Index: dist/game/data/scripts/ai/others/FactionCertificates/FactionCertificates.java
  157. ===================================================================
  158. --- dist/game/data/scripts/ai/others/FactionCertificates/FactionCertificates.java   (nonexistent)
  159. +++ dist/game/data/scripts/ai/others/FactionCertificates/FactionCertificates.java   (working copy)
  160. @@ -0,0 +1,123 @@
  161. +/*
  162. + * This file is part of the L2J Mobius project.
  163. + *
  164. + * This program is free software: you can redistribute it and/or modify
  165. + * it under the terms of the GNU General Public License as published by
  166. + * the Free Software Foundation, either version 3 of the License, or
  167. + * (at your option) any later version.
  168. + *
  169. + * This program is distributed in the hope that it will be useful,
  170. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  171. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  172. + * General Public License for more details.
  173. + *
  174. + * You should have received a copy of the GNU General Public License
  175. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  176. + */
  177. +package ai.others.FactionCertificates;
  178. +
  179. +import org.l2jmobius.gameserver.enums.Faction;
  180. +import org.l2jmobius.gameserver.model.actor.Npc;
  181. +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
  182. +import org.l2jmobius.gameserver.model.quest.QuestState;
  183. +
  184. +import ai.AbstractNpcAI;
  185. +import quests.Q10875_ForReputation.Q10875_ForReputation;
  186. +import quests.Q10881_ForThePride.Q10881_ForThePride;
  187. +
  188. +/**
  189. + * Custom Faction Certificates AI.
  190. + * @author CostyKiller
  191. + */
  192. +public class FactionCertificates extends AbstractNpcAI
  193. +{
  194. +   // NPCs
  195. +   private static final int LEONA_BLACKBIRD = 31595; // Blackbird Guild Leader
  196. +   private static final int KEKROPUS = 34222; // Giant Trackers Guild Leader
  197. +   private static final int IRENE = 34233; // Mother Tree Guardians Guild Leader
  198. +   private static final int FERIN = 34054; // Unwordly Visitors Guild Leader
  199. +   private static final int LOGART_VAN_DIKE = 34235; // Royal Kingdom Guards Guild Leader
  200. +   // Certificates
  201. +   private static final int BLACKBIRD_CLAN_CERTIFICATION = 47840;
  202. +   private static final int GIANT_TRACKERS_CERTIFICATION = 47841;
  203. +   private static final int MOTHER_TREE_GUARDIANS_CERTIFICATION = 47844;
  204. +   private static final int UNWORDLY_VISITORS_CERTIFICATION = 47845;
  205. +   private static final int KINGDOM_ROYAL_GUARDS_CERTIFICATION = 47846;
  206. +   // Other
  207. +   private static final int FACTION_LEVEL = 6;
  208. +  
  209. +   private FactionCertificates()
  210. +   {
  211. +       addStartNpc(LEONA_BLACKBIRD, KEKROPUS, IRENE, FERIN, LOGART_VAN_DIKE);
  212. +       addTalkId(LEONA_BLACKBIRD, KEKROPUS, IRENE, FERIN, LOGART_VAN_DIKE);
  213. +   }
  214. +  
  215. +   @Override
  216. +   public String onAdvEvent(String event, Npc npc, PlayerInstance player)
  217. +   {
  218. +       String htmltext = null;
  219. +       final QuestState qs1 = player.getQuestState(Q10875_ForReputation.class.getSimpleName());
  220. +       final QuestState qs2 = player.getQuestState(Q10881_ForThePride.class.getSimpleName());
  221. +       if (((qs1 != null) && qs1.isStarted()) || ((qs2 != null) && qs2.isStarted()))
  222. +       {
  223. +           if (event.equals("getCertificate"))
  224. +           {
  225. +               switch (npc.getId())
  226. +               {
  227. +                   case LEONA_BLACKBIRD:
  228. +                   {
  229. +                       if (!hasQuestItems(player, BLACKBIRD_CLAN_CERTIFICATION) && (player.getFactionLevel(Faction.BLACKBIRD_CLAN) >= FACTION_LEVEL))
  230. +                       {
  231. +                           giveItems(player, BLACKBIRD_CLAN_CERTIFICATION, 1);
  232. +                           htmltext = "certificate.html";
  233. +                       }
  234. +                       break;
  235. +                   }
  236. +                   case KEKROPUS:
  237. +                   {
  238. +                       if (!hasQuestItems(player, GIANT_TRACKERS_CERTIFICATION) && (player.getFactionLevel(Faction.GIANT_TRACKERS) >= FACTION_LEVEL))
  239. +                       {
  240. +                           giveItems(player, GIANT_TRACKERS_CERTIFICATION, 1);
  241. +                           htmltext = "certificate.html";
  242. +                       }
  243. +                       break;
  244. +                   }
  245. +                   case IRENE:
  246. +                   {
  247. +                       if (!hasQuestItems(player, MOTHER_TREE_GUARDIANS_CERTIFICATION) && (player.getFactionLevel(Faction.MOTHER_TREE_GUARDIANS) >= FACTION_LEVEL))
  248. +                       {
  249. +                           giveItems(player, MOTHER_TREE_GUARDIANS_CERTIFICATION, 1);
  250. +                           htmltext = "certificate.html";
  251. +                       }
  252. +                       break;
  253. +                   }
  254. +                   case FERIN:
  255. +                   {
  256. +                       if (!hasQuestItems(player, UNWORDLY_VISITORS_CERTIFICATION) && (player.getFactionLevel(Faction.UNWORLDLY_VISITORS) >= FACTION_LEVEL))
  257. +                       {
  258. +                           giveItems(player, UNWORDLY_VISITORS_CERTIFICATION, 1);
  259. +                           htmltext = "certificate.html";
  260. +                       }
  261. +                       break;
  262. +                   }
  263. +                   case LOGART_VAN_DIKE:
  264. +                   {
  265. +                       if (!hasQuestItems(player, KINGDOM_ROYAL_GUARDS_CERTIFICATION) && (player.getFactionLevel(Faction.KINGDOM_ROYAL_GUARDS) >= FACTION_LEVEL))
  266. +                       {
  267. +                           giveItems(player, KINGDOM_ROYAL_GUARDS_CERTIFICATION, 1);
  268. +                           htmltext = "certificate.html";
  269. +                       }
  270. +                       break;
  271. +                   }
  272. +               }
  273. +           }
  274. +       }
  275. +       htmltext = "not-ready.html";
  276. +       return htmltext;
  277. +   }
  278. +  
  279. +   public static void main(String[] args)
  280. +   {
  281. +       new FactionCertificates();
  282. +   }
  283. +}
  284. Index: dist/game/data/scripts/ai/others/FactionCertificates/certificate.html
  285. ===================================================================
  286. --- dist/game/data/scripts/ai/others/FactionCertificates/certificate.html   (nonexistent)
  287. +++ dist/game/data/scripts/ai/others/FactionCertificates/certificate.html   (working copy)
  288. @@ -0,0 +1,3 @@
  289. +<html><body>Guild Leader:<br>
  290. +Here is our guild certificate. Use it wisely.<br>
  291. +</body></html>
  292. \ No newline at end of file
  293. Index: dist/game/data/scripts/ai/others/FactionCertificates/not-ready.html
  294. ===================================================================
  295. --- dist/game/data/scripts/ai/others/FactionCertificates/not-ready.html (nonexistent)
  296. +++ dist/game/data/scripts/ai/others/FactionCertificates/not-ready.html (working copy)
  297. @@ -0,0 +1,4 @@
  298. +<html><body>Guild Leader:<br>
  299. +You are not ready to get our certificate. Come back when you are ready.<br>
  300. +(For Reputation or For The Pride exalted sub quests must be in progress.)
  301. +</body></html>
  302. \ No newline at end of file
  303.  
Add Comment
Please, Sign In to add comment