Aelis.lua 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/Aelis.lua
  3. Script Purpose : Aelis <Wood Elf Mentor>
  4. Script Author : Scatman
  5. Script Date : 2000.15.09
  6. Script Notes : Updated by Jabantiz (4/21/2017)
  7. --]]
  8. local WOOD_ELF = 15
  9. local QUEST_1 = 213 -- Offering Help
  10. local QUEST_2 = 214 -- Tribute Leaves
  11. local QUEST_3 = 215 -- A Task for Davyn
  12. local QUEST_4 = 216 -- Tribute Flowers
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, QUEST_1)
  15. ProvidesQuest(NPC, QUEST_2)
  16. ProvidesQuest(NPC, QUEST_4)
  17. end
  18. function hailed(NPC, Spawn)
  19. FaceTarget(NPC, Spawn)
  20. conversation = CreateConversation()
  21. if HasCompletedQuest(Spawn, QUEST_1) then
  22. if HasCompletedQuest(Spawn, QUEST_2) then
  23. if HasCompletedQuest(Spawn, QUEST_3) then
  24. if HasCompletedQuest(Spawn, QUEST_4) then
  25. Say(NPC, "You have done very well. The tribute is as much yours as it is Davyn's. Proud will be the one whom this tribute was made.", Spawn)
  26. elseif HasQuest(Spawn, QUEST_4) then
  27. if GetQuestStep(Spawn, QUEST_4) == 1 or GetQuestStep(Spawn, QUEST_4) == 2 then
  28. CollectedFlowersYet(NPC, Spawn, conversation)
  29. else
  30. Say(NPC, "You have done very well. The tribute is as much yours as it is Davyn's. Proud will be the one whom this tribute was made.", Spawn)
  31. end
  32. else
  33. DoneTaskForDavyn(NPC, Spawn, conversation)
  34. end
  35. elseif HasQuest(Spawn, QUEST_3) then
  36. if GetQuestStep(Spawn, QUEST_3) == 6 then
  37. DoneTaskForDavyn(NPC, Spawn, conversation)
  38. else
  39. GoSpeakWithDavyn(NPC, Spawn)
  40. end
  41. else
  42. GoSpeakWithDavyn(NPC, Spawn)
  43. end
  44. elseif HasQuest(Spawn, QUEST_2) then
  45. if GetQuestStep(Spawn, QUEST_2) == 1 or GetQuestStep(Spawn, QUEST_2) == 2 then
  46. CollectedLeavesYet(NPC, Spawn, conversation)
  47. elseif GetQuestStep(Spawn, QUEST_2) == 3 then
  48. GoSpeakWithDavyn(NPC, Spawn)
  49. end
  50. else
  51. TalkToDavynYet(NPC, Spawn, conversation)
  52. end
  53. elseif HasQuest(Spawn, QUEST_1) then
  54. TalkToDavynYet(NPC, Spawn, conversation)
  55. else
  56. if GetRace(Spawn) == WOOD_ELF then
  57. WelcomeToWW(NPC, Spawn, conversation)
  58. else
  59. Say(NPC, "Please do not take this the wrong way, but I am here as a service to my own kind.", Spawn)
  60. end
  61. end
  62. end
  63. ----------------------------------------------------------------------------------------------------------------
  64. -- QUEST 1
  65. ----------------------------------------------------------------------------------------------------------------
  66. function WelcomeToWW(NPC, Spawn, conversation)
  67. AddConversationOption(conversation, "I was told you could teach me.", "EagerToLearn")
  68. AddConversationOption(conversation, "Feir'Dal?", "FierDal")
  69. StartConversation(conversation, NPC, Spawn, "Welcome to the Willow Wood. I am Aelis and you are Feir'Dal. I will do what I can to aid you.")
  70. end
  71. function EagerToLearn(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. conversation = CreateConversation()
  74. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis_intro003.mp3", "", "", 1752282825, 72417157, Spawn)
  75. AddConversationOption(conversation, "Where can I find him?", "OfferQuest1")
  76. StartConversation(conversation, NPC, Spawn, "You are eager to learn, that is good. Please, speak with Davyn Thornbranch. He may be able to teach you what I mean; he is learning just as you are. Offer to help him and let me know if he accepts.")
  77. end
  78. function FierDal(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. -- missing PlayFlavor() for this dialog
  82. AddConversationOption(conversation, "How does it go beyond that?", "EagerToLearn")
  83. StartConversation(conversation, NPC, Spawn, "You and I are Feir'Dal. Though it means many things it is -- at its simplest -- a reference to our race. But it goes far beyond that.")
  84. end
  85. function OfferQuest1(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. OfferQuest(NPC, Spawn, QUEST_1)
  88. end
  89. function TalkToDavynYet(NPC, Spawn, conversation)
  90. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis001.mp3", "", "", 1460661066, 3904351206, Spawn)
  91. if (HasCompletedQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_2)) or (HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2) then
  92. AddConversationOption(conversation, "Yes, he did. He wants help making a tribute.", "KnowWhatTributeIs")
  93. end
  94. AddConversationOption(conversation, "I have yet to speak with him.")
  95. StartConversation(conversation, NPC, Spawn, "Hello, " .. GetName(Spawn) .. ". Did Davyn accept your offer of help?")
  96. end
  97. function KnowWhatTributeIs(NPC, Spawn)
  98. FaceTarget(NPC, Spawn)
  99. conversation = CreateConversation()
  100. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis002.mp3", "", "", 2710331647, 1056979793, Spawn)
  101. AddConversationOption(conversation, "Yes, I do. How can I help Davyn?", "dlg_7_4")
  102. AddConversationOption(conversation, "No, could you explain it to me?", "dlg_7_2")
  103. AddConversationOption(conversation, "I need to take care of something else right now.")
  104. StartConversation(conversation, NPC, Spawn, "Do you know what a tribute is?")
  105. end
  106. function dlg_7_2(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis003.mp3", "", "", 2920909291, 3805909367, Spawn)
  110. AddConversationOption(conversation, "Ah, that makes sense. How can I help Davyn?", "dlg_7_4")
  111. AddConversationOption(conversation, "So you craft tributes on behalf of others?", "dlg_7_3")
  112. AddConversationOption(conversation, "I will return later to speak of this.")
  113. StartConversation(conversation, NPC, Spawn, "A Feir'Dal tribute is a way to show reverence for something: friends, family, even nature itself. I am a tribute crafter; this is why Davyn sent you to me.")
  114. end
  115. function dlg_7_3(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis004.mp3", "", "", 300866981, 1075115385, Spawn)
  119. AddConversationOption(conversation, "And what can I do to help Davyn?", "dlg_7_4")
  120. AddConversationOption(conversation, "This is interesting, but I must be going.")
  121. StartConversation(conversation, NPC, Spawn, "Yes. When I receive such a request, I work with the one who wishes the tribute made and help them to create something worthy to offer.")
  122. end
  123. function dlg_7_4(NPC, Spawn)
  124. if HasQuest(Spawn, QUEST_1) then
  125. SetStepComplete(Spawn, QUEST_1, 2)
  126. end
  127. FaceTarget(NPC, Spawn)
  128. conversation = CreateConversation()
  129. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis005.mp3", "", "", 3161828172, 993857572, Spawn)
  130. AddConversationOption(conversation, "What is the first step?", "dlg_7_5")
  131. AddConversationOption(conversation, "I will help Davyn at a later time.")
  132. StartConversation(conversation, NPC, Spawn, "It is strange that Davyn does not wish to participate more in the creation of his own tribute, but he may do as he pleases. To help him, I will require certain things from you. Through these tasks, we will build not just the physical tribute, but the metaphysical as well.")
  133. end
  134. -----------------------------------------------------------------------------------------------------------------
  135. -- QUEST 2
  136. -----------------------------------------------------------------------------------------------------------------
  137. function dlg_7_5(NPC, Spawn)
  138. FaceTarget(NPC, Spawn)
  139. conversation = CreateConversation()
  140. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis006.mp3", "", "", 3076127078, 4294098731, Spawn)
  141. AddConversationOption(conversation, "Ok.", "OfferQuest2")
  142. StartConversation(conversation, NPC, Spawn, "First you must gather some leaves for the tribute. You should be able to find Dewdrop bushes all around the Willow Wood. Gather six of their leaves for me and I will use them in the creation of the tribute. Though the quality of the leaf itself does not matter, you will need to pick each leaf from a new plant, that is part of the ritual.")
  143. end
  144. function OfferQuest2(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. OfferQuest(NPC, Spawn, QUEST_2)
  147. end
  148. function CollectedLeavesYet(NPC, Spawn, conversation)
  149. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis007.mp3", "", "", 2752158963, 3016049576, Spawn)
  150. if HasQuest(Spawn, QUEST_2) and GetQuestStep(Spawn, QUEST_2) == 2 then
  151. AddConversationOption(conversation, "Yes, here they are.", "dlg_11_1")
  152. end
  153. AddConversationOption(conversation, "Not yet.")
  154. StartConversation(conversation, NPC, Spawn, "Have you collected the leaves?")
  155. end
  156. function dlg_11_1(NPC, Spawn)
  157. FaceTarget(NPC, Spawn)
  158. conversation = CreateConversation()
  159. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis008.mp3", "", "", 4043232987, 1791181126, Spawn)
  160. AddConversationOption(conversation, "Thank you, what else must I do?", "DavynsTribute")
  161. AddConversationOption(conversation, "Thanks, I'll be back later.")
  162. StartConversation(conversation, NPC, Spawn, "Ah yes, wonderful.")
  163. end
  164. function DavynsTribute(NPC, Spawn)
  165. SetStepComplete(Spawn, QUEST_2, 2)
  166. FaceTarget(NPC, Spawn)
  167. conversation = CreateConversation()
  168. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis009.mp3", "", "", 502674397, 4117846239, Spawn)
  169. AddConversationOption(conversation, "I'll go ahead and do that.")
  170. StartConversation(conversation, NPC, Spawn, "Well, since this is Davyn's tribute, after all, I'd like you to do a task for him. It can be anything, really, from a grand assignment to a menial task. I just ask that you do it on his behalf.")
  171. end
  172. ------------------------------------------------------------------------------------------------------------------------
  173. -- QUEST 3
  174. ------------------------------------------------------------------------------------------------------------------------
  175. function GoSpeakWithDavyn(NPC, Spawn)
  176. Say(NPC, "Please go speak with Davyn. I need you to perform a task for him to help the tribute creation process.", Spawn)
  177. end
  178. function DoneTaskForDavyn(NPC, Spawn, conversation)
  179. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis010.mp3", "", "", 4241338339, 1919583845, Spawn)
  180. if (HasCompletedQuest(Spawn, QUEST_3) and not HasCompletedQuest(Spawn, QUEST_4)) or (HasQuest(Spawn, QUEST_3) and GetQuestStep(Spawn, QUEST_3) == 6) then
  181. AddConversationOption(conversation, "I have.", "dlg_22_1")
  182. end
  183. AddConversationOption(conversation, "Not yet.")
  184. StartConversation(conversation, NPC, Spawn, "Have you done a task for Davyn?")
  185. end
  186. function dlg_22_1(NPC, Spawn)
  187. FaceTarget(NPC, Spawn)
  188. conversation = CreateConversation()
  189. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis011.mp3", "", "", 105540976, 246996897, Spawn)
  190. AddConversationOption(conversation, "He had me find and put down a rabid wolf that had been living in the Willow Wood.", "dlg_22_2")
  191. AddConversationOption(conversation, "I'll tell you about it later.")
  192. StartConversation(conversation, NPC, Spawn, "And what did he have you do? Tell me about it.")
  193. end
  194. function dlg_22_2(NPC, Spawn)
  195. FaceTarget(NPC, Spawn)
  196. conversation = CreateConversation()
  197. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis012.mp3", "", "", 3096119908, 999587126, Spawn)
  198. AddConversationOption(conversation, "Ah I see. Well, I approached Davyn and he asked me how his tribute was coming. I told him that I needed to perform a task for him first. He mentioned that he had heard reports of a rabid wolf living in the Willow Wood. He told me my task would be to find this wolf and put it out of its misery.", "dlg_22_3")
  199. AddConversationOption(conversation, "Let me gather my thoughts first.")
  200. StartConversation(conversation, NPC, Spawn, "My apologies, I wasn't entirely clear. I need you to tell me, in detail, what you did for Davyn. This is part of the Feir'Dal tribute creation process, tell it in any way you wish, but be thorough.")
  201. end
  202. function dlg_22_3(NPC, Spawn)
  203. FaceTarget(NPC, Spawn)
  204. conversation = CreateConversation()
  205. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis013.mp3", "", "", 4191190987, 207693875, Spawn)
  206. AddConversationOption(conversation, "A little scared.", "dlg_22_4")
  207. AddConversationOption(conversation, "Sad, it is an unfortunate task to give anyone.", "dlg_22_4")
  208. AddConversationOption(conversation, "I was excited about the promise of battle.", "dlg_22_4")
  209. AddConversationOption(conversation, "Eager at first, but reluctant later.", "dlg_22_4")
  210. StartConversation(conversation, NPC, Spawn, "And how did that make you feel?")
  211. end
  212. function dlg_22_4(NPC, Spawn)
  213. FaceTarget(NPC, Spawn)
  214. conversation = CreateConversation()
  215. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis014.mp3", "", "", 2061458052, 104886246, Spawn)
  216. AddConversationOption(conversation, "Davyn told me to speak with a man named Taval Zane in the local inn who had reported seeing the rabid wolf. Taval was mildly afraid. He told me that after he fled from the wolf, he saw it heading toward the scribe's shop.", "dlg_22_5")
  217. StartConversation(conversation, NPC, Spawn, "Interesting. Please, go on.")
  218. end
  219. function dlg_22_5(NPC, Spawn)
  220. FaceTarget(NPC, Spawn)
  221. conversation = CreateConversation()
  222. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis015.mp3", "", "", 1914325094, 2874364836, Spawn)
  223. AddConversationOption(conversation, "No, but I wish I had been more supportive.", "dlg_22_6")
  224. AddConversationOption(conversation, "Yes, I think I comforted him.", "dlg_22_6")
  225. AddConversationOption(conversation, "He was very thankful to have my help.", "dlg_22_6")
  226. AddConversationOption(conversation, "No, but he didn't need it.", "dlg_22_6")
  227. StartConversation(conversation, NPC, Spawn, "Did you comfort Mr. Zane?")
  228. end
  229. function dlg_22_6(NPC, Spawn)
  230. FaceTarget(NPC, Spawn)
  231. conversation = CreateConversation()
  232. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis016.mp3", "", "", 2261205557, 1048737492, Spawn)
  233. AddConversationOption(conversation, "Taval mentioned that Jana Windstream spends a lot of time in front of the scribe's shop and might have seen something. She didn't seem very worried as she hadn't seen the wolf. She had noticed a cart that had been rummaged through, though, and pointed me in that direction.", "dlg_22_7")
  234. StartConversation(conversation, NPC, Spawn, "I see. Continue.")
  235. end
  236. function dlg_22_7(NPC, Spawn)
  237. FaceTarget(NPC, Spawn)
  238. conversation = CreateConversation()
  239. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis017.mp3", "", "", 2117559013, 805448312, Spawn)
  240. AddConversationOption(conversation, "There were tracks leading from the cart into the hills behind the scribe's shop.", "dlg_22_8")
  241. StartConversation(conversation, NPC, Spawn, "And what happened with the cart?")
  242. end
  243. function dlg_22_8(NPC, Spawn)
  244. FaceTarget(NPC, Spawn)
  245. conversation = CreateConversation()
  246. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis018.mp3", "", "", 404983457, 991180338, Spawn)
  247. AddConversationOption(conversation, "I was very nervous.", "dlg_22_9")
  248. AddConversationOption(conversation, "I may have been a little on edge.", "dlg_22_9")
  249. AddConversationOption(conversation, "Not particularly, no. I was mostly interested in getting the job done.", "dlg_22_9")
  250. AddConversationOption(conversation, "I was happy that I was getting closer.", "dlg_22_9")
  251. StartConversation(conversation, NPC, Spawn, "Were you nervous as you followed the tracks?")
  252. end
  253. function dlg_22_9(NPC, Spawn)
  254. FaceTarget(NPC, Spawn)
  255. conversation = CreateConversation()
  256. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis019.mp3", "", "", 3905097708, 3634838390, Spawn)
  257. AddConversationOption(conversation, "As I approached the hills, the beast charged. It wasn't a long fight and in the end the wolf was slain.", "dlg_22_10")
  258. StartConversation(conversation, NPC, Spawn, "Hmmm... Please, continue.")
  259. end
  260. function dlg_22_10(NPC, Spawn)
  261. FaceTarget(NPC, Spawn)
  262. conversation = CreateConversation()
  263. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis020.mp3", "", "", 616226385, 3796350916, Spawn)
  264. AddConversationOption(conversation, "Yes. I am sure there must have been a better way to save the beast.", "dlg_22_11")
  265. AddConversationOption(conversation, "I am sad that I had to do what I did, but it was the only way.", "dlg_22_11")
  266. AddConversationOption(conversation, "In nature, beasts kill when it is necessary to survive. This beast posed a threat and it was necessary to remove that threat.", "dlg_22_11")
  267. AddConversationOption(conversation, "The beast wouldn't have thought twice about killing me, so I give it no such courtesy.", "dlg_22_11")
  268. StartConversation(conversation, NPC, Spawn, "Now that it is done, do you feel any regret?")
  269. end
  270. function dlg_22_11(NPC, Spawn)
  271. SetStepComplete(Spawn, QUEST_3, 6)
  272. FaceTarget(NPC, Spawn)
  273. conversation = CreateConversation()
  274. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis021.mp3", "", "", 236275225, 3590188297, Spawn)
  275. AddConversationOption(conversation, "What do you need?", "dlg_22_12")
  276. StartConversation(conversation, NPC, Spawn, "That is quite interesting. I believe your story has inspired me to write the tribute. While I put my thoughts on paper, I would like you to gather one final component for the tribute.")
  277. end
  278. -----------------------------------------------------------------------------------------------------------------------------------------------------
  279. -- Quest 4
  280. -----------------------------------------------------------------------------------------------------------------------------------------------------
  281. function dlg_22_12(NPC, Spawn)
  282. FaceTarget(NPC, Spawn)
  283. conversation = CreateConversation()
  284. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis021a.mp3", "", "", 1835381207, 2544203225, Spawn)
  285. AddConversationOption(conversation, "Ok.", "OfferQuest4")
  286. StartConversation(conversation, NPC, Spawn, "Flowers grow all about the Willow Wood. Please find some and pick them.")
  287. end
  288. function OfferQuest4(NPC, Spawn)
  289. FaceTarget(NPC, Spawn)
  290. OfferQuest(NPC, Spawn, QUEST_4)
  291. end
  292. function CollectedFlowersYet(NPC, Spawn, conversation)
  293. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis022.mp3", "", "", 1790256912, 2762282162, Spawn)
  294. if HasQuest(Spawn, QUEST_4) and GetQuestStep(Spawn, QUEST_4) == 2 then
  295. AddConversationOption(conversation, "I did, here they are.", "dlg_24_1")
  296. end
  297. AddConversationOption(conversation, "Not yet.")
  298. StartConversation(conversation, NPC, Spawn, "Did you gather the flowers?")
  299. end
  300. function dlg_24_1(NPC, Spawn)
  301. SetStepComplete(Spawn, QUEST_4, 2)
  302. FaceTarget(NPC, Spawn)
  303. conversation = CreateConversation()
  304. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis023.mp3", "", "", 1498336475, 1966922553, Spawn)
  305. AddConversationOption(conversation, "Thank you for your help.")
  306. StartConversation(conversation, NPC, Spawn, "Beautiful. Perfect. The tribute is complete, you may take it to Davyn now.")
  307. end