9
3

MatronoftheNursery.lua 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. --[[
  2. Script Name : SpawnScripts/GreaterFaydark/MatronoftheNursery.lua
  3. Script Purpose : Matron of the Nursery
  4. Script Author : John Adams
  5. Script Date : 2009.02.05
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericVoiceOvers.lua")
  9. local QUEST_1 = 83
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 15, "inRange", "leaveRange")
  12. ProvidesQuest(NPC, QUEST_1)
  13. end
  14. function inRange(NPC, Spawn)
  15. if not HasCompletedQuest(Spawn, QUEST_1) and not HasQuest(Spawn, QUEST_1) then
  16. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/quest/quest_matron_of_the_bloom_nursery_help_66ff3ea.mp3", "Please! We need your help!", "wave", 1753177946, 2265055232, Spawn)
  17. end
  18. end
  19. function leaveRange(NPC, Spawn)
  20. end
  21. function hailed(NPC, Spawn)
  22. GenericHail(NPC, Spawn)
  23. if HasCompletedQuest(Spawn, QUEST_1) then
  24. elseif HasQuest(Spawn, QUEST_1) then
  25. onQuest1(NPC, Spawn)
  26. else
  27. beforeQuest1_1(NPC, Spawn)
  28. end
  29. end
  30. --[[ Quest 1 ]]--
  31. function beforeQuest1_1(NPC, Spawn)
  32. local conversation = CreateConversation()
  33. FaceTarget(NPC, Spawn)
  34. AddConversationOption(conversation, "Let me help take care of this. Where are the shrumblers?", "beforeQuest1_2")
  35. AddConversationOption(conversation, "What is this place?", "beforeQuest1_3")
  36. AddConversationOption(conversation, "I can't assist right now. I'll return another time.")
  37. StartConversation(conversation, NPC, Spawn, "I am so pleased that you answered my summons. Look at what has become of the Nursery! These shrumblers appeared suddenly, and have been devouring the roots of our precious flowers! The flowers could all wither and perish!")
  38. end
  39. function beforeQuest1_2(NPC, Spawn)
  40. local conversation = CreateConversation()
  41. FaceTarget(NPC, Spawn)
  42. AddConversationOption(conversation, "I will see it done", "offerQuest1")
  43. AddConversationOption(conversation, "Perhaps another time. Farewell!")
  44. StartConversation(conversation, NPC, Spawn, "Look around the base of the flowers here in the Nursery. Destroy any of the shrumbler hatchlings you find!")
  45. end
  46. function beforeQuest1_3(NPC, Spawn)
  47. local conversation = CreateConversation()
  48. FaceTarget(NPC, Spawn)
  49. AddConversationOption(conversation, "So these are all unborn fae? If the flowers die, what becomes of them?", "beforeQuest1_4")
  50. AddConversationOption(conversation, "I see. Then it is crucial I take care of these shrumblers.", "beforeQuest1_2")
  51. AddConversationOption(conversation, "Maybe another time. Farewell.")
  52. StartConversation(conversation, NPC, Spawn, "These are the budding flowers for newborn fae, and this is the Nursery, in which we tend and care for them. When a fae dies naturally, the come a beautiful delicate flower, housing the spirit of the departed fae.")
  53. end
  54. function beforeQuest1_4(NPC, Spawn)
  55. local conversation = CreateConversation()
  56. FaceTarget(NPC, Spawn)
  57. AddConversationOption(conversation, "I will. Where can I find the shrumblers?", "beforeQuest1_2")
  58. AddConversationOption(conversation, "It seems like too big of a job for me. Farewell.")
  59. StartConversation(conversation, NPC, Spawn, "The unborn fae will die, and all of the collective knowledge of their spirit will be lost forever. Please, you must help us prevent the lose of any more fae spirits!")
  60. end
  61. function offerQuest1(NPC, Spawn)
  62. OfferQuest(NPC, Spawn, QUEST_1)
  63. end
  64. function onQuest1(NPC, Spawn)
  65. local conversation = CreateConversation()
  66. FaceTarget(NPC, Spawn)
  67. if (GetQuestStep(Spawn, QUEST_1) == 2) then
  68. else
  69. StartConversation(conversation, NPC, Spawn, "Please hurry with your task.")
  70. end
  71. end
  72. --[[
  73. function spawn(NPC)
  74. SetPlayerProximityFunction(NPC, 20, "inRange", "leaveRange")
  75. ProvidesQuest(NPC, 133)
  76. ProvidesQuest(NPC, 134)
  77. ProvidesQuest(NPC, 135)
  78. ProvidesQuest(NPC, 136)
  79. ProvidesQuest(NPC, 137)
  80. end
  81. function respawn(NPC)
  82. spawn(NPC)
  83. end
  84. function InRange(NPC, Spawn)
  85. if HasQuest(Spawn, 133) then
  86. -- she only shouts for help when you have not done her quest line
  87. elseif HasCompletedQuest(Spawn, 133) then
  88. -- she only shouts for help when you have not done her quest line
  89. else
  90. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/quest/quest_matron_of_the_bloom_nursery_help_66ff3ea.mp3", "Please! We need your help!", "wave", 1753177946, 2265055232, Spawn)
  91. end
  92. end
  93. function LeaveRange(NPC, Spawn)
  94. end
  95. function hailed(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. conversation = CreateConversation()
  98. if HasCompletedQuest(Spawn, 133) then
  99. if HasCompletedQuest(Spawn, 134) then
  100. if HasCompletedQuest(Spawn, 135) then
  101. if HasCompletedQuest(Spawn, 136) then
  102. if HasCompletedQuest(Spawn, 137) then
  103. QuestsComplete(NPC, Spawn)
  104. elseif HasQuest(Spawn, 137) then
  105. if GetQuestStep(Spawn, 137) == 1 then
  106. -- quest not complete yet
  107. Say(NPC, "Please finish your task", Spawn)
  108. elseif GetQuestStep == 2 then
  109. -- handing in quest
  110. SetStepComplete(Spawn, 137, 2)
  111. Quest5Done(NPC, Spawn)
  112. end
  113. else
  114. -- does not have quest yet
  115. MessageFromTheMatron(NPC, Spawn)
  116. end
  117. elseif HasQuest(Spawn, 136) then
  118. if GetQuestStep(Spawn, 136) == 1 then
  119. -- quest not complete yet
  120. FaceTarget(NPC, Spawn)
  121. conversation = CreateConversation()
  122. AddConversationOption(conversation, "No, I have not gathered them yet.")
  123. StartConversation(conversation, NPC, Spawn, "Welcome back, " .. GetName(Spawn) .. ". Were you able to gather the healing herbs I need?")
  124. elseif GetQuestStep(Spawn, 136) == 2 then
  125. -- handing in quest
  126. SetStepComplete(Spawn, 136, 2)
  127. Quest4Done(NPC, Spawn)
  128. end
  129. else
  130. -- does not have quest yet
  131. HerbsofHealing(NPC, Spawn)
  132. end
  133. elseif HasQuest(Spawn, 135) then
  134. if GetQuestStep(Spawn, 135) == 1 then
  135. -- quest not complete yet
  136. FaceTarget(NPC, Spawn)
  137. conversation = CreateConversation()
  138. PlayFavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery009.mp3", "", "", 768214181, 1308439553, Spawn)
  139. AddConversationOption(conversation, "No, not yet.")
  140. StartConversation(conversation, NPC, Spawn, "Were you able to find out what the grobins at the pond were up to?")
  141. elseif GetQuestStep(Spawn, 135) == 2 then
  142. -- handing in quest
  143. SetStepComplete(Spawn, 135, 2)
  144. Quest3Done(NPC, Spawn)
  145. end
  146. else
  147. -- does not have quest yet
  148. GrobinTroubleAtThePond(NPC, Spawn)
  149. end
  150. elseif HasQuest(Spawn, 134) then
  151. if GetQuestStep(Spawn, 134) == 1 then
  152. -- quest not yet complete
  153. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery006.mp3", "", "", 3086001028, 2261685856, Spawn)
  154. AddConversationOption(conversation, "I am not sure yet.")
  155. StartConversation(conversation, NPC, Spawn, "Are the grobin scouts still out there?")
  156. elseif GetQuestStep(Spawn, 134) == 2 then
  157. -- handing in quest
  158. SetStepComplete(Spawn, 134, 2)
  159. Quest2Done(NPC, Spawn)
  160. end
  161. else
  162. -- does not have quest
  163. RunningOffTheGrobinScouts(NPC, Spawn)
  164. end
  165. elseif HasQuest(Spawn, 133) then
  166. if GetQuestStep(Spawn, 133) == 1 then
  167. -- quest not complete yet
  168. Say(NPC, "Please! You must get rid of the shrumblers before they eat the spirit blooms!", Spawn)
  169. elseif GetQuestStep(Spawn, 133) == 2 then
  170. -- handing in the quest
  171. SetStepComplete(Spawn, 133, 2)
  172. Quest1Done(NPC, Spawn)
  173. end
  174. else
  175. -- does not have quest
  176. Infestation(NPC, Spawn)
  177. end
  178. end
  179. -------------------------------------------------------------------------------
  180. ---------- Quest Dialogs ----------
  181. -------------------------------------------------------------------------------
  182. function Infestation(NPC, Spawn)
  183. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery001.mp3", "", "", 3995853929, 1976845236, Spawn)
  184. AddConversationOption(conversation, "Yes, I'll get rid of the shrumblers.", "Infestation_dlg2")
  185. AddConversationOption(conversation, "It's not my problem.")
  186. StartConversation(conversation, NPC, Spawn, "Thank Tunare you're here! There's little time to explain. An infestation of shrumblers has appeared in the nursery and they're eating the spirit blooms! Can you help us?")
  187. end
  188. function Infestation_dlg2(NPC, Spawn)
  189. FaceTarget(NPC, Spawn)
  190. conversation = CreateConversation()
  191. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_bloom_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery002.mp3", "", "", 1028015490, 2786542994, Spawn)
  192. AddConversationOption(conversation, "I'll be safe.", "OfferQuest1")
  193. StartConversation(conversation, NPC, Spawn, "The spirit blooms grow both to the east and west of here. Please be careful!")
  194. end
  195. function RunningOffTheGrobinScouts(NPC, Spawn)
  196. FaceTarget(NPC, Spawn)
  197. conversation = CreateConversation()
  198. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery004.mp3", "", "", 849551346, 2426315385, Spawn)
  199. AddConversationOption(conversation, "Sure, I'll check things out.", "OfferQuest2")
  200. AddConversationOption(conversation, "I already helped you once, goodbye.")
  201. StartConversation(conversation, NPC, Spawn, "The shrumblers came from the direction of the pond just to the southwest. Vile grobin scouts were recently seen in that area. I know it is much to ask, but could you check out the area and get rid of any grobin scouts that you find?")
  202. end
  203. function GrobinTroubleAtThePond(NPC, Spawn)
  204. FaceTarget(NPC, Spawn)
  205. conversation = CreateConversation()
  206. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery007.mp3", "", "", 155606057, 734892147, Spawn)
  207. AddConversationOption(conversation, "I'll stop them.", "OfferQuest3")
  208. AddConversationOption(conversation, "I've helped you enough, goodbye.")
  209. StartConversation(conversation, NPC, Spawn, "You noticed the grobins putting something in the pond's water? This is most troubling. The creatures and plants of this area depend on that enchanted water to grow big and strong! The grobins must be stopped or many things will suffer.")
  210. end
  211. function HerbsofHealing(NPC, Spawn)
  212. FaceTarget(NPC, Spawn)
  213. conversation = CreateConversation()
  214. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery010.mp3", "", "", 2687383899, 130888406, Spawn)
  215. AddConversationOption(conversation, "What is wrong?", "HerbsofHealing_dlg2")
  216. StartConversation(conversation, NPC, Spawn, "So the grobin were behind the infestation! I knew it! Putting those eggs in the enchanted pond would make the shrumblers grow incredibly quick and strong. Hmm, I wonder where they were getting all those eggs, though. That question will have to wait, however. I've discovered a greater problem.")
  217. end
  218. function HerbsofHealing_dlg2(NPC, Spawn)
  219. FaceTarget(NPC, Spawn)
  220. conversation = CreateConversation()
  221. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery011.mp3", "", "", 1314428688, 3908522277, Spawn)
  222. AddConversationOption(conversation, "I can get what you need.", "HerbsofHealing_dlg3")
  223. AddConversationOption(conversation, "I've done enough to help, goodbye.")
  224. StartConversation(conversation, NPC, Spawn, "It seems the shrumblers did more damage to the spirit blooms than I previously thought. I need to heal the blooms but I don't have the components with me.")
  225. end
  226. function HerbsofHealing_dlg3(NPC, Spawn)
  227. FaceTarget(NPC, Spawn)
  228. conversation = CreateConversation()
  229. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery011.mp3", "", "", 1314428688, 3908522277, Spawn)
  230. AddConversationOption(conversation, "I'll go gather some.", "OfferQuest4")
  231. StartConversation(conversation, NPC, Spawn, "Thank you, " .. GetName(Spawn) .. ". The herbs can be harvested from the faeicia plants not far from here to the west.")
  232. end
  233. function MessageFromTheMatron(NPC, Spawn)
  234. FaceTarget(NPC, Spawn)
  235. conversation = CreateConversation()
  236. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery014.mp3", "", "", 1963879689, 3046606981, Spawn)
  237. AddConversationOption(conversation, "You are welcome.", "MessageFromTheMatron_dlg_2")
  238. StartConversation(conversation, NPC, Spawn, "Very good. I'll begin the healing of the spirit blooms. Thank you so much for all you've done. I don't know what we would've done if you hadn't awoken when you did.")
  239. end
  240. function MessageFromTheMatron_dlg_2(NPC, Spawn)
  241. FaceTarget(NPC, Spawn)
  242. conversation = CreateConversation()
  243. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery015.mp3", "", "", 2641012186, 3622995691, Spawn)
  244. AddConversationOption(conversation, "I can take the message for you.", "MessageFromTheMatron_dlg_3")
  245. AddConversationOption(conversation, "Forget it, I've helped enough.")
  246. StartConversation(conversation, NPC, Spawn, "Before you go, can you do one last thing for me? I fear the grobins will try attacking the spirit blooms again. I need you to deliver a message to Sentry Trillis and warn him about the grobins.")
  247. end
  248. function MessageFromTheMatron_dlg_3(NPC, Spawn)
  249. FaceTarget(NPC, Spawn)
  250. conversation = CreateConversation()
  251. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery016.mp3", "", "", 3997346506, 1167918210, Spawn)
  252. AddConversationOption(conversation, "Goodbye, Matron of the Nursery.", "OfferQuest5")
  253. StartConversation(conversation, NPC, Spawn, "Thank you, .. GetName(Spawn) .. . May Tunare bless you for all you have done! Now I have some spirit blooms to heal.")
  254. end
  255. -------------------------------------------------------------------------------
  256. ---------- Offer Quests ----------
  257. -------------------------------------------------------------------------------
  258. function OfferQuest1(NPC, Spawn)
  259. OfferQuest(NPC, Spawn, 133)
  260. end
  261. function OfferQuest2(NPC, Spawn)
  262. OfferQuest(NPC, Spawn, 134)
  263. end
  264. function OfferQuest3(NPC, Spawn)
  265. OfferQuest(NPC, Spawn, 135)
  266. end
  267. function OfferQuest4(NPC, Spawn)
  268. OfferQuest(NPC, Spawn, 136)
  269. end
  270. function OfferQuest5(NPC, Spawn)
  271. OfferQuest(NPC, Spawn, 137)
  272. end
  273. -------------------------------------------------------------------------------
  274. ---------- Quest is done ----------
  275. -------------------------------------------------------------------------------
  276. function Quest1Done(NPC, Spawn)
  277. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_bloom_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery003.mp3", "", "", 3759250787, 3072440842, Spawn)
  278. AddConversationOption(conversation, "Where did they come from?", "RunningOffTheGrobinScouts")
  279. AddConversationOption(conversation, "Have a good day, goodbye.")
  280. StartConversation(conversation, NPC, Spawn, "Thank you so much! The spirit blooms should be fine now. It was strange... we've never seen shrumblers that large or in such great numbers.")
  281. end
  282. function Quest2Done(NPC, Spawn)
  283. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery006.mp3", "", "", 3086001028, 2261685856, Spawn)
  284. AddConversationOption(conversation, "I ran a few of them off.. I also saw some grobins putting something in the water of the pond.", "GrobinTroubleAtThePond")
  285. AddConversationOption(conversation, "I am not sure yet.")
  286. StartConversation(conversation, NPC, Spawn, "Are the grobin scouts still out there?")
  287. end
  288. function Quest3Done(NPC, Spawn)
  289. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery009.mp3", "", "", 768214181, 1308439553, Spawn)
  290. AddConversationOption(conversation, "Yes. They had jars of shrumbler eggs that they were pouring into the pond.", "HerbsofHealing")
  291. AddConversationOption(conversation, "No, not yet.")
  292. StartConversation(conversation, NPC, Spawn, "Were you able to find out what the grobins at the pond were up to?")
  293. end
  294. function Quest4Done(NPC, Spawn)
  295. PlayFlavor(NPC, "voiceover/english/exp03_questvo2/matron_of_the_nursery/_exp03/exp03_rgn_greater_faydark/matron_of_the_nursery/matron_of_the_nursery013.mp3", "", "", 793594959, 1637646288, Spawn)
  296. AddConversationOption(conversation, "Yes, I have them right here.", "MessageFromTheMatron")
  297. AddConversationOption(conversation, "No, I have not gathered them yet.")
  298. StartConversation(conversation, NPC, Spawn, "Welcome back, .. GetName(Spawn) .. . Were you able to gather the healing herbs I need?")
  299. end
  300. --]]