LaexyraYBarriath.lua 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. --[[
  2. Script Name : SpawnScripts/Darklight/LaexyraYBarriath.lua
  3. Script Purpose : Laexyra Y'Barriath (340075)
  4. Script Author : Cynnar
  5. Script Date : 2016.01.01
  6. Script Notes : Report to Zezas is not implemented yet since it requires you to go into Neriak.
  7. --]]
  8. local PurposefulTrinkets = 149
  9. local PublicService = 150
  10. local AFriendlyReminder = 151
  11. local Reaping = 152
  12. local Condemned = 153
  13. local ContinuingAssistance = 154
  14. local ReporttoZezas = 159
  15. function spawn(NPC)
  16. ProvidesQuest(NPC, PurposefulTrinkets)
  17. ProvidesQuest(NPC, PublicService)
  18. ProvidesQuest(NPC, AFriendlyReminder)
  19. ProvidesQuest(NPC, Reaping)
  20. ProvidesQuest(NPC, Condemned)
  21. ProvidesQuest(NPC, ContinuingAssistance)
  22. --ProvidesQuest(NPC, ReporttoZezas)
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function hailed(NPC, Spawn)
  28. FaceTarget(NPC, Spawn)
  29. conversation = CreateConversation()
  30. if not HasQuest(Spawn, PurposefulTrinkets) and not HasCompletedQuest(Spawn, PurposefulTrinkets) then
  31. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1007.mp3", "", "tapfoot", 0, 0, Spawn)
  32. AddConversationOption(conversation, "Reported to you?", "Quest_PurposefulTrinkets")
  33. StartConversation(conversation, NPC, Spawn, "" .. GetName(Spawn) .. ", it is about time you reported to me.")
  34. elseif HasQuest(Spawn, PurposefulTrinkets) and not HasCompletedQuest(Spawn, PurposefulTrinkets) then
  35. PurposefulTrinkets_00(NPC, Spawn)
  36. elseif HasCompletedQuest(Spawn, PurposefulTrinkets) and not HasCompletedQuest(Spawn, PublicService) then
  37. if not HasQuest(Spawn, PublicService) then
  38. PurposefulTrinkets_00(NPC, Spawn)
  39. else
  40. PublicService_00(NPC, Spawn)
  41. end
  42. elseif HasCompletedQuest(Spawn, PublicService) and not HasCompletedQuest(Spawn, AFriendlyReminder) then
  43. if not HasQuest(Spawn, AFriendlyReminder) then
  44. PublicService_00(NPC, Spawn)
  45. else
  46. AFriendlyReminder_00(NPC, Spawn)
  47. end
  48. elseif HasCompletedQuest(Spawn, AFriendlyReminder) and not HasCompletedQuest(Spawn, Reaping) then
  49. if not HasQuest(Spawn, Reaping) then
  50. AFriendlyReminder_00(NPC, Spawn)
  51. else
  52. Reaping_00(NPC, Spawn)
  53. end
  54. elseif HasCompletedQuest(Spawn, Reaping) and not HasCompletedQuest(Spawn, Condemned) then
  55. if not HasQuest(Spawn, Condemned) then
  56. Reaping_00(NPC, Spawn)
  57. else
  58. Condemned_00(NPC, Spawn)
  59. end
  60. elseif HasCompletedQuest(Spawn, Condemned) and not HasCompletedQuest(Spawn, ContinuingAssistance) then
  61. if not HasQuest(Spawn, ContinuingAssistance) then
  62. Say(NPC, "CA offer")
  63. Quest_ContinuingAssistance_01(NPC, Spawn)
  64. else
  65. Say(NPC, "test")
  66. Quest_Condemned_03(NPC, Spawn)
  67. end
  68. else
  69. Say(NPC, "Report to Zezas is not implemented yet because Neriak is not ready for visitors yet..")
  70. end
  71. end
  72. --------------------------------------------------------------------------------------
  73. -- Purposeful Trinkets
  74. --------------------------------------------------------------------------------------
  75. function PurposefulTrinkets_00(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. conversation = CreateConversation()
  78. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1007.mp3", "", "", 0, 0, Spawn)
  79. if not HasCompletedQuest(Spawn, PurposefulTrinkets) and GetQuestStep(Spawn, PurposefulTrinkets) ~= 2 then
  80. AddConversationOption(conversation, "Not yet.")
  81. else
  82. AddConversationOption(conversation, "Yes.", "Quest_PurposefulTrinkets_04")
  83. end
  84. StartConversation(conversation, NPC, Spawn, "Have you collected the trinkets?.")
  85. end
  86. function Quest_PurposefulTrinkets(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. AddConversationOption(conversation, "I have!", "Quest_PurposefulTrinkets_01")
  90. AddConversationOption(conversation, "No.", "Quest_PurposefulTrinkets_Decline")
  91. StartConversation(conversation, NPC, Spawn, "I am Laexyra Y'Barriath, Commander of the Dread Guard forces in the Darklight Wood. You have dedicated yourself to The City of Hate and Queen Cristanos, have you not?")
  92. end
  93. function Quest_PurposefulTrinkets_Decline(NPC, Spawn)
  94. FaceTarget(NPC, Spawn)
  95. conversation = CreateConversation()
  96. PlayFlavor(NPC, "", "", "brandish", 0, 0, Spawn)
  97. StartConversation(conversation, NPC, Spawn, "Then begone before I am forced to clean you from my blade!")
  98. end
  99. function Quest_PurposefulTrinkets_01(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. AddConversationOption(conversation, "What is the current threat?", "Quest_PurposefulTrinkets_02")
  103. StartConversation(conversation, NPC, Spawn, "Good. Neriak requires true statesmen and women who will do all they can to further their city. In my case, I am here in Darklight battling the forces--natural or otherwise--that threaten our city and her throne.")
  104. end
  105. function Quest_PurposefulTrinkets_02(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. conversation = CreateConversation()
  108. AddConversationOption(conversation, "What is the plan?", "Quest_PurposefulTrinkets_03")
  109. StartConversation(conversation, NPC, Spawn, "The never ending tide of undead. New corpses climb from the ground every day and those that we kill do not stay dead for long. I believe, with a little work, we can at least keep those we kill from coming back. But nothing is certain.")
  110. end
  111. function Quest_PurposefulTrinkets_03(NPC, Spawn)
  112. FaceTarget(NPC, Spawn)
  113. conversation = CreateConversation()
  114. AddConversationOption(conversation, "I can do that.", "QuestOffer_PurposefulTrinkets")
  115. AddConversationOption(conversation, "No thanks.")
  116. StartConversation(conversation, NPC, Spawn, "Search the field to our south. The halflings and elf rangers who died there brought many things into our forest, including small tokens meant to remind them of home--to remind them of what they were fighting for. Collect some of these for me.")
  117. end
  118. function QuestOffer_PurposefulTrinkets(NPC, Spawn)
  119. OfferQuest(NPC, Spawn, PurposefulTrinkets)
  120. end
  121. function Quest_PurposefulTrinkets_04(NPC, Spawn)
  122. FaceTarget(NPC, Spawn)
  123. conversation = CreateConversation()
  124. if not HasCompletedQuest(Spawn, PurposefulTrinkets) then
  125. SetStepComplete(Spawn, PurposefulTrinkets, 2)
  126. end
  127. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  128. AddConversationOption(conversation, "I am willing.", "Quest_PublicService")
  129. AddConversationOption(conversation, "An order is an order.", "Quest_PublicService")
  130. StartConversation(conversation, NPC, Spawn, "Excellent. It will take me some time to prepare them for their purpose, however. In the meantime, the undead must be culled. Are you willing?")
  131. end
  132. --------------------------------------------------------------------------------------
  133. -- Public Service
  134. --------------------------------------------------------------------------------------
  135. function PublicService_00(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1007.mp3", "", "", 0, 0, Spawn)
  139. if not HasCompletedQuest(Spawn, PublicService) and GetQuestStep(Spawn, PublicService) ~= 3 then
  140. AddConversationOption(conversation, "Not yet.")
  141. else
  142. AddConversationOption(conversation, "Temporarily, yes.", "Quest_PublicService_01")
  143. end
  144. StartConversation(conversation, NPC, Spawn, "Have you taken care of the undead?")
  145. end
  146. function Quest_PublicService(NPC, Spawn)
  147. FaceTarget(NPC, Spawn)
  148. conversation = CreateConversation()
  149. AddConversationOption(conversation, "All right.", "QuestOffer_PublicService")
  150. AddConversationOption(conversation, "Maybe later.")
  151. StartConversation(conversation, NPC, Spawn, "Good. North of here walk the undead remains of our Teir'Dal soldiers, now being used against us. Kill the defenders and soldiers so that we may have some respite.")
  152. end
  153. function QuestOffer_PublicService(NPC, Spawn)
  154. OfferQuest(NPC, Spawn, PublicService)
  155. end
  156. function Quest_PublicService_01(NPC, Spawn)
  157. FaceTarget(NPC, Spawn)
  158. conversation = CreateConversation()
  159. if not HasCompletedQuest(Spawn, PublicService) then
  160. SetStepComplete(Spawn, PublicService, 3)
  161. end
  162. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  163. AddConversationOption(conversation, "I'll make sure he understands the reminder.", "QuestOffer_AFriendlyReminder")
  164. AddConversationOption(conversation, "Maybe someone else would be more interested in doing this for you.")
  165. StartConversation(conversation, NPC, Spawn, "I've just received news regarding the recent undead attacks on this outpost. A Thexian necromancer by the name Kronryn N'Xytyl has been spotted near the Field of Ruin. I have little doubt that he is singularly responsible for raising our ancient slain foes against us once more. Remind him that his presence will not be tolerated in these woods.")
  166. end
  167. --------------------------------------------------------------------------------------
  168. -- A Friendly Reminder
  169. --------------------------------------------------------------------------------------
  170. function AFriendlyReminder_00(NPC, Spawn)
  171. FaceTarget(NPC, Spawn)
  172. conversation = CreateConversation()
  173. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1007.mp3", "", "", 0, 0, Spawn)
  174. if not HasCompletedQuest(Spawn, AFriendlyReminder) and GetQuestStep(Spawn, AFriendlyReminder) ~= 2 then
  175. AddConversationOption(conversation, "Not yet.")
  176. else
  177. AddConversationOption(conversation, "Swiftly.", "Quest_AFriendlyReminder_01")
  178. end
  179. StartConversation(conversation, NPC, Spawn, "Did you deliver the message?")
  180. end
  181. function QuestOffer_AFriendlyReminder(NPC, Spawn)
  182. OfferQuest(NPC, Spawn, AFriendlyReminder)
  183. end
  184. function Quest_AFriendlyReminder(NPC, Spawn)
  185. FaceTarget(NPC, Spawn)
  186. conversation = CreateConversation()
  187. AddConversationOption(conversation, "How are we to do that?", "Quest_AFriendlyReminder_01")
  188. StartConversation(conversation, NPC, Spawn, "Such is a befitting end to a trespasser who foolishly dared to defy our rule of these lands. Now it is time to clean up the mess he has made.")
  189. end
  190. function Quest_AFriendlyReminder_01(NPC, Spawn)
  191. FaceTarget(NPC, Spawn)
  192. conversation = CreateConversation()
  193. SetStepComplete(Spawn, AFriendlyReminder, 2)
  194. AddConversationOption(conversation, "How does it work?", "Quest_AFriendlyReminder_02")
  195. StartConversation(conversation, NPC, Spawn, "With the trinkets you collected. I've prepared them to capture the spirits of some of the fallen soldiers. These specially-prepared trinkets will pull the spirit of their owners together, into something more tangible.")
  196. end
  197. function Quest_AFriendlyReminder_02(NPC, Spawn)
  198. FaceTarget(NPC, Spawn)
  199. conversation = CreateConversation()
  200. SetStepComplete(Spawn, AFriendlyReminder, 2)
  201. AddConversationOption(conversation, "So, I am to kill their spirits?", "Quest_AFriendlyReminder_03")
  202. StartConversation(conversation, NPC, Spawn, "You need only walk among the stout cadavers and fallen rangers with it. Instead of a mindless zombie it will actually BE the spirit of the fallen soldier that materializes for you. This means that if we get rid of this spirit, it will no longer contribute to the undead menace.")
  203. end
  204. function Quest_AFriendlyReminder_03(NPC, Spawn)
  205. FaceTarget(NPC, Spawn)
  206. conversation = CreateConversation()
  207. if not HasCompletedQuest(Spawn, AFriendlyReminder) then
  208. SetStepComplete(Spawn, AFriendlyReminder, 2)
  209. end
  210. AddConversationOption(conversation, "All right.", "QuestOffer_Reaping")
  211. AddConversationOption(conversation, "I'm not interested.")
  212. StartConversation(conversation, NPC, Spawn, "No, they wouldn't stay dead. We can, however, trap their spirits, and that's just what I'd like you to do.")
  213. end
  214. --------------------------------------------------------------------------------------
  215. -- Reaping
  216. --------------------------------------------------------------------------------------
  217. function QuestOffer_Reaping(NPC, Spawn)
  218. OfferQuest(NPC, Spawn, Reaping)
  219. end
  220. function Reaping_00(NPC, Spawn)
  221. FaceTarget(NPC, Spawn)
  222. conversation = CreateConversation()
  223. PlayFlavor(NPC, "voiceover/english/neriak/laexyra_y_barriath/darklight_wood/tvatar_post/laexyra/laexyra021.mp3", "", "", 3742143393, 3604889298, Spawn)
  224. if not HasCompletedQuest(Spawn, Reaping) and GetQuestStep(Spawn, Reaping) ~= 2 then
  225. AddConversationOption(conversation, "Not yet.")
  226. else
  227. AddConversationOption(conversation, "I did.", "Quest_Reaping_01")
  228. end
  229. StartConversation(conversation, NPC, Spawn, "Did you trap the spirits?")
  230. end
  231. function Quest_Reaping_01(NPC, Spawn)
  232. FaceTarget(NPC, Spawn)
  233. conversation = CreateConversation()
  234. SetStepComplete(Spawn, Reaping, 2)
  235. AddConversationOption(conversation, "What do you have in mind?", "Quest_Reaping_02")
  236. StartConversation(conversation, NPC, Spawn, "That pleases me," .. GetName(Spawn) .. ". Now to ensure they do not return to threaten us further.")
  237. end
  238. function Quest_Reaping_02(NPC, Spawn)
  239. FaceTarget(NPC, Spawn)
  240. conversation = CreateConversation()
  241. AddConversationOption(conversation, "I can put the spirits in the well.", "QuestOffer_Condemned")
  242. AddConversationOption(conversation, "Maybe later.")
  243. StartConversation(conversation, NPC, Spawn, "That we release these spirits near the Wellspring of Nightmares thus trapping them in perpetual torment. It's similar to their existence now, but with the added benefit that they have no corporeal connection to this world and are thus no longer annoying us.")
  244. end
  245. --------------------------------------------------------------------------------------
  246. -- Condemned
  247. --------------------------------------------------------------------------------------
  248. function QuestOffer_Condemned(NPC, Spawn)
  249. OfferQuest(NPC, Spawn, Condemned)
  250. end
  251. function Condemned_00(NPC, Spawn)
  252. FaceTarget(NPC, Spawn)
  253. conversation = CreateConversation()
  254. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1007.mp3", "", "", 0, 0, Spawn)
  255. if not HasCompletedQuest(Spawn, Condemned) and GetQuestStep(Spawn, Condemned) ~= 2 then
  256. AddConversationOption(conversation, "Not yet.")
  257. else
  258. AddConversationOption(conversation, "I have.", "Quest_Condemned_01")
  259. end
  260. StartConversation(conversation, NPC, Spawn, "Have you released the spirits yet?")
  261. end
  262. function Quest_Condemned_01(NPC, Spawn)
  263. FaceTarget(NPC, Spawn)
  264. conversation = CreateConversation()
  265. PlayFlavor(NPC, "voiceover/english/neriak/laexyra_y_barriath/darklight_wood/tvatar_post/laexyra/laexyra026.mp3", "", "", 3005578756, 2486978605, Spawn)
  266. AddConversationOption(conversation, "None. They are all trapped.", "Quest_Condemned_02")
  267. StartConversation(conversation, NPC, Spawn, "And none of them escaped?")
  268. end
  269. function Quest_Condemned_02(NPC, Spawn)
  270. FaceTarget(NPC, Spawn)
  271. conversation = CreateConversation()
  272. SetStepComplete(Spawn, Condemned, 2)
  273. AddConversationOption(conversation, "You're welcome.", "Quest_Condemned_03")
  274. StartConversation(conversation, NPC, Spawn, "Mmm. Beautiful, beautiful. I believe this can be used to rid ourselves of the stout cadavers and fallen rangers. A more appropriate method of dealing with the Teir'Dal spirits will have to be found, however. But this is a very big step in the right direction. Thank you," .. GetName(Spawn) .. ".")
  275. end
  276. --function Quest_Condemned_03(NPC, Spawn)
  277. -- FaceTarget(NPC, Spawn)
  278. -- conversation = CreateConversation()
  279. --
  280. -- PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1007.mp3", "", "", 0, 0, Spawn)
  281. -- AddConversationOption(conversation, "Is there anything I can help with?", "Quest_ContinuingAssistance_01")
  282. -- AddConversationOption(conversation, "I hope I have been helpful enough that you speak well of me to others.", "Quest_ReporttoZezas_01")
  283. -- AddConversationOption(conversation, "Good luck with that.")
  284. -- StartConversation(conversation, NPC, Spawn, "Now my only question is what problem to tackle next.")
  285. --end
  286. --------------------------------------------------------------------------------------
  287. -- Continuing Assistance
  288. --------------------------------------------------------------------------------------
  289. function Quest_ContinuingAssistance_01(NPC, Spawn)
  290. FaceTarget(NPC, Spawn)
  291. conversation = CreateConversation()
  292. AddConversationOption(conversation, "All right.", "Quest_ContinuingAssistance_02")
  293. StartConversation(conversation, NPC, Spawn, "Actually, yes, I could use your help. I have two correspondences I need delivered immediately. The first goes to Malyl N'Vazin. The second goes to a sniveling wretch named, Vornlin B'Vytyl. You can find them both at Wanderlust Fair.")
  294. end
  295. function Quest_ContinuingAssistance_02(NPC, Spawn)
  296. FaceTarget(NPC, Spawn)
  297. conversation = CreateConversation()
  298. AddConversationOption(conversation, "Okay, I will go find them.", "QuestOffer_ContinuingAssistance")
  299. AddConversationOption(conversation, "This task doesn't interest me.")
  300. StartConversation(conversation, NPC, Spawn, "To get to the Wanderlust Fair, follow the path west. When it splits, take the right fork. You will pass over the Searing Tendril River before the path splits again, this time go left. That will lead you right past the fair on Nightshadow Rise.")
  301. end
  302. function Temp_ContinuingAssistance_02(NPC, Spawn)
  303. FaceTarget(NPC, Spawn)
  304. conversation = CreateConversation()
  305. AddConversationOption(conversation, "OK.", "QuestOffer_ContinuingAssistance")
  306. StartConversation(conversation, NPC, Spawn, "This is where the Accept quest will go, but I have not completed the quest Continuing Assistance yet.")
  307. end
  308. --AddConversationOption(conversation, "All right.", "QuestOffer_Reaping")
  309. function QuestOffer_ContinuingAssistance(NPC, Spawn)
  310. OfferQuest(NPC, Spawn, ContinuingAssistance)
  311. end
  312. --------------------------------------------------------------------------------------
  313. -- Report to Zezas
  314. --------------------------------------------------------------------------------------
  315. function Quest_ReporttoZezas_01(NPC, Spawn)
  316. FaceTarget(NPC, Spawn)
  317. conversation = CreateConversation()
  318. AddConversationOption(conversation, "Who does it go to?", "Quest_ReporttoZezas_02")
  319. StartConversation(conversation, NPC, Spawn, "Quite. On that note, in fact, I've something I'd like you to deliver to a friend of mine within Neriak," .. GetName(Spawn) .. ".")
  320. end
  321. function Quest_ReporttoZezas_02(NPC, Spawn)
  322. FaceTarget(NPC, Spawn)
  323. conversation = CreateConversation()
  324. AddConversationOption(conversation, "All right, I will deliver it.", "Temp_ReporttoZezas")
  325. AddConversationOption(conversation, "Maybe at a later date.")
  326. StartConversation(conversation, NPC, Spawn, "Zezas X'Zauzin. He should be just inside Neriak.")
  327. end
  328. function Temp_ReporttoZezas(NPC, Spawn)
  329. FaceTarget(NPC, Spawn)
  330. conversation = CreateConversation()
  331. AddConversationOption(conversation, "OK.")
  332. StartConversation(conversation, NPC, Spawn, "This is where the Accept quest will go, but I have not completed the quest Report to Zezas because Neirak is not spawned.")
  333. end
  334. function QuestOffer_ReporttoZezas(NPC, Spawn)
  335. OfferQuest(NPC, Spawn, Condemned)
  336. end