MurrarShar.lua 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/MurrarShar.lua
  3. Script Purpose : Murrar Shar <Emissary of Queen Antonia Bayle>
  4. Script Author : Zcoretri
  5. Script Date : 2015.07.30
  6. Modified Date : 2020.04.20
  7. Modified by : premierio015
  8. Modified Notes: Added animations
  9. Script Notes :
  10. --]]
  11. local WelcomeToNorrath = 133
  12. local TheArtOfCombat = 132
  13. local APresenceOfEvil = 131
  14. local IntoTheTaintedForest = 162
  15. local JoiningTheForwardRanks = 163
  16. local TheSourceOfEvil = 164
  17. local quest2_text = nil
  18. function spawn(NPC)
  19. ProvidesQuest(NPC, TheArtOfCombat)
  20. ProvidesQuest(NPC, APresenceOfEvil)
  21. ProvidesQuest(NPC, IntoTheTaintedForest)
  22. ProvidesQuest(NPC, JoiningTheForwardRanks)
  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 HasCompletedQuest(Spawn, TheArtOfCombat) then
  31. if HasQuest(Spawn, TheArtOfCombat) then
  32. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar010.mp3", "", "nod", 2562990263, 480187891, Spawn)
  33. if GetQuestStep(Spawn, TheArtOfCombat) == 4 then
  34. quest2_text = "I'm glad to hear it, for now we have need of our courage"
  35. AddConversationOption(conversation, "I defeated my sparring partner and learned about combat.", "DefeatedSparringPartner")
  36. end
  37. AddConversationOption(conversation, "Not yet.")
  38. AddConversationOption(conversation, "I would prefer to leave the island and go to Qeynos.", "LeaveIsland")
  39. StartConversation(conversation, NPC, Spawn, "Hello again, " .. GetName(Spawn) .. ". Have you passed the test that Trainer Hayl McGuinness set before you?")
  40. else
  41. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar007.mp3", "", "nod", 4090368410, 193364605, Spawn)
  42. AddConversationOption(conversation, "Who are you?", "WhoAreYou")
  43. AddConversationOption(conversation, "I would prefer to leave the island now.", "LeaveIsland")
  44. AddConversationOption(conversation, "I will return after I look around a bit.")
  45. StartConversation(conversation, NPC, Spawn, "Welcome, " .. GetName(Spawn) .. ", I have been anticipating your arrival. Your skills are greatly needed here at the Queen's Colony.")
  46. end
  47. elseif not HasCompletedQuest(Spawn, APresenceOfEvil) then
  48. if HasQuest(Spawn, APresenceOfEvil) then
  49. if GetQuestStep(Spawn, APresenceOfEvil) <= 5 then
  50. CurrentTaskInJournal(NPC, Spawn)
  51. else
  52. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar014.mp3", "", "", 3089319907, 3490280411, Spawn)
  53. AddConversationOption(conversation, "I agree. There's something behind all of this.", "BehindAllThis")
  54. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  55. StartConversation(conversation, NPC, Spawn, "Hmm... yes, these reports are disturbing indeed. I cannot place the source that tainted our beloved soldiers.")
  56. end
  57. else
  58. --give 2nd quest
  59. quest2_text = "Hello " .. GetName(Spawn)
  60. DefeatedSparringPartner(NPC, Spawn)
  61. end
  62. elseif not HasCompletedQuest(Spawn, IntoTheTaintedForest) then
  63. if HasQuest(Spawn, IntoTheTaintedForest) then
  64. if GetQuestStep(Spawn, IntoTheTaintedForest) <= 5 then
  65. CurrentTaskInJournal(NPC, Spawn)
  66. elseif GetQuestStep(Spawn, IntoTheTaintedForest) == 6 then
  67. Quest3Done(NPC, Spawn)
  68. end
  69. else
  70. ReadyToHelpNow(NPC, Spawn)
  71. end
  72. elseif not HasCompletedQuest(Spawn, JoiningTheForwardRanks) then
  73. if HasQuest(Spawn, JoiningTheForwardRanks) then
  74. CurrentTaskInJournal(NPC, Spawn)
  75. else
  76. SamplesExamined(Spawn, NPC)
  77. end
  78. elseif not HasCompletedQuest(Spawn, TheSourceOfEvil) then
  79. if HasQuest(Spawn, TheSourceOfEvil) then
  80. if GetQuestStep(Spawn, TheSourceOfEvil) == 9 then
  81. Quest5Done(NPC, Spawn)
  82. else
  83. CurrentTaskInJournal(NPC, Spawn)
  84. end
  85. else
  86. GoblinsAreVictims(NPC, Spawn)
  87. end
  88. else
  89. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar030.mp3", "", "", 3165714952, 1304016911, Spawn)
  90. AddConversationOption(conversation, "Farewell.")
  91. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  92. StartConversation(conversation, NPC, Spawn, "Qeynos will live for you, my friend. Your deeds here will not be forgotten. Farewell.")
  93. end
  94. end
  95. function LeaveIsland(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. conversation = CreateConversation()
  98. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar_leave000.mp3", "", "", 752128822, 2974687933, Spawn)
  99. AddConversationOption(conversation, "Where can I find Captain Varlos?", "WhereCaptainVarlos")
  100. StartConversation(conversation, NPC, Spawn, "If you feel you are ready to leave the island you can do so at any time. We have an arrangement with Captain Varlos. He will take you to the fair city of Qeynos.")
  101. end
  102. function WhereCaptainVarlos(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. conversation = CreateConversation()
  105. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar_leave001.mp3", "", "", 3799088988, 2590558774, Spawn)
  106. AddConversationOption(conversation, "Thank you.")
  107. StartConversation(conversation, NPC, Spawn, "Head through the south archway to the beach. Once there, you will find Varlos' ship on the dock. He should be aboard the ship. I hope you enjoy Qeynos, " .. GetName(Spawn) .. ".")
  108. end
  109. function WhoAreYou(NPC, Spawn)
  110. FaceTarget(NPC, Spawn)
  111. conversation = CreateConversation()
  112. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar001.mp3", "", "bow", 4276663740, 184288328, Spawn)
  113. AddConversationOption(conversation, "What is the purpose of this colony?", "PurposeColony")
  114. AddConversationOption(conversation, "We'll talk about this later.")
  115. StartConversation(conversation, NPC, Spawn, "I am Murrar Shar, General of the Royal Antonican Guard and prrrotector of Queen Antonia Bayle.")
  116. end
  117. function PurposeColony(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. conversation = CreateConversation()
  120. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar002.mp3", "", "nod", 1723259718, 37401788, Spawn)
  121. AddConversationOption(conversation, "Tell me more about Qeynos.", "MoreAboutQeynos")
  122. AddConversationOption(conversation, "I'd like to get to work. How can I help you?", "HowCanHelp")
  123. AddConversationOption(conversation, "A pleasure to meet you, but I must go.")
  124. StartConversation(conversation, NPC, Spawn, "The Queen's Colony was established as a training ground for prospective citizens of Qeynos. Our great city needs valiant defenders.")
  125. end
  126. function MoreAboutQeynos(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. conversation = CreateConversation()
  129. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar003.mp3", "", "agree", 490663804, 1186290249, Spawn)
  130. AddConversationOption(conversation, "Tell me more about Freeport.", "MoreAboutFreeport")
  131. AddConversationOption(conversation, "I'd rather not get into it.")
  132. StartConversation(conversation, NPC, Spawn, "Qeynos is a grand city that stands on the western shores of the continent Karan. It is a place where truth and justice are valued above all else. It is ruled by the brave and noble Queen Antonia Bayle. Our kingdom is a bright light that stands against the dark empire of Freeport.")
  133. end
  134. function MoreAboutFreeport(NPC, Spawn)
  135. FaceTarget(NPC, Spawn)
  136. conversation = CreateConversation()
  137. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar004.mp3", "", "no", 920852811, 2210592101, Spawn)
  138. AddConversationOption(conversation, "I will do so. How can I be of service to the colony?", "HowCanHelp")
  139. AddConversationOption(conversation, "I'm not willing yet.")
  140. StartConversation(conversation, NPC, Spawn, "Freeport is a city of cruelty and malice, governed by its selfish Overlord, Lucan D'Lere. He is a dangerous madman who seeks to conquer Norrath and hold us all in his iron grip. Beware his lies, " .. GetName(Spawn) .. ".")
  141. end
  142. function CurrentTaskInJournal(NPC, Spawn)
  143. FaceTarget(NPC, Spawn)
  144. conversation = CreateConversation()
  145. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar008.mp3", "", "", 2240443890, 2947060693, Spawn)
  146. AddConversationOption(conversation, "Hey, that's a nice sword. Where'd you get it?", "NiceSword")
  147. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  148. AddConversationOption(conversation, "I'll be back.")
  149. StartConversation(conversation, NPC, Spawn, "Your current task is written in your journal. Return to me when you're finished.")
  150. end
  151. function NiceSword(NPC, Spawn)
  152. FaceTarget(NPC, Spawn)
  153. conversation = CreateConversation()
  154. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar013.mp3", "", "", 271551862, 2243544574, Spawn)
  155. AddConversationOption(conversation, "Okay, I will.")
  156. StartConversation(conversation, NPC, Spawn, "Thank you for noticing. They call this one Berik, Sword of Thunder. I earned it in a dungeon in Antonica known as Stormhold. Work hard and you might find such a prize someday.")
  157. end
  158. -- 1st QUEST DIALOG
  159. function HowCanHelp(NPC, Spawn)
  160. FaceTarget(NPC, Spawn)
  161. conversation = CreateConversation()
  162. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar005.mp3", "", "orate", 2129721282, 2945062289, Spawn)
  163. AddConversationOption(conversation, "I am ready to learn, Murrar.", "ReadyToLearn")
  164. AddConversationOption(conversation, "Not just now.")
  165. StartConversation(conversation, NPC, Spawn, "Ahh, your future is as bright as your heart, but there are perils in this world that only the mightiest of adventurers may overcome. Live for Qeynos and Qeynos will live for you!")
  166. end
  167. function ReadyToLearn(NPC, Spawn)
  168. FaceTarget(NPC, Spawn)
  169. conversation = CreateConversation()
  170. if HasQuest(Spawn, WelcomeToNorrath) then
  171. SetStepComplete(Spawn, WelcomeToNorrath, 1)
  172. end
  173. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar006.mp3", "", "", 3748435458, 1580349546, Spawn)
  174. AddConversationOption(conversation, "I will do as you ask.", "OfferQuest1")
  175. AddConversationOption(conversation, "I don't have time right now.")
  176. StartConversation(conversation, NPC, Spawn, "I am very glad to hear it! Go and speak to Trainer Hayl McGuinness, just northwest of here near the archway. I've written his name in your journal. He will teach you the basics of combat.")
  177. end
  178. function DefeatedSparringPartner(NPC, Spawn)
  179. SetStepComplete(Spawn, TheArtOfCombat, 4)
  180. FaceTarget(NPC, Spawn)
  181. conversation = CreateConversation()
  182. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar011.mp3", "", "", 4256576079, 2557419428, Spawn)
  183. AddConversationOption(conversation, "I would be glad to. What can I do?", "WhatCanIDo")
  184. AddConversationOption(conversation, "Not right now.")
  185. StartConversation(conversation, NPC, Spawn, quest2_text .. ". Until recently, our colony lived in peace with a clan of goblins known as the Sapswill that reside on the other side of the island. But for some unknown reason, they have begun to attack us. We need to begin an investigation at once to get to the bottom of this. Will you help?")
  186. end
  187. -- 2nd QUEST DIALOG
  188. function WhatCanIDo(NPC, Spawn)
  189. FaceTarget(NPC, Spawn)
  190. conversation = CreateConversation()
  191. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar012.mp3", "", "", 3644220831, 939546210, Spawn)
  192. AddConversationOption(conversation, "I will do so.", "OfferQuest2")
  193. AddConversationOption(conversation, "I don't have time right now.")
  194. StartConversation(conversation, NPC, Spawn, "The goblins have started attacking us from the west. We're not sure what sparked the uprising, but they are now relentlessly trying to invade the colony. I need you to go see how our defenders are doing at the west gate and gather any information you can. Speak with Seargant Haggus at the barricades and see what you can do to assist him.")
  195. end
  196. function BehindAllThis(NPC, Spawn)
  197. SetStepComplete(Spawn, APresenceOfEvil, 6)
  198. FaceTarget(NPC, Spawn)
  199. conversation = CreateConversation()
  200. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar015.mp3", "", "", 2203186957, 1407413043, Spawn)
  201. AddConversationOption(conversation, "I am ready to help now.", "ReadyToHelpNow")
  202. AddConversationOption(conversation, "Thanks. I'll be back.")
  203. StartConversation(conversation, NPC, Spawn, "I can assure you that we will find out though. In the meantime, here is a reward for your continued assistance.")
  204. end
  205. -- 3rd QUEST DIALOG
  206. function ReadyToHelpNow(NPC, Spawn)
  207. FaceTarget(NPC, Spawn)
  208. conversation = CreateConversation()
  209. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar016.mp3", "", "", 943121762, 902772716, Spawn)
  210. AddConversationOption(conversation, "I could do that.", "ICouldDoThat")
  211. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  212. AddConversationOption(conversation, "I can't right now.")
  213. StartConversation(conversation, NPC, Spawn, "Ready to continue eh? The dead soldiers were resurrected by something most evil and bent on destroying the Colony. Recently the wildlife on the island has felt the effects of the evil as well. I must get some samples from those creatures, so that I can examine them more closely.")
  214. end
  215. function ICouldDoThat(NPC, Spawn)
  216. FaceTarget(NPC, Spawn)
  217. conversation = CreateConversation()
  218. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar017.mp3", "", "", 818627273, 1220772208, Spawn)
  219. AddConversationOption(conversation, "Will do.", "OfferQuest3")
  220. AddConversationOption(conversation, "I'm too busy right now.")
  221. StartConversation(conversation, NPC, Spawn, "Thank you, but I have already sent a skilled hunter to do the job. Maybe you should check up on him though and make sure things are going well. He's been out in the Tainted Forest for a while now. Look for Sha'Dur up the stairs on the north side of the Sunset Meadow.")
  222. end
  223. function Quest3Done(NPC, Spawn)
  224. SetStepComplete(Spawn, IntoTheTaintedForest, 6)
  225. FaceTarget(NPC, Spawn)
  226. conversation = CreateConversation()
  227. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1036.mp3", "", "", 0, 0)
  228. AddConversationOption(conversation, "Thanks.")
  229. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  230. StartConversation(conversation, NPC, Spawn, "Good, the samples. I'll need to consult with Myrrin about them, but in the mmmmeantime here is your reward. Come back to me later and hopefully these samples will have prroven worthy.")
  231. end
  232. -- 4th QUEST DIALOG
  233. function SamplesExamined(Spawn, NPC)
  234. FaceTarget(NPC, Spawn)
  235. conversation = CreateConversation()
  236. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar019.mp3", "", "", 1940724466, 1039099607, Spawn)
  237. AddConversationOption(conversation, "I'm guessing you'd like me to find out.", "dlg_19_1")
  238. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  239. AddConversationOption(conversation, "I have something else to do before I get involved.")
  240. StartConversation(conversation, NPC, Spawn, "The samples have been examined and my worst fear has been realized. A poisonous mist clings to the tissue, eating and controlling it. I suspect necromancy, but from whom?")
  241. end
  242. function dlg_19_1(NPC, Spawn)
  243. FaceTarget(NPC, Spawn)
  244. conversation = CreateConversation()
  245. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar020.mp3", "", "", 969547880, 3659700172, Spawn)
  246. AddConversationOption(conversation, "You want me to confront the Chieftain now?", "dlg_19_2")
  247. StartConversation(conversation, NPC, Spawn, "That I do. My best guess is that the goblin leader, High Chieftain Grexx, is involved. He is the most powerful and influential figure to the goblins. If he were somehow corrupted, the goblins would follow any orders he demanded.")
  248. end
  249. function dlg_19_2(NPC, Spawn)
  250. FaceTarget(NPC, Spawn)
  251. conversation = CreateConversation()
  252. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar021.mp3", "", "", 2156921006, 779590907, Spawn)
  253. AddConversationOption(conversation, "Will do.", "OfferQuest4")
  254. AddConversationOption(conversation, "I can't right now.")
  255. StartConversation(conversation, NPC, Spawn, "First things first ," .. GetName(Spawn) .. ". We need to break through to the goblin village. I have assigned this duty to Cleric Mara'Vaen. Seek her out and see how you can help.")
  256. end
  257. -- 5th QUEST DIALOG
  258. function GoblinsAreVictims(NPC, Spawn)
  259. FaceTarget(NPC, Spawn)
  260. conversation = CreateConversation()
  261. AddConversationOption(conversation, "I will speak with the Cleric at once.")
  262. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  263. StartConversation(conversation, NPC, Spawn, "The scouts that broke through to the Sapswill Village report that the goblins themselves are victims of the evil. Cleric Mara'Vaen will doubtless have the most recent information on this development.", Spawn)
  264. end
  265. function Quest5Done(NPC, Spawn)
  266. FaceTarget(NPC, Spawn)
  267. conversation = CreateConversation()
  268. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar028.mp3", "", "", 1703190849, 2791144430, Spawn)
  269. AddConversationOption(conversation, "It was nothing, really.", "ItWasNothingReally")
  270. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  271. StartConversation(conversation, NPC, Spawn, "By the glory of Qeynos, you've done it! The source of evil is gone and the island is saved. You are on a path to greatness, " .. GetName(Spawn) .. ". Your deeds here shall not be forgotten and I forsee many adventures ahead of you.")
  272. end
  273. function ItWasNothingReally(NPC, Spawn)
  274. SetStepComplete(Spawn, TheSourceOfEvil, 9)
  275. FaceTarget(NPC, Spawn)
  276. conversation = CreateConversation()
  277. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar029.mp3", "", "", 3787491059, 860331081, Spawn)
  278. AddConversationOption(conversation, "Thanks.")
  279. StartConversation(conversation, NPC, Spawn, "Nothing! I will tell the Queen personally of your bravery. Take this reward as a gift from Qeynos. Feel free to head to Qeynos at anytime, or stay and hone your skills. Speak with Captain Varlos on the docks when you wish to leave.")
  280. end
  281. --------------------------------------------------------------------------------------------------------------------
  282. -- OFFER QUESTS
  283. --------------------------------------------------------------------------------------------------------------------
  284. function OfferQuest1(NPC, Spawn)
  285. OfferQuest(NPC, Spawn, TheArtOfCombat)
  286. end
  287. function OfferQuest2(NPC, Spawn)
  288. OfferQuest(NPC, Spawn, APresenceOfEvil)
  289. end
  290. function OfferQuest3(NPC, Spawn)
  291. OfferQuest(NPC, Spawn, IntoTheTaintedForest)
  292. end
  293. function OfferQuest4(NPC, Spawn)
  294. OfferQuest(NPC, Spawn, JoiningTheForwardRanks)
  295. end