9
3

Aelis.lua 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  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. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis_intro000.mp3", "Please do not take this the wrong way, but I am here as a service to my own kind.", "no", 1689156608, 834688706, Spawn)
  60. end
  61. end
  62. end
  63. ----------------------------------------------------------------------------------------------------------------
  64. -- QUEST 1
  65. ----------------------------------------------------------------------------------------------------------------
  66. function WelcomeToWW(NPC, Spawn, conversation)
  67. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis_intro001.mp3", "", "", 1689156608, 834688706, Spawn)
  68. AddConversationOption(conversation, "I was told you could teach me.", "EagerToLearn")
  69. AddConversationOption(conversation, "Feir'Dal?", "FierDal")
  70. 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.")
  71. end
  72. function EagerToLearn(NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. conversation = CreateConversation()
  75. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis_intro003.mp3", "", "", 1752282825, 72417157, Spawn)
  76. AddConversationOption(conversation, "Where can I find him?", "OfferQuest1")
  77. 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.")
  78. end
  79. function FierDal(NPC, Spawn)
  80. FaceTarget(NPC, Spawn)
  81. conversation = CreateConversation()
  82. -- missing PlayFlavor() for this dialog
  83. AddConversationOption(conversation, "How does it go beyond that?", "EagerToLearn")
  84. 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.")
  85. end
  86. function OfferQuest1(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. OfferQuest(NPC, Spawn, QUEST_1)
  89. end
  90. function TalkToDavynYet(NPC, Spawn, conversation)
  91. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis001.mp3", "", "", 1460661066, 3904351206, Spawn)
  92. if (HasCompletedQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_2)) or (HasQuest(Spawn, QUEST_1) and GetQuestStep(Spawn, QUEST_1) == 2) then
  93. AddConversationOption(conversation, "Yes, he did. He wants help making a tribute.", "KnowWhatTributeIs")
  94. end
  95. AddConversationOption(conversation, "I have yet to speak with him.")
  96. StartConversation(conversation, NPC, Spawn, "Hello, " .. GetName(Spawn) .. ". Did Davyn accept your offer of help?")
  97. end
  98. function KnowWhatTributeIs(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis002.mp3", "", "", 2710331647, 1056979793, Spawn)
  102. AddConversationOption(conversation, "Yes, I do. How can I help Davyn?", "dlg_7_4")
  103. AddConversationOption(conversation, "No, could you explain it to me?", "dlg_7_2")
  104. AddConversationOption(conversation, "I need to take care of something else right now.")
  105. StartConversation(conversation, NPC, Spawn, "Do you know what a tribute is?")
  106. end
  107. function dlg_7_2(NPC, Spawn)
  108. FaceTarget(NPC, Spawn)
  109. conversation = CreateConversation()
  110. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis003.mp3", "", "", 2920909291, 3805909367, Spawn)
  111. AddConversationOption(conversation, "Ah, that makes sense. How can I help Davyn?", "dlg_7_4")
  112. AddConversationOption(conversation, "So you craft tributes on behalf of others?", "dlg_7_3")
  113. AddConversationOption(conversation, "I will return later to speak of this.")
  114. 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.")
  115. end
  116. function dlg_7_3(NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. conversation = CreateConversation()
  119. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis004.mp3", "", "", 300866981, 1075115385, Spawn)
  120. AddConversationOption(conversation, "And what can I do to help Davyn?", "dlg_7_4")
  121. AddConversationOption(conversation, "This is interesting, but I must be going.")
  122. 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.")
  123. end
  124. function dlg_7_4(NPC, Spawn)
  125. if HasQuest(Spawn, QUEST_1) then
  126. SetStepComplete(Spawn, QUEST_1, 2)
  127. end
  128. FaceTarget(NPC, Spawn)
  129. conversation = CreateConversation()
  130. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis005.mp3", "", "", 3161828172, 993857572, Spawn)
  131. AddConversationOption(conversation, "What is the first step?", "dlg_7_5")
  132. AddConversationOption(conversation, "I will help Davyn at a later time.")
  133. 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.")
  134. end
  135. -----------------------------------------------------------------------------------------------------------------
  136. -- QUEST 2
  137. -----------------------------------------------------------------------------------------------------------------
  138. function dlg_7_5(NPC, Spawn)
  139. FaceTarget(NPC, Spawn)
  140. conversation = CreateConversation()
  141. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis006.mp3", "", "", 3076127078, 4294098731, Spawn)
  142. AddConversationOption(conversation, "Ok.", "OfferQuest2")
  143. 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.")
  144. end
  145. function OfferQuest2(NPC, Spawn)
  146. FaceTarget(NPC, Spawn)
  147. OfferQuest(NPC, Spawn, QUEST_2)
  148. end
  149. function CollectedLeavesYet(NPC, Spawn, conversation)
  150. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis007.mp3", "", "", 2752158963, 3016049576, Spawn)
  151. if HasQuest(Spawn, QUEST_2) and GetQuestStep(Spawn, QUEST_2) == 2 then
  152. AddConversationOption(conversation, "Yes, here they are.", "dlg_11_1")
  153. end
  154. AddConversationOption(conversation, "Not yet.")
  155. StartConversation(conversation, NPC, Spawn, "Have you collected the leaves?")
  156. end
  157. function dlg_11_1(NPC, Spawn)
  158. FaceTarget(NPC, Spawn)
  159. conversation = CreateConversation()
  160. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis008.mp3", "", "", 4043232987, 1791181126, Spawn)
  161. AddConversationOption(conversation, "Thank you, what else must I do?", "DavynsTribute")
  162. AddConversationOption(conversation, "Thanks, I'll be back later.")
  163. StartConversation(conversation, NPC, Spawn, "Ah yes, wonderful.")
  164. end
  165. function DavynsTribute(NPC, Spawn)
  166. SetStepComplete(Spawn, QUEST_2, 2)
  167. FaceTarget(NPC, Spawn)
  168. conversation = CreateConversation()
  169. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis009.mp3", "", "", 502674397, 4117846239, Spawn)
  170. AddConversationOption(conversation, "I'll go ahead and do that.")
  171. 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.")
  172. end
  173. ------------------------------------------------------------------------------------------------------------------------
  174. -- QUEST 3
  175. ------------------------------------------------------------------------------------------------------------------------
  176. function GoSpeakWithDavyn(NPC, Spawn)
  177. Say(NPC, "Please go speak with Davyn. I need you to perform a task for him to help the tribute creation process.", Spawn)
  178. end
  179. function DoneTaskForDavyn(NPC, Spawn, conversation)
  180. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis010.mp3", "", "", 4241338339, 1919583845, Spawn)
  181. if (HasCompletedQuest(Spawn, QUEST_3) and not HasCompletedQuest(Spawn, QUEST_4)) or (HasQuest(Spawn, QUEST_3) and GetQuestStep(Spawn, QUEST_3) == 6) then
  182. AddConversationOption(conversation, "I have.", "dlg_22_1")
  183. end
  184. AddConversationOption(conversation, "Not yet.")
  185. StartConversation(conversation, NPC, Spawn, "Have you done a task for Davyn?")
  186. end
  187. function dlg_22_1(NPC, Spawn)
  188. FaceTarget(NPC, Spawn)
  189. conversation = CreateConversation()
  190. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis011.mp3", "", "", 105540976, 246996897, Spawn)
  191. AddConversationOption(conversation, "He had me find and put down a rabid wolf that had been living in the Willow Wood.", "dlg_22_2")
  192. AddConversationOption(conversation, "I'll tell you about it later.")
  193. StartConversation(conversation, NPC, Spawn, "And what did he have you do? Tell me about it.")
  194. end
  195. function dlg_22_2(NPC, Spawn)
  196. FaceTarget(NPC, Spawn)
  197. conversation = CreateConversation()
  198. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis012.mp3", "", "", 3096119908, 999587126, Spawn)
  199. 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")
  200. AddConversationOption(conversation, "Let me gather my thoughts first.")
  201. 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.")
  202. end
  203. function dlg_22_3(NPC, Spawn)
  204. FaceTarget(NPC, Spawn)
  205. conversation = CreateConversation()
  206. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis013.mp3", "", "", 4191190987, 207693875, Spawn)
  207. AddConversationOption(conversation, "A little scared.", "dlg_22_4")
  208. AddConversationOption(conversation, "Sad, it is an unfortunate task to give anyone.", "dlg_22_4")
  209. AddConversationOption(conversation, "I was excited about the promise of battle.", "dlg_22_4")
  210. AddConversationOption(conversation, "Eager at first, but reluctant later.", "dlg_22_4")
  211. StartConversation(conversation, NPC, Spawn, "And how did that make you feel?")
  212. end
  213. function dlg_22_4(NPC, Spawn)
  214. FaceTarget(NPC, Spawn)
  215. conversation = CreateConversation()
  216. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis014.mp3", "", "", 2061458052, 104886246, Spawn)
  217. 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")
  218. StartConversation(conversation, NPC, Spawn, "Interesting. Please, go on.")
  219. end
  220. function dlg_22_5(NPC, Spawn)
  221. FaceTarget(NPC, Spawn)
  222. conversation = CreateConversation()
  223. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis015.mp3", "", "", 1914325094, 2874364836, Spawn)
  224. AddConversationOption(conversation, "No, but I wish I had been more supportive.", "dlg_22_6")
  225. AddConversationOption(conversation, "Yes, I think I comforted him.", "dlg_22_6")
  226. AddConversationOption(conversation, "He was very thankful to have my help.", "dlg_22_6")
  227. AddConversationOption(conversation, "No, but he didn't need it.", "dlg_22_6")
  228. StartConversation(conversation, NPC, Spawn, "Did you comfort Mr. Zane?")
  229. end
  230. function dlg_22_6(NPC, Spawn)
  231. FaceTarget(NPC, Spawn)
  232. conversation = CreateConversation()
  233. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis016.mp3", "", "", 2261205557, 1048737492, Spawn)
  234. 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")
  235. StartConversation(conversation, NPC, Spawn, "I see. Continue.")
  236. end
  237. function dlg_22_7(NPC, Spawn)
  238. FaceTarget(NPC, Spawn)
  239. conversation = CreateConversation()
  240. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis017.mp3", "", "", 2117559013, 805448312, Spawn)
  241. AddConversationOption(conversation, "There were tracks leading from the cart into the hills behind the scribe's shop.", "dlg_22_8")
  242. StartConversation(conversation, NPC, Spawn, "And what happened with the cart?")
  243. end
  244. function dlg_22_8(NPC, Spawn)
  245. FaceTarget(NPC, Spawn)
  246. conversation = CreateConversation()
  247. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis018.mp3", "", "", 404983457, 991180338, Spawn)
  248. AddConversationOption(conversation, "I was very nervous.", "dlg_22_9")
  249. AddConversationOption(conversation, "I may have been a little on edge.", "dlg_22_9")
  250. AddConversationOption(conversation, "Not particularly, no. I was mostly interested in getting the job done.", "dlg_22_9")
  251. AddConversationOption(conversation, "I was happy that I was getting closer.", "dlg_22_9")
  252. StartConversation(conversation, NPC, Spawn, "Were you nervous as you followed the tracks?")
  253. end
  254. function dlg_22_9(NPC, Spawn)
  255. FaceTarget(NPC, Spawn)
  256. conversation = CreateConversation()
  257. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis019.mp3", "", "", 3905097708, 3634838390, Spawn)
  258. 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")
  259. StartConversation(conversation, NPC, Spawn, "Hmmm... Please, continue.")
  260. end
  261. function dlg_22_10(NPC, Spawn)
  262. FaceTarget(NPC, Spawn)
  263. conversation = CreateConversation()
  264. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis020.mp3", "", "", 616226385, 3796350916, Spawn)
  265. AddConversationOption(conversation, "Yes. I am sure there must have been a better way to save the beast.", "dlg_22_11")
  266. AddConversationOption(conversation, "I am sad that I had to do what I did, but it was the only way.", "dlg_22_11")
  267. 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")
  268. AddConversationOption(conversation, "The beast wouldn't have thought twice about killing me, so I give it no such courtesy.", "dlg_22_11")
  269. StartConversation(conversation, NPC, Spawn, "Now that it is done, do you feel any regret?")
  270. end
  271. function dlg_22_11(NPC, Spawn)
  272. SetStepComplete(Spawn, QUEST_3, 6)
  273. FaceTarget(NPC, Spawn)
  274. conversation = CreateConversation()
  275. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis021.mp3", "", "", 236275225, 3590188297, Spawn)
  276. AddConversationOption(conversation, "What do you need?", "dlg_22_12")
  277. 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.")
  278. end
  279. -----------------------------------------------------------------------------------------------------------------------------------------------------
  280. -- Quest 4
  281. -----------------------------------------------------------------------------------------------------------------------------------------------------
  282. function dlg_22_12(NPC, Spawn)
  283. FaceTarget(NPC, Spawn)
  284. conversation = CreateConversation()
  285. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis021a.mp3", "", "", 1835381207, 2544203225, Spawn)
  286. AddConversationOption(conversation, "Ok.", "OfferQuest4")
  287. StartConversation(conversation, NPC, Spawn, "Flowers grow all about the Willow Wood. Please find some and pick them.")
  288. end
  289. function OfferQuest4(NPC, Spawn)
  290. FaceTarget(NPC, Spawn)
  291. OfferQuest(NPC, Spawn, QUEST_4)
  292. end
  293. function CollectedFlowersYet(NPC, Spawn, conversation)
  294. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis022.mp3", "", "", 1790256912, 2762282162, Spawn)
  295. if HasQuest(Spawn, QUEST_4) and GetQuestStep(Spawn, QUEST_4) == 2 then
  296. AddConversationOption(conversation, "I did, here they are.", "dlg_24_1")
  297. end
  298. AddConversationOption(conversation, "Not yet.")
  299. StartConversation(conversation, NPC, Spawn, "Did you gather the flowers?")
  300. end
  301. function dlg_24_1(NPC, Spawn)
  302. SetStepComplete(Spawn, QUEST_4, 2)
  303. FaceTarget(NPC, Spawn)
  304. conversation = CreateConversation()
  305. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/aelis/qey_village05/quests/aelis/aelis023.mp3", "", "", 1498336475, 1966922553, Spawn)
  306. AddConversationOption(conversation, "Thank you for your help.")
  307. StartConversation(conversation, NPC, Spawn, "Beautiful. Perfect. The tribute is complete, you may take it to Davyn now.")
  308. end