LandwynVelamir.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320
  1. --[[
  2. Script Name : LandwynVelamir.lua
  3. Script Purpose : Landwyn Velamir
  4. Script Author : premierio015
  5. Script Date : 15.09.2021
  6. Script Notes :
  7. --]]
  8. local UnderAShadyTree = 5356
  9. local ABowForABeauty = 5357
  10. local SheWillBeAShiningPetal = 5358
  11. local PeppermintsAndPotions = 5359
  12. local SongToPrexus = 5360
  13. function spawn(NPC)
  14. SetPlayerProximityFunction(NPC, 10, "InRange")
  15. end
  16. function InRange(NPC, Spawn)
  17. if not HasQuest(Spawn, UnderAShadyTree) and not HasCompletedQuest(Spawn, UnderAShadyTree) then
  18. ProvidesQuest(NPC, UnderAShadyTree)
  19. SetInfoFlag(NPC)
  20. SetVisualFlag(NPC)
  21. elseif HasCompletedQuest(Spawn, UnderAShadyTree) then
  22. ProvidesQuest(NPC, ABowForABeauty)
  23. SetInfoFlag(NPC)
  24. SetVisualFlag(NPC)
  25. elseif HasCompletedQuest(Spawn, ABowForABeauty) then
  26. ProvidesQuest(NPC, SheWillBeAShiningPetal)
  27. SetInfoFlag(NPC)
  28. SetVisualFlag(NPC)
  29. elseif HasCompletedQuest(Spawn, SheWillBeAShiningPetal) then
  30. ProvidesQuest(NPC, PeppermintsAndPotions)
  31. SetInfoFlag(NPC)
  32. SetVisualFlag(NPC)
  33. elseif HasCompletedQuest(Spawn, PeppermintsAndPotions) then
  34. ProvidesQuest(NPC, SongToPrexus)
  35. SetInfoFlag(NPC)
  36. SetVisualFlag(NPC)
  37. end
  38. end
  39. function respawn(NPC)
  40. spawn(NPC)
  41. end
  42. function hailed(NPC, Spawn)
  43. local conversation = CreateConversation()
  44. FaceTarget(NPC, Spawn)
  45. local choice = MakeRandomInt(1, 5)
  46. if choice == 1 then
  47. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3", "", "", 0, 0, Spawn)
  48. elseif choice == 2 then
  49. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1034.mp3", "", "", 0, 0, Spawn)
  50. elseif choice == 3 then
  51. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1034.mp3", "", "", 0, 0, Spawn)
  52. elseif choice == 4 then
  53. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1012.mp3", "", "", 0, 0, Spawn)
  54. elseif choice == 5 then
  55. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1012.mp3", "", "", 0, 0, Spawn)
  56. end
  57. if not HasQuest(Spawn, UnderAShadyTree) and not HasCompletedQuest(Spawn, UnderAShadyTree) then
  58. AddConversationOption(conversation, "It seems not as well as you.", "Option1")
  59. AddConversationOption(conversation, "I have no time for love.")
  60. StartConversation(conversation, NPC, Spawn, "Do you know love, my friend?")
  61. elseif GetQuestStep(Spawn, UnderAShadyTree) == 1 or GetQuestStep(Spawn, ABowForABeauty) == 1 or GetQuestStep(Spawn, ABowForABeauty) == 2 or GetQuestStep(Spawn, SheWillBeAShiningPetal) == 1 or GetQuestStep(Spawn, PeppermintsAndPotions) == 1 or GetQuestStep(Spawn, PeppermintsAndPotions) == 2 or GetQuestStep(Spawn, PeppermintsAndPotions) == 3 or GetQuestStep(Spawn, SongToPrexus) == 1 then
  62. PlayFlavor(NPC, "", "Returning to me with information of love?", "", 1689589577, 4560189, Spawn)
  63. elseif GetQuestStep(Spawn, UnderAShadyTree) == 2 then
  64. AddConversationOption(conversation, "Here are the flowers.", "Option4")
  65. AddConversationOption(conversation, "I have no time for love.")
  66. StartConversation(conversation, NPC, Spawn, "Her beauty will never wilt.")
  67. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and not HasQuest(Spawn, ABowForABeauty) and not HasCompletedQuest(Spawn, ABowForABeauty) then
  68. Option5(NPC, Spawn)
  69. elseif GetQuestStep(Spawn, ABowForABeauty) == 3 then
  70. Option8(NPC, Spawn)
  71. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and HasCompletedQuest(Spawn, ABowForABeauty) and not HasQuest(Spawn, SheWillBeAShiningPetal) and not HasCompletedQuest(Spawn, SheWillBeAShiningPetal) then
  72. Option10(NPC, Spawn)
  73. elseif GetQuestStep(Spawn, SheWillBeAShiningPetal) == 2 then
  74. Option13(NPC, Spawn)
  75. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and HasCompletedQuest(Spawn, ABowForABeauty) and HasCompletedQuest(Spawn, SheWillBeAShiningPetal) and not HasQuest(Spawn, PeppermintsAndPotions) and not HasCompletedQuest(Spawn, PeppermintsAndPotions) then
  76. Option15(NPC, Spawn)
  77. elseif GetQuestStep(Spawn, ABowForABeauty) == 4 then
  78. Option17(NPC, Spawn)
  79. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and HasCompletedQuest(Spawn, ABowForABeauty) and HasCompletedQuest(Spawn, SheWillBeAShiningPetal) and HasCompletedQuest(Spawn, PeppermintsAndPotions) and not HasQuest(Spawn, SongToPrexus) and not HasCompletedQuest(Spawn, SongToPrexus) then
  80. Option19(NPC, Spawn)
  81. elseif GetQuestStep(Spawn, SongToPrexus) == 2 then
  82. Option23(NPC, Spawn)
  83. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and HasCompletedQuest(Spawn, ABowForABeauty) and HasCompletedQuest(Spawn, SheWillBeAShiningPetal) and HasCompletedQuest(Spawn, PeppermintsAndPotions) and HasCompletedQuest(Spawn, SongToPrexus) then
  84. PlayFlavor(NPC, "", "I may have lost love, but I have grown as a person.", "", 1689589577, 4560189, Spawn)
  85. end
  86. end
  87. function Option1(NPC, Spawn)
  88. FaceTarget(NPC, Spawn)
  89. local conversation = CreateConversation()
  90. AddConversationOption(conversation, "Oh, what does she look like?", "Option2")
  91. AddConversationOption(conversation, "Well, good luck to you. Bye.")
  92. StartConversation(conversation, NPC, Spawn, "How lucky I am. I have been holding this gift for my love for quite some time, but, alas, my duties keep me here. How sad it is that this flower shall wilt in the wait. Still, I am lucky, for her beauty shall never wane.")
  93. end
  94. function Option2(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. local conversation = CreateConversation()
  97. AddConversationOption(conversation, "She sounds beautiful. Your flowers are wilted though. Let me gather some new ones for you.", "Option3")
  98. AddConversationOption(conversation, "Good luck giving her the present. Bye.")
  99. StartConversation(conversation, NPC, Spawn, "How does one compare the beauty of a goddess using the words of mere mortals? Her hair is the color of the rising sun, containing the most glorious hues of the dawn. Her skin is akin to porcelain, flawless and immaculate. Her eyes are the green of a springtime meadow, with small bursts like the yellow of daisies in their center. Her lithe body is soft and curved like the waves of the sea. I only wish my eyes could witness her beauty once again.")
  100. end
  101. function Option3(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. local conversation = CreateConversation()
  104. AddConversationOption(conversation, "I will find them.", "offer")
  105. StartConversation(conversation, NPC, Spawn, "That would be splendid! Last I saw, there were some beneath a shaded tree north of here.")
  106. end
  107. function Option4(NPC, Spawn)
  108. SetStepComplete(Spawn, UnderAShadyTree, 2)
  109. FaceTarget(NPC, Spawn)
  110. local conversation = CreateConversation()
  111. AddConversationOption(conversation, "Most excellent.")
  112. StartConversation(conversation, NPC, Spawn, "Splendid! They will look wonderful in her hair.")
  113. end
  114. function Option5(NPC, Spawn)
  115. FaceTarget(NPC, Spawn)
  116. local conversation = CreateConversation()
  117. AddConversationOption(conversation, "You seem to be full of it.", "Option6")
  118. AddConversationOption(conversation, "I have no time for love.")
  119. StartConversation(conversation, NPC, Spawn, "Such a powerful emotion love is, don't you think?")
  120. end
  121. function Option6(NPC, Spawn)
  122. FaceTarget(NPC, Spawn)
  123. local conversation = CreateConversation()
  124. AddConversationOption(conversation, "What did you have in mind?", "Option7")
  125. AddConversationOption(conversation, "I'm sure she does, but I must go.")
  126. StartConversation(conversation, NPC, Spawn, "Aye, that I am. Not only is my maiden fair, but she is also resourceful. Many has she taught the art of survival and hunting. Her graceful hands make a dance out of the barbarism of warfare. Her eye is better than the eagle. I have long thought that she deserves a bow as remarkable as her.")
  127. end
  128. function Option7(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. local conversation = CreateConversation()
  131. AddConversationOption(conversation, "Absolutely.", "offer2")
  132. AddConversationOption(conversation, "No thanks. I am done courting your girl for you.")
  133. StartConversation(conversation, NPC, Spawn, "The insects of this area are sometimes seen as grotesque, but in them I see fluidity and strength. Their limbs would serve well as a handle to a bow worthy of her refined tastes. I, of course, am still stuck here. Would you assist me again? I need insect limbs to create a bow.")
  134. end
  135. function Option8(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. local conversation = CreateConversation()
  138. AddConversationOption(conversation, "Here are the legs.", "Option9")
  139. AddConversationOption(conversation, "I have no time for love.")
  140. StartConversation(conversation, NPC, Spawn, "I would wait an eternity to be by love's side.")
  141. end
  142. function Option9(NPC, Spawn)
  143. SetStepComplete(Spawn, ABowForABeauty, 3)
  144. FaceTarget(NPC, Spawn)
  145. local conversation = CreateConversation()
  146. AddConversationOption(conversation, "Good for you.")
  147. StartConversation(conversation, NPC, Spawn, "To make the best bow!")
  148. end
  149. function Option10(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. local conversation = CreateConversation()
  152. AddConversationOption(conversation, "Does love's flower still bloom?", "Option11")
  153. AddConversationOption(conversation, "I have no time for love.")
  154. StartConversation(conversation, NPC, Spawn, "Love fills one with the glow of life.")
  155. end
  156. function Option11(NPC, Spawn)
  157. FaceTarget(NPC, Spawn)
  158. local conversation = CreateConversation()
  159. AddConversationOption(conversation, "Of course she will. How may I help?", "Option12")
  160. AddConversationOption(conversation, "A true sadness. I must be going, though.")
  161. StartConversation(conversation, NPC, Spawn, "Quite well my friend! I have thought of the most splendid gift for my lady, but I cannot leave my post here. I fear she will never receive the gifts of my heart.")
  162. end
  163. function Option12(NPC, Spawn)
  164. FaceTarget(NPC, Spawn)
  165. local conversation = CreateConversation()
  166. AddConversationOption(conversation, "I would be honored.", "offer3")
  167. AddConversationOption(conversation, "Not now, friend.")
  168. StartConversation(conversation, NPC, Spawn, "I have met an armorer who says he can make a glowing pendant for my love. The pendant shall always light her gorgeous face as she walks along in this dreary world. For, always with her is the light of our love and always should it be displayed for all to see. The armorer says all he requires are the still-glowing shells of a klicknik. Please, will you retrieve them?")
  169. end
  170. function Option13(NPC, Spawn)
  171. FaceTarget(NPC, Spawn)
  172. local conversation = CreateConversation()
  173. AddConversationOption(conversation, "Here are the shells.", "Option14")
  174. AddConversationOption(conversation, "I have no time for love.")
  175. StartConversation(conversation, NPC, Spawn, "Even in darkness I can find her.")
  176. end
  177. function Option14(NPC, Spawn)
  178. SetStepComplete(Spawn, SheWillBeAShiningPetal, 2)
  179. FaceTarget(NPC, Spawn)
  180. local conversation = CreateConversation()
  181. AddConversationOption(conversation, "Okay.")
  182. StartConversation(conversation, NPC, Spawn, "Her glow will outshine anything I fear.")
  183. end
  184. function Option15(NPC, Spawn)
  185. FaceTarget(NPC, Spawn)
  186. local conversation = CreateConversation()
  187. AddConversationOption(conversation, "When will the wedding occur?", "Option16")
  188. AddConversationOption(conversation, "I have no time for love.")
  189. StartConversation(conversation, NPC, Spawn, "Today is a joyous day, where my heart flies above the land.")
  190. end
  191. function Option16(NPC, Spawn)
  192. FaceTarget(NPC, Spawn)
  193. local conversation = CreateConversation()
  194. AddConversationOption(conversation, "Of course. Where is she?", "offer4")
  195. AddConversationOption(conversation, "Not right now.")
  196. StartConversation(conversation, NPC, Spawn, "Her hand I have not yet won. I have taken the liberty of preparing a gift for my love. Would you be able to deliver it to her?")
  197. end
  198. function Option17(NPC, Spawn)
  199. FaceTarget(NPC, Spawn)
  200. local conversation = CreateConversation()
  201. AddConversationOption(conversation, "I have looked everywhere.", "Option18")
  202. AddConversationOption(conversation, "I have no time for love.")
  203. StartConversation(conversation, NPC, Spawn, "\"Together, forever,\" is what I said.")
  204. end
  205. function Option18(NPC, Spawn)
  206. SetStepComplete(Spawn, PeppermintsAndPotions, 4)
  207. FaceTarget(NPC, Spawn)
  208. local conversation = CreateConversation()
  209. AddConversationOption(conversation, "Most assuredly.")
  210. StartConversation(conversation, NPC, Spawn, "I have heard from her, but am too distraught to talk. Please, return to me later.")
  211. end
  212. function Option19(NPC, Spawn)
  213. FaceTarget(NPC, Spawn)
  214. local conversation = CreateConversation()
  215. AddConversationOption(conversation, "What's wrong?", "Option20")
  216. AddConversationOption(conversation, "I have no time for love.")
  217. StartConversation(conversation, NPC, Spawn, "The horror! The shame!")
  218. end
  219. function Option20(NPC, Spawn)
  220. FaceTarget(NPC, Spawn)
  221. local conversation = CreateConversation()
  222. AddConversationOption(conversation, "What happened?", "Option21")
  223. AddConversationOption(conversation, "Never mind.")
  224. StartConversation(conversation, NPC, Spawn, "I... I... She... Ohhh!!!")
  225. end
  226. function Option21(NPC, Spawn)
  227. FaceTarget(NPC, Spawn)
  228. local conversation = CreateConversation()
  229. AddConversationOption(conversation, "Calm down. There are other fish in the sea.", "Option22")
  230. AddConversationOption(conversation, "I will leave you to mourn.")
  231. StartConversation(conversation, NPC, Spawn, "I gave her my love. I gave her my heart. I gave her everything of me and I have been betrayed. I have been cast aside, as if our love was nothing. I have been thrown overboard from the vessel of our hearts! Oh, sorrowful woe!")
  232. end
  233. function Option22(NPC, Spawn)
  234. FaceTarget(NPC, Spawn)
  235. local conversation = CreateConversation()
  236. AddConversationOption(conversation, "How dare she! Of course I will do this for you.", "offer5")
  237. AddConversationOption(conversation, "I cannot, friend. You may regret it.")
  238. StartConversation(conversation, NPC, Spawn, "Take this. Take all of this and give it to Prexus! Give it to the sea I have made with my tears. Drown it as my heart and soul have been drowned in the misery of my... my.... Throw it in the sea, I beg of you! Go to Lonely Isle, that has a fitting name, and dump it all in.")
  239. end
  240. function Option23(NPC, Spawn)
  241. FaceTarget(NPC, Spawn)
  242. local conversation = CreateConversation()
  243. AddConversationOption(conversation, "Think of her no more.", "Option24")
  244. AddConversationOption(conversation, "I have no time for love.")
  245. StartConversation(conversation, NPC, Spawn, "What now? What shall I do?")
  246. end
  247. function Option24(NPC, Spawn)
  248. SetStepComplete(Spawn, SongToPrexus, 2)
  249. FaceTarget(NPC, Spawn)
  250. local conversation = CreateConversation()
  251. AddConversationOption(conversation, "Don't give up hope.")
  252. StartConversation(conversation, NPC, Spawn, "I may never love again the way I loved her so.")
  253. end
  254. function offer(NPC, Spawn)
  255. OfferQuest(NPC, Spawn, UnderAShadyTree)
  256. end
  257. function offer2(NPC, Spawn)
  258. OfferQuest(NPC, Spawn, ABowForABeauty)
  259. end
  260. function offer3(NPC, Spawn)
  261. OfferQuest(NPC, Spawn, SheWillBeAShiningPetal)
  262. end
  263. function offer4(NPC, Spawn)
  264. OfferQuest(NPC, Spawn, PeppermintsAndPotions)
  265. end
  266. function offer5(NPC, Spawn)
  267. OfferQuest(NPC, Spawn, SongToPrexus)
  268. end