MurrarShar.lua 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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. Script Notes :
  7. --]]
  8. local WelcomeToNorrath = 133
  9. local TheArtOfCombat = 132
  10. local APresenceOfEvil = 131
  11. local IntoTheTaintedForest = 162
  12. local JoiningTheForwardRanks = 163
  13. local TheSourceOfEvil = 164
  14. local quest2_text = nil
  15. function spawn(NPC)
  16. ProvidesQuest(NPC, TheArtOfCombat)
  17. ProvidesQuest(NPC, APresenceOfEvil)
  18. ProvidesQuest(NPC, IntoTheTaintedForest)
  19. ProvidesQuest(NPC, JoiningTheForwardRanks)
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. conversation = CreateConversation()
  27. if not HasCompletedQuest(Spawn, TheArtOfCombat) then
  28. if HasQuest(Spawn, TheArtOfCombat) then
  29. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar010.mp3", "", "", 2562990263, 480187891, Spawn)
  30. if GetQuestStep(Spawn, TheArtOfCombat) == 4 then
  31. quest2_text = "I'm glad to hear it, for now we have need of our courage"
  32. AddConversationOption(conversation, "I defeated my sparring partner and learned about combat.", "DefeatedSparringPartner")
  33. end
  34. AddConversationOption(conversation, "Not yet.")
  35. AddConversationOption(conversation, "I would prefer to leave the island and go to Qeynos.", "LeaveIsland")
  36. StartConversation(conversation, NPC, Spawn, "Hello again, " .. GetName(Spawn) .. ". Have you passed the test that Trainer Hayl McGuinness set before you?")
  37. else
  38. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar007.mp3", "", "", 4090368410, 193364605, Spawn)
  39. AddConversationOption(conversation, "Who are you?", "WhoAreYou")
  40. AddConversationOption(conversation, "I would prefer to leave the island now.", "LeaveIsland")
  41. AddConversationOption(conversation, "I will return after I look around a bit.")
  42. StartConversation(conversation, NPC, Spawn, "Welcome, " .. GetName(Spawn) .. ", I have been anticipating your arrival. Your skills are greatly needed here at the Queen's Colony.")
  43. end
  44. elseif not HasCompletedQuest(Spawn, APresenceOfEvil) then
  45. if HasQuest(Spawn, APresenceOfEvil) then
  46. if GetQuestStep(Spawn, APresenceOfEvil) <= 5 then
  47. CurrentTaskInJournal(NPC, Spawn)
  48. else
  49. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar014.mp3", "", "", 3089319907, 3490280411, Spawn)
  50. AddConversationOption(conversation, "I agree. There's something behind all of this.", "BehindAllThis")
  51. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  52. StartConversation(conversation, NPC, Spawn, "Hmm... yes, these reports are disturbing indeed. I cannot place the source that tainted our beloved soldiers.")
  53. end
  54. else
  55. --give 2nd quest
  56. quest2_text = "Hello " .. GetName(Spawn)
  57. DefeatedSparringPartner(NPC, Spawn)
  58. end
  59. elseif not HasCompletedQuest(Spawn, IntoTheTaintedForest) then
  60. if HasQuest(Spawn, IntoTheTaintedForest) then
  61. if GetQuestStep(Spawn, IntoTheTaintedForest) <= 5 then
  62. CurrentTaskInJournal(NPC, Spawn)
  63. elseif GetQuestStep(Spawn, IntoTheTaintedForest) == 6 then
  64. Quest3Done(NPC, Spawn)
  65. end
  66. else
  67. ReadyToHelpNow(NPC, Spawn)
  68. end
  69. elseif not HasCompletedQuest(Spawn, JoiningTheForwardRanks) then
  70. if HasQuest(Spawn, JoiningTheForwardRanks) then
  71. CurrentTaskInJournal(NPC, Spawn)
  72. else
  73. SamplesExamined(Spawn, NPC)
  74. end
  75. elseif not HasCompletedQuest(Spawn, TheSourceOfEvil) then
  76. if HasQuest(Spawn, TheSourceOfEvil) then
  77. if GetQuestStep(Spawn, TheSourceOfEvil) == 9 then
  78. Quest5Done(NPC, Spawn)
  79. else
  80. CurrentTaskInJournal(NPC, Spawn)
  81. end
  82. else
  83. GoblinsAreVictims(NPC, Spawn)
  84. end
  85. else
  86. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar030.mp3", "", "", 3165714952, 1304016911, Spawn)
  87. AddConversationOption(conversation, "Farewell.")
  88. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  89. StartConversation(conversation, NPC, Spawn, "Qeynos will live for you, my friend. Your deeds here will not be forgotten. Farewell.")
  90. end
  91. end
  92. function LeaveIsland(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. conversation = CreateConversation()
  95. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar_leave000.mp3", "", "", 752128822, 2974687933, Spawn)
  96. AddConversationOption(conversation, "Where can I find Captain Varlos?", "WhereCaptainVarlos")
  97. 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.")
  98. end
  99. function WhereCaptainVarlos(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. conversation = CreateConversation()
  102. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar_leave001.mp3", "", "", 3799088988, 2590558774, Spawn)
  103. AddConversationOption(conversation, "Thank you.")
  104. 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) .. ".")
  105. end
  106. function WhoAreYou(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar001.mp3", "", "", 4276663740, 184288328, Spawn)
  110. AddConversationOption(conversation, "What is the purpose of this colony?", "PurposeColony")
  111. AddConversationOption(conversation, "We'll talk about this later.")
  112. StartConversation(conversation, NPC, Spawn, "I am Murrar Shar, General of the Royal Antonican Guard and prrrotector of Queen Antonia Bayle.")
  113. end
  114. function PurposeColony(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar002.mp3", "", "", 1723259718, 37401788, Spawn)
  118. AddConversationOption(conversation, "Tell me more about Qeynos.", "MoreAboutQeynos")
  119. AddConversationOption(conversation, "I'd like to get to work. How can I help you?", "HowCanHelp")
  120. AddConversationOption(conversation, "A pleasure to meet you, but I must go.")
  121. 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.")
  122. end
  123. function MoreAboutQeynos(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. conversation = CreateConversation()
  126. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar003.mp3", "", "", 490663804, 1186290249, Spawn)
  127. AddConversationOption(conversation, "Tell me more about Freeport.", "MoreAboutFreeport")
  128. AddConversationOption(conversation, "I'd rather not get into it.")
  129. 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.")
  130. end
  131. function MoreAboutFreeport(NPC, Spawn)
  132. FaceTarget(NPC, Spawn)
  133. conversation = CreateConversation()
  134. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar004.mp3", "", "", 920852811, 2210592101, Spawn)
  135. AddConversationOption(conversation, "I will do so. How can I be of service to the colony?", "HowCanHelp")
  136. AddConversationOption(conversation, "I'm not willing yet.")
  137. 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) .. ".")
  138. end
  139. function CurrentTaskInJournal(NPC, Spawn)
  140. FaceTarget(NPC, Spawn)
  141. conversation = CreateConversation()
  142. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar008.mp3", "", "", 2240443890, 2947060693, Spawn)
  143. AddConversationOption(conversation, "Hey, that's a nice sword. Where'd you get it?", "NiceSword")
  144. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  145. AddConversationOption(conversation, "I'll be back.")
  146. StartConversation(conversation, NPC, Spawn, "Your current task is written in your journal. Return to me when you're finished.")
  147. end
  148. function NiceSword(NPC, Spawn)
  149. FaceTarget(NPC, Spawn)
  150. conversation = CreateConversation()
  151. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar013.mp3", "", "", 271551862, 2243544574, Spawn)
  152. AddConversationOption(conversation, "Okay, I will.")
  153. 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.")
  154. end
  155. -- 1st QUEST DIALOG
  156. function HowCanHelp(NPC, Spawn)
  157. FaceTarget(NPC, Spawn)
  158. conversation = CreateConversation()
  159. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar005.mp3", "", "", 2129721282, 2945062289, Spawn)
  160. AddConversationOption(conversation, "I am ready to learn, Murrar.", "ReadyToLearn")
  161. AddConversationOption(conversation, "Not just now.")
  162. 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!")
  163. end
  164. function ReadyToLearn(NPC, Spawn)
  165. FaceTarget(NPC, Spawn)
  166. conversation = CreateConversation()
  167. if HasQuest(Spawn, WelcomeToNorrath) then
  168. SetStepComplete(Spawn, WelcomeToNorrath, 1)
  169. end
  170. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar006.mp3", "", "", 3748435458, 1580349546, Spawn)
  171. AddConversationOption(conversation, "I will do as you ask.", "OfferQuest1")
  172. AddConversationOption(conversation, "I don't have time right now.")
  173. 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.")
  174. end
  175. function DefeatedSparringPartner(NPC, Spawn)
  176. SetStepComplete(Spawn, TheArtOfCombat, 4)
  177. FaceTarget(NPC, Spawn)
  178. conversation = CreateConversation()
  179. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar011.mp3", "", "", 4256576079, 2557419428, Spawn)
  180. AddConversationOption(conversation, "I would be glad to. What can I do?", "WhatCanIDo")
  181. AddConversationOption(conversation, "Not right now.")
  182. 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?")
  183. end
  184. -- 2nd QUEST DIALOG
  185. function WhatCanIDo(NPC, Spawn)
  186. FaceTarget(NPC, Spawn)
  187. conversation = CreateConversation()
  188. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar012.mp3", "", "", 3644220831, 939546210, Spawn)
  189. AddConversationOption(conversation, "I will do so.", "OfferQuest2")
  190. AddConversationOption(conversation, "I don't have time right now.")
  191. 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.")
  192. end
  193. function BehindAllThis(NPC, Spawn)
  194. SetStepComplete(Spawn, APresenceOfEvil, 6)
  195. FaceTarget(NPC, Spawn)
  196. conversation = CreateConversation()
  197. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar015.mp3", "", "", 2203186957, 1407413043, Spawn)
  198. AddConversationOption(conversation, "I am ready to help now.", "ReadyToHelpNow")
  199. AddConversationOption(conversation, "Thanks. I'll be back.")
  200. 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.")
  201. end
  202. -- 3rd QUEST DIALOG
  203. function ReadyToHelpNow(NPC, Spawn)
  204. FaceTarget(NPC, Spawn)
  205. conversation = CreateConversation()
  206. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar016.mp3", "", "", 943121762, 902772716, Spawn)
  207. AddConversationOption(conversation, "I could do that.", "ICouldDoThat")
  208. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  209. AddConversationOption(conversation, "I can't right now.")
  210. 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.")
  211. end
  212. function ICouldDoThat(NPC, Spawn)
  213. FaceTarget(NPC, Spawn)
  214. conversation = CreateConversation()
  215. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar017.mp3", "", "", 818627273, 1220772208, Spawn)
  216. AddConversationOption(conversation, "Will do.", "OfferQuest3")
  217. AddConversationOption(conversation, "I'm too busy right now.")
  218. 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.")
  219. end
  220. function Quest3Done(NPC, Spawn)
  221. SetStepComplete(Spawn, IntoTheTaintedForest, 6)
  222. FaceTarget(NPC, Spawn)
  223. conversation = CreateConversation()
  224. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1036.mp3", "", "", 0, 0)
  225. AddConversationOption(conversation, "Thanks.")
  226. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  227. 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.")
  228. end
  229. -- 4th QUEST DIALOG
  230. function SamplesExamined(Spawn, NPC)
  231. FaceTarget(NPC, Spawn)
  232. conversation = CreateConversation()
  233. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar019.mp3", "", "", 1940724466, 1039099607, Spawn)
  234. AddConversationOption(conversation, "I'm guessing you'd like me to find out.", "dlg_19_1")
  235. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  236. AddConversationOption(conversation, "I have something else to do before I get involved.")
  237. 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?")
  238. end
  239. function dlg_19_1(NPC, Spawn)
  240. FaceTarget(NPC, Spawn)
  241. conversation = CreateConversation()
  242. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar020.mp3", "", "", 969547880, 3659700172, Spawn)
  243. AddConversationOption(conversation, "You want me to confront the Chieftain now?", "dlg_19_2")
  244. 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.")
  245. end
  246. function dlg_19_2(NPC, Spawn)
  247. FaceTarget(NPC, Spawn)
  248. conversation = CreateConversation()
  249. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar021.mp3", "", "", 2156921006, 779590907, Spawn)
  250. AddConversationOption(conversation, "Will do.", "OfferQuest4")
  251. AddConversationOption(conversation, "I can't right now.")
  252. 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.")
  253. end
  254. -- 5th QUEST DIALOG
  255. function GoblinsAreVictims(NPC, Spawn)
  256. FaceTarget(NPC, Spawn)
  257. conversation = CreateConversation()
  258. AddConversationOption(conversation, "I will speak with the Cleric at once.")
  259. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  260. 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)
  261. end
  262. function Quest5Done(NPC, Spawn)
  263. FaceTarget(NPC, Spawn)
  264. conversation = CreateConversation()
  265. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar028.mp3", "", "", 1703190849, 2791144430, Spawn)
  266. AddConversationOption(conversation, "It was nothing, really.", "ItWasNothingReally")
  267. AddConversationOption(conversation, "How do I leave the island?", "LeaveIsland")
  268. 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.")
  269. end
  270. function ItWasNothingReally(NPC, Spawn)
  271. SetStepComplete(Spawn, TheSourceOfEvil, 9)
  272. FaceTarget(NPC, Spawn)
  273. conversation = CreateConversation()
  274. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/murrar_shar/tutorial_island02_revamp/quests/citizenship/murrarshar/murrarshar029.mp3", "", "", 3787491059, 860331081, Spawn)
  275. AddConversationOption(conversation, "Thanks.")
  276. 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.")
  277. end
  278. --------------------------------------------------------------------------------------------------------------------
  279. -- OFFER QUESTS
  280. --------------------------------------------------------------------------------------------------------------------
  281. function OfferQuest1(NPC, Spawn)
  282. OfferQuest(NPC, Spawn, TheArtOfCombat)
  283. end
  284. function OfferQuest2(NPC, Spawn)
  285. OfferQuest(NPC, Spawn, APresenceOfEvil)
  286. end
  287. function OfferQuest3(NPC, Spawn)
  288. OfferQuest(NPC, Spawn, IntoTheTaintedForest)
  289. end
  290. function OfferQuest4(NPC, Spawn)
  291. OfferQuest(NPC, Spawn, JoiningTheForwardRanks)
  292. end