Gladicek

Jinia AI

Jan 10th, 2013
320
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.83 KB | None | 0 0
  1. Index: dist/game/data/scripts/ai/npc/Jinia/32781-1.htm
  2. ===================================================================
  3. --- dist/game/data/scripts/ai/npc/Jinia/32781-1.htm (revision 0)
  4. +++ dist/game/data/scripts/ai/npc/Jinia/32781-1.htm (working copy)
  5. @@ -0,0 +1,7 @@
  6. +<html><head>
  7. +<body>Jinia:<br>
  8. +This place is so cold I can't feel my nose.
  9. +I'm sure it's so red, I could lead a pack of flying reindeer.<br>
  10. +<a action="bypass -h Quest Jinia frozen_core">"We need a way to stop Freya."</a><br>
  11. +<a action="bypass -h Quest Jinia 32781-4.htm">"We're ready now."</a>
  12. +</body></html>
  13. Index: dist/game/data/scripts/ai/npc/Jinia/32781-2.htm
  14. ===================================================================
  15. --- dist/game/data/scripts/ai/npc/Jinia/32781-2.htm (revision 0)
  16. +++ dist/game/data/scripts/ai/npc/Jinia/32781-2.htm (working copy)
  17. @@ -0,0 +1,6 @@
  18. +<html><head>
  19. +<body>Jinia:<br>
  20. +It's a piece of Frozen Core.
  21. +But even you might not be able to derive all of its power.
  22. +Whatever happens be careful, you won't be able to use it very often.
  23. +</body></html>
  24. \ No newline at end of file
  25. Index: dist/game/data/scripts/ai/npc/Jinia/32781-3.htm
  26. ===================================================================
  27. --- dist/game/data/scripts/ai/npc/Jinia/32781-3.htm (revision 0)
  28. +++ dist/game/data/scripts/ai/npc/Jinia/32781-3.htm (working copy)
  29. @@ -0,0 +1,4 @@
  30. +<html><head>
  31. +<body>Jinia:<br>
  32. +Remember, Sirra gave us the Frozen Core. They should be power enough.
  33. +</body></html>
  34. Index: dist/game/data/scripts/ai/npc/Jinia/32781-4.htm
  35. ===================================================================
  36. --- dist/game/data/scripts/ai/npc/Jinia/32781-4.htm (revision 0)
  37. +++ dist/game/data/scripts/ai/npc/Jinia/32781-4.htm (working copy)
  38. @@ -0,0 +1,10 @@
  39. +<html><head>
  40. +<body>Jinia:<br>
  41. +We must be prepared before confronting Freya.
  42. +As the winter cold swells around the castle, she becomes even stronger.
  43. +We can use blitz tactics and strike her before her power matures fully.
  44. +Then again, if we wait until she is at full strength, I'm sure the reward will be greater.
  45. +I leave the choice to you.<br>
  46. +<a action="bypass -h Quest Jinia 32781-5.htm">Challenge Freya.</a><br>
  47. +<a action="bypass -h Quest Jinia 32781-6.htm">Challenge Freya in the extreme cold.</a>
  48. +</body></html>
  49. Index: dist/game/data/scripts/ai/npc/Jinia/32781-5.htm
  50. ===================================================================
  51. --- dist/game/data/scripts/ai/npc/Jinia/32781-5.htm (revision 0)
  52. +++ dist/game/data/scripts/ai/npc/Jinia/32781-5.htm (working copy)
  53. @@ -0,0 +1,5 @@
  54. +<html><head>
  55. +<body>Jinia:<br>
  56. +Be careful. Should anything happen, we'll try to help you.<br>
  57. +<a action="bypass -h Quest ????">"Thanks, Jinia."</a>
  58. +</body></html>
  59. Index: dist/game/data/scripts/ai/npc/Jinia/32781-6.htm
  60. ===================================================================
  61. --- dist/game/data/scripts/ai/npc/Jinia/32781-6.htm (revision 0)
  62. +++ dist/game/data/scripts/ai/npc/Jinia/32781-6.htm (working copy)
  63. @@ -0,0 +1,7 @@
  64. +<html><head>
  65. +<body>Jinia:<br>
  66. +Her power is without equal. She truly is a frozen goddess.
  67. +Are you sure you're ready?<br>
  68. +<a action="bypass -h Quest ????">"It's now or never."</a><br>
  69. +<a action="bypass -h Quest Jinia 32781-6a.htm">"Perhaps I'll think again."</a>
  70. +</body></html>
  71. Index: dist/game/data/scripts/ai/npc/Jinia/32781-6a.htm
  72. ===================================================================
  73. --- dist/game/data/scripts/ai/npc/Jinia/32781-6a.htm (revision 0)
  74. +++ dist/game/data/scripts/ai/npc/Jinia/32781-6a.htm (working copy)
  75. @@ -0,0 +1,4 @@
  76. +<html><head>
  77. +<body>Jinia:<br>
  78. +Alright, waking her is not something you can simply undo. Let me know when you're ready.
  79. +</body></html>
  80. Index: dist/game/data/scripts/ai/npc/Jinia/32781.htm
  81. ===================================================================
  82. --- dist/game/data/scripts/ai/npc/Jinia/32781.htm (revision 0)
  83. +++ dist/game/data/scripts/ai/npc/Jinia/32781.htm (working copy)
  84. @@ -0,0 +1,5 @@
  85. +<html><head>
  86. +<body>Jinia:<br>
  87. +Sorry. I don't have time, I'm dealing with something important.<br>
  88. +<a action="bypass -h npc_%objectId%_Quest">Quest</a>
  89. +</body></html>
  90. Index: dist/game/data/scripts/ai/npc/Jinia/Jinia.java
  91. ===================================================================
  92. --- dist/game/data/scripts/ai/npc/Jinia/Jinia.java (revision 0)
  93. +++ dist/game/data/scripts/ai/npc/Jinia/Jinia.java (working copy)
  94. @@ -0,0 +1,100 @@
  95. +/*
  96. + * Copyright (C) 2004-2013 L2J DataPack
  97. + *
  98. + * This file is part of L2J DataPack.
  99. + *
  100. + * L2J DataPack is free software: you can redistribute it and/or modify
  101. + * it under the terms of the GNU General Public License as published by
  102. + * the Free Software Foundation, either version 3 of the License, or
  103. + * (at your option) any later version.
  104. + *
  105. + * L2J DataPack is distributed in the hope that it will be useful,
  106. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  107. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  108. + * General Public License for more details.
  109. + *
  110. + * You should have received a copy of the GNU General Public License
  111. + * along with this program. If not, see <http://www.gnu.org/licenses/>.
  112. + */
  113. +package ai.npc.Jinia;
  114. +
  115. +import ai.npc.AbstractNpcAI;
  116. +
  117. +import com.l2jserver.gameserver.model.actor.L2Npc;
  118. +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
  119. +import com.l2jserver.gameserver.model.quest.QuestState;
  120. +import com.l2jserver.gameserver.model.quest.State;
  121. +
  122. +/**
  123. + * Jinia AI
  124. + * @author Gladicek
  125. + */
  126. +
  127. +public class Jinia extends AbstractNpcAI
  128. +{
  129. + // Npc
  130. + private static final int JINIA = 32781;
  131. + // Item
  132. + private static final int FROZEN_CORE = 15469;
  133. +
  134. + @Override
  135. + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
  136. + {
  137. + String htmltext = event;
  138. + switch (event)
  139. + {
  140. + case "frozen_core":
  141. + {
  142. + if (!hasQuestItems(player, FROZEN_CORE))
  143. + {
  144. + htmltext = "32781-3.htm";
  145. + }
  146. + giveItems(player, FROZEN_CORE, 1);
  147. + htmltext = "32781-2.htm";
  148. + break;
  149. + }
  150. + }
  151. +
  152. + return htmltext;
  153. + }
  154. +
  155. + @Override
  156. + public String onFirstTalk(L2Npc npc, L2PcInstance player)
  157. + {
  158. + String htmltext = null;
  159. + final QuestState st = player.getQuestState(Q10286_ReunionWithSirra.class.getSimpleName());
  160. +
  161. + switch (st.getState())
  162. + {
  163. + case State.STARTED:
  164. + {
  165. + if (st.isCond(5))
  166. + {
  167. + htmltext = "32781-1.htm";
  168. + }
  169. + else
  170. + {
  171. + htmltext = "32781.htm";
  172. + }
  173. + break;
  174. + }
  175. + case State.COMPLETED:
  176. + {
  177. + htmltext = "32781-1.htm";
  178. + }
  179. + }
  180. + }
  181. +
  182. + public Jinia(String name, String descr)
  183. + {
  184. + super(name, descr);
  185. + addStartNpc(JINIA);
  186. + addFirstTalkId(JINIA);
  187. + addTalkId(JINIA);
  188. + }
  189. +
  190. + public static void main(String[] args)
  191. + {
  192. + new Jinia(Jinia.class.getSimpleName(), "ai/npc/");
  193. + }
  194. +}
  195. \ No newline at end of file
Advertisement
Add Comment
Please, Sign In to add comment