DaelynTwinstar.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/DaelynTwinstar.lua
  3. Script Purpose : Daelyn Twinstar <Half Elf Mentor>
  4. Script Author : Scatman
  5. Script Date : 2009.09.26
  6. Script Notes : Updated by Jabantiz (4/22/2017)
  7. --]]
  8. local HALF_ELF = 6
  9. local QUEST_1 = 218 -- A Split Heritage
  10. local QUEST_2 = 219 -- A Joined Heritage
  11. local QUEST_3 = 220 -- Wisdom in the Wind
  12. local QUEST_4 = 221 -- A Task for Daelyn
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, QUEST_1)
  15. ProvidesQuest(NPC, QUEST_2)
  16. ProvidesQuest(NPC, QUEST_3)
  17. ProvidesQuest(NPC, QUEST_4)
  18. end
  19. function hailed(NPC, Spawn)
  20. FaceTarget(NPC, Spawn)
  21. conversation = CreateConversation()
  22. if HasCompletedQuest(Spawn, QUEST_1) then
  23. if HasCompletedQuest(Spawn, QUEST_2) then
  24. if HasCompletedQuest(Spawn, QUEST_3) then
  25. if HasCompletedQuest(Spawn, QUEST_4) then
  26. OnQuest4(NPC, Spawn, conversation)
  27. elseif HasQuest(Spawn, QUEST_4) then
  28. OnQuest4(NPC, Spawn, conversation)
  29. else
  30. OnQuest3(NPC, Spawn, conversation)
  31. end
  32. elseif HasQuest(Spawn, QUEST_3) then
  33. OnQuest3(NPC, Spawn, conversation)
  34. else
  35. OnQuest2(NPC, Spawn, conversation)
  36. end
  37. elseif HasQuest(Spawn, QUEST_2) then
  38. OnQuest2(NPC, Spawn, conversation)
  39. else
  40. OnQuest1(NPC, Spawn, conversation)
  41. end
  42. elseif HasQuest(Spawn, QUEST_1) then
  43. OnQuest1(NPC, Spawn, conversation)
  44. else
  45. WellMet(NPC, Spawn, conversation)
  46. end
  47. end
  48. function respawn(NPC)
  49. spawn(NPC)
  50. end
  51. function NotHalfElf(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. conversation = CreateConversation()
  54. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar002.mp3", "", "", 1099909668, 381545528, Spawn)
  55. AddConversationOption(conversation, "I see.")
  56. StartConversation(conversation, NPC, Spawn, "Oh, no, I am sorry. I thought you were half-elven.")
  57. end
  58. -----------------------------------------------------------------------------------------------------------------
  59. -- QUEST 1
  60. -----------------------------------------------------------------------------------------------------------------
  61. function WellMet(NPC, Spawn, conversation)
  62. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar001.mp3", "", "", 1953725707, 1008606084, Spawn)
  63. if GetRace(Spawn) == HALF_ELF then
  64. AddConversationOption(conversation, "Are you talking to me?", "TalkingToMe")
  65. else
  66. AddConversationOption(conversation, "Are you talking to me?", "NotHalfElf")
  67. end
  68. StartConversation(conversation, NPC, Spawn, "Well met, Ayr'Dal. Worry not, you will find friends here.")
  69. end
  70. function TalkingToMe(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. AddConversationOption(conversation, "I am Ayr'Dal, I do not deny my heritage.", "IAmAyrDal")
  74. StartConversation(conversation, NPC, Spawn, "I most certainly am. Or are you not Ayr'Dal? Do you deny your heritage?")
  75. end
  76. function IAmAyrDal(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. AddConversationOption(conversation, "My mother.", "Mother")
  80. AddConversationOption(conversation, "My father.", "Father")
  81. AddConversationOption(conversation, "I don't know.", "DontKnow")
  82. StartConversation(conversation, NPC, Spawn, "Which of your parents was elven?")
  83. end
  84. function Mother(NPC, Spawn)
  85. FaceTarget(NPC, Spawn)
  86. conversation = CreateConversation()
  87. AddConversationOption(conversation, "Yeah, you're right.", "Next")
  88. AddConversationOption(conversation, "You're a little off base.", "Next")
  89. StartConversation(conversation, NPC, Spawn, "I wager you're a sentimentalist then.")
  90. end
  91. function Father(NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. conversation = CreateConversation()
  94. AddConversationOption(conversation, "Yeah, you're right.", "Next")
  95. AddConversationOption(conversation, "You're a little off base.", "Next")
  96. StartConversation(conversation, NPC, Spawn, "Then I bet you're very pratical. Like me.")
  97. end
  98. function DontKnow(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. AddConversationOption(conversation, "No, I am proud of who I am.", "No")
  102. AddConversationOption(conversation, "Yes, sometimes.", "Sometimes")
  103. AddConversationOption(conversation, "All the time.", "AllTheTime")
  104. StartConversation(conversation, NPC, Spawn, "That is most unfortunate. Tell me, do you ever regret your heritage?")
  105. end
  106. function Next(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. conversation = CreateConversation()
  109. AddConversationOption(conversation, "No, I am proud of who I am.", "No")
  110. AddConversationOption(conversation, "Yes, sometimes.", "Sometimes")
  111. AddConversationOption(conversation, "All the time.", "AllTheTime")
  112. StartConversation(conversation, NPC, Spawn, "I'm not always right, I just see patterns sometimes. Tell me, do you ever regret your heritage?")
  113. end
  114. function No(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. conversation = CreateConversation()
  117. AddConversationOption(conversation, "How did you do that?", "HowDidYouDoThat")
  118. StartConversation(conversation, NPC, Spawn, "That's good to hear. I used to feel shame when I thought of my heritage, but I've known to know better.")
  119. end
  120. function Sometimes(NPC, Spawn)
  121. FaceTarget(NPC, Spawn)
  122. conversation = CreateConversation()
  123. AddConversationOption(conversation, "How did you do that?", "HowDidYouDoThat")
  124. StartConversation(conversation, NPC, Spawn, "You need to put a stop to that. I used to feel shame when I thought of my heritage, but I've known to know better.")
  125. end
  126. function AllTheTime(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. conversation = CreateConversation()
  129. AddConversationOption(conversation, "How did you do that?", "HowDidYouDoThat")
  130. StartConversation(conversation, NPC, Spawn, "Come on now. You must have some pride in who you are. I used to feel shame when I thought of my heritage, but I've known to know better.")
  131. end
  132. function HowDidYouDoThat(NPC, Spawn)
  133. FaceTarget(NPC, Spawn)
  134. conversation = CreateConversation()
  135. AddConversationOption(conversation, "What can you teach me?", "WhatCanYouTeachMe")
  136. StartConversation(conversation, NPC, Spawn, "By experiencing the world. I believed a lot of lies when I was younger. The only thing that can dispel lies you've known all your life is experience, and not even that always works. I don't know your past, but I guarantee you have room to learn, we all do.")
  137. end
  138. function WhatCanYouTeachMe(NPC, Spawn)
  139. FaceTarget(NPC, Spawn)
  140. conversation = CreateConversation()
  141. AddConversationOption(conversation, "What must I do?", "WhatMustIDo")
  142. StartConversation(conversation, NPC, Spawn, "Nothing, really. I'm no teacher. I can only put you in situations that you may learn from. I can try to help guide you, of course, but most of the work will be yours.")
  143. end
  144. function WhatMustIDo(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. conversation = CreateConversation()
  147. AddConversationOption(conversation, "I will do so.", "OfferQuest1")
  148. StartConversation(conversation, NPC, Spawn, "I would like you to speak with two people and help them in their day-to-day business. Please seek out Gar Smolten and Lia Serene. Pay close attention to how they treat you. Gar should be behind the inn, speak with him first. Lia should be near the entrance to the Elddar Grove.")
  149. end
  150. function OfferQuest1(NPC, Spawn)
  151. FaceTarget(NPC, Spawn)
  152. OfferQuest(NPC, Spawn, QUEST_1)
  153. end
  154. function OnQuest1(NPC, Spawn, conversation)
  155. if GetQuestStep(Spawn, QUEST_1) == 8 or HasCompletedQuest(Spawn, QUEST_1) then
  156. AddConversationOption(conversation, "I have.", "dlg_18_1")
  157. end
  158. AddConversationOption(conversation, "No, not yet.")
  159. StartConversation(conversation, NPC, Spawn, "Have you talked with Gar and Lia yet?")
  160. end
  161. function dlg_18_1(NPC, Spawn)
  162. FaceTarget(NPC, Spawn)
  163. conversation = CreateConversation()
  164. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar017.mp3", "", "", 2784530995, 3683555201, Spawn)
  165. AddConversationOption(conversation, "Well enough, I suppose.", "dlg_18_2")
  166. StartConversation(conversation, NPC, Spawn, "And how did it go?")
  167. end
  168. function dlg_18_2(NPC, Spawn)
  169. FaceTarget(NPC, Spawn)
  170. conversation = CreateConversation()
  171. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar018.mp3", "", "", 576149415, 3069756433, Spawn)
  172. AddConversationOption(conversation, "He was a little rude at first, but in the end he thanked me for my help.", "dlg_18_3")
  173. StartConversation(conversation, NPC, Spawn, "How did Gar treat you?")
  174. end
  175. function dlg_18_3(NPC, Spawn)
  176. FaceTarget(NPC, Spawn)
  177. conversation = CreateConversation()
  178. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar019.mp3", "", "", 3414444065, 1436595071, Spawn)
  179. AddConversationOption(conversation, "She was rather assuming, but also let me help her.", "dlg_18_4")
  180. StartConversation(conversation, NPC, Spawn, "And what of Lia?")
  181. end
  182. function dlg_18_4(NPC, Spawn)
  183. FaceTarget(NPC, Spawn)
  184. conversation = CreateConversation()
  185. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar020.mp3", "", "", 2333648415, 2569002098, Spawn)
  186. AddConversationOption(conversation, "What do you mean?", "dlg_18_5")
  187. StartConversation(conversation, NPC, Spawn, "It is unfortunate you were treated as such, but not surprising. But, and this is the sad part, there is a different reason I showed you this aspect of humans and elves. It is true we are oft-judged because of our race, but we tend to share that trait ourselves. ")
  188. end
  189. function dlg_18_5(NPC, Spawn)
  190. FaceTarget(NPC, Spawn)
  191. conversation = CreateConversation()
  192. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar020a.mp3", "", "", 3811087836, 3971066542, Spawn)
  193. AddConversationOption(conversation, "Is it hard to deal with?", "dlg_18_6")
  194. StartConversation(conversation, NPC, Spawn, "Because we are both human and elf, as the two you just spoke with, we sometimes are stuck with the worst aspects of either race. In this case their subdued distrust of our race. When we share those negative aspects we tend to assume humans and elves will look down upon us, and we tend to see examples of this even when it's not true.")
  195. end
  196. function dlg_18_6(NPC, Spawn)
  197. if HasQuest(Spawn, QUEST_1) then
  198. SetStepComplete(Spawn, QUEST_1, 8)
  199. end
  200. FaceTarget(NPC, Spawn)
  201. conversation = CreateConversation()
  202. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar021.mp3", "", "", 1513287886, 2136194240, Spawn)
  203. AddConversationOption(conversation, "What is that?", "dlg_18_7")
  204. StartConversation(conversation, NPC, Spawn, "That depends on what your past interactions with other races has taught you--and I don't mean just humans and elves. I will tell you that for me it is very hard to deal with. For others it is a not an issue. Let me show you another thing we must deal with.")
  205. end
  206. -------------------------------------------------------------------------------------------------------------
  207. -- QUEST 2
  208. -------------------------------------------------------------------------------------------------------------
  209. function dlg_18_7(NPC, Spawn)
  210. FaceTarget(NPC, Spawn)
  211. conversation = CreateConversation()
  212. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar022.mp3", "", "", 3303644625, 2884478999, Spawn)
  213. AddConversationOption(conversation, "I will do this now.", "OfferQuest2")
  214. StartConversation(conversation, NPC, Spawn, "You will see. Go speak with Milo, he's probably in the scribe's shop. Ask him about Lyssia and hear what he has to say. Then, once you've talked with him, go speak with Lyssia. Speak with her of Milo and hear what she has to say.")
  215. end
  216. function OfferQuest2(NPC, Spawn)
  217. FaceTarget(NPC, Spawn)
  218. OfferQuest(NPC, Spawn, QUEST_2)
  219. end
  220. function OnQuest2(NPC, Spawn, conversation)
  221. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar023.mp3", "", "", 1987312518, 1009995787, Spawn)
  222. if (HasQuest(Spawn, QUEST_2) and GetQuestStep(Spawn, QUEST_2) == 3) or (HasCompletedQuest(Spawn, QUEST_2)) then
  223. AddConversationOption(conversation, "What about Lyssia and Milo?", "dlg_25_1")
  224. end
  225. AddConversationOption(conversation, "No, not yet.")
  226. StartConversation(conversation, NPC, Spawn, "Ah, you again. Do you have time to help me? Something unfortunate has happened.")
  227. end
  228. function dlg_25_1(NPC, Spawn)
  229. if HasQuest(Spawn, QUEST_2) then
  230. SetStepComplete(Spawn, QUEST_2, 3)
  231. end
  232. FaceTarget(NPC, Spawn)
  233. conversation = CreateConversation()
  234. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar024.mp3", "", "", 3886614999, 1370308488, Spawn)
  235. AddConversationOption(conversation, "Yes, I will find them.", "OfferQuest3")
  236. StartConversation(conversation, NPC, Spawn, "I look forward to speaking of them, but something more pressing has come up. I was writing an essay and did something foolish. I was taking a short break and forgot to weigh them down. When I got back, they had been strewn about by the wind. I would look for them myself but I found a dog chewing on a couple of pages and now must re-write them. Would you do me the favor of finding them?")
  237. end
  238. -------------------------------------------------------------------------------------------------------------
  239. -- QUEST 3
  240. -------------------------------------------------------------------------------------------------------------
  241. function OfferQuest3(NPC, Spawn)
  242. FaceTarget(NPC, Spawn)
  243. OfferQuest(NPC, Spawn, QUEST_3)
  244. end
  245. function OnQuest3(NPC, Spawn, conversation)
  246. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar026.mp3", "", "", 3561672616, 1164580371, Spawn)
  247. if (HasQuest(Spawn, QUEST_3) and GetQuestStep(Spawn, QUEST_3) == 6) or (HasCompletedQuest(Spawn, QUEST_3)) then
  248. AddConversationOption(conversation, "Yes, I have.", "dlg_28_1")
  249. end
  250. AddConversationOption(conversation, "No, I'm still looking.")
  251. StartConversation(conversation, NPC, Spawn, "Have you gathered my missing pages?")
  252. end
  253. function dlg_28_1(NPC, Spawn)
  254. FaceTarget(NPC, Spawn)
  255. conversation = CreateConversation()
  256. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar027.mp3", "", "", 2556350607, 3573421979, Spawn)
  257. AddConversationOption(conversation, "Glad to help.", "dlg_28_2")
  258. StartConversation(conversation, NPC, Spawn, "Oh! Wonderful. None of them very bad off, either. Thank you!")
  259. end
  260. function dlg_28_2(NPC, Spawn)
  261. FaceTarget(NPC, Spawn)
  262. conversation = CreateConversation()
  263. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar028.mp3", "", "", 3655869772, 4113159808, Spawn)
  264. AddConversationOption(conversation, "Milo praised Lyssia's beauty, wit, and wisdom. He considers himself very lucky to be with her. Lyssia was quite taken with Milo's strength and compassion. She considers him very empathic as well, even if he doesn't realize it himself.", "dlg_28_3")
  265. StartConversation(conversation, NPC, Spawn, "Anyway, where were we? Ah, yes, Lyssia and Milo. How did they speak of each other?")
  266. end
  267. function dlg_28_3(NPC, Spawn)
  268. FaceTarget(NPC, Spawn)
  269. conversation = CreateConversation()
  270. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar029.mp3", "", "", 1908930881, 2417556609, Spawn)
  271. AddConversationOption(conversation, "That makes sense.", "dlg_28_4")
  272. AddConversationOption(conversation, "I wish others saw it the same way.")
  273. StartConversation(conversation, NPC, Spawn, "What they love about each other are the strengths of their individual races. Obviously love isn't that simple, but I believe this situation can be simplified as such. These strengths are important to keep in mind for an Ayr'Dal, especially if you ever get hung-up about sharing the weaknesses of two races. The strengths of humans and elves don't make us better people than other races, just as the weaknesses of humans and elves don't make us any worse.")
  274. end
  275. function dlg_28_4(NPC, Spawn)
  276. if HasQuest(Spawn, QUEST_3) then
  277. SetStepComplete(Spawn, QUEST_3, 6)
  278. end
  279. FaceTarget(NPC, Spawn)
  280. conversation = CreateConversation()
  281. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar030.mp3", "", "", 1627998814, 4283869270, Spawn)
  282. AddConversationOption(conversation, "Sure. Where shall I deliver it?", "dlg_28_5")
  283. AddConversationOption(conversation, "Sorry, not right now.")
  284. StartConversation(conversation, NPC, Spawn, "Indeed. It is a hard life sometimes, but it is also a life that is immensely rewarding. That is part of what I wrote about in this essay. Now that it is complete, I would like a friend of mine to have a copy. How would you feel about taking it to him?")
  285. end
  286. -------------------------------------------------------------------------------------------------------------
  287. -- QUEST 4
  288. -------------------------------------------------------------------------------------------------------------
  289. function dlg_28_5(NPC, Spawn)
  290. FaceTarget(NPC, Spawn)
  291. conversation = CreateConversation()
  292. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar031.mp3", "", "", 1295736180, 2860966906, Spawn)
  293. AddConversationOption(conversation, "I will do it.", "OfferQuest4")
  294. StartConversation(conversation, NPC, Spawn, "Take this to Elvic Garrett, who has ventured into the Forest Ruins. He's probably hanging around just outside the ruins. I'm sure you'll both be able to help each other.")
  295. end
  296. function OfferQuest4(NPC, Spawn)
  297. FaceTarget(NPC, Spawn)
  298. OfferQuest(NPC, Spawn, QUEST_4)
  299. end
  300. function OnQuest4(NPC, Spawn, conversation)
  301. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar032.mp3", "", "", 664768434, 4226354942, Spawn)
  302. if HasCompletedQuest(Spawn, QUEST_4) then
  303. AddConversationOption(conversation, "Yes, I have.", "dlg_0_1")
  304. end
  305. AddConversationOption(conversation, "No, not yet.")
  306. StartConversation(conversation, NPC, Spawn, "Have you spoken with Elvic yet?")
  307. end
  308. function dlg_0_1(NPC, Spawn)
  309. FaceTarget(NPC, Spawn)
  310. conversation = CreateConversation()
  311. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/daelyn_twinstar/qey_village05/quests/daelyn_twinstar/daelyn_twinstar033.mp3", "", "", 2806146323, 1271023417, Spawn)
  312. AddConversationOption(conversation, "I hope so.")
  313. StartConversation(conversation, NPC, Spawn, "Good, good, he can teach you much.")
  314. end