LandwynVelamir.lua 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325
  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. ProvidesQuest(NPC,UnderAShadyTree)
  16. ProvidesQuest(NPC,ABowForABeauty)
  17. ProvidesQuest(NPC,SheWillBeAShiningPetal)
  18. ProvidesQuest(NPC,PeppermintsAndPotions)
  19. ProvidesQuest(NPC,SongToPrexus)
  20. end
  21. function InRange(NPC, Spawn)
  22. if not HasQuest(Spawn, UnderAShadyTree) and not HasCompletedQuest(Spawn, UnderAShadyTree) then
  23. ProvidesQuest(NPC, UnderAShadyTree)
  24. SetInfoFlag(NPC)
  25. SetVisualFlag(NPC)
  26. elseif HasCompletedQuest(Spawn, UnderAShadyTree) then
  27. ProvidesQuest(NPC, ABowForABeauty)
  28. SetInfoFlag(NPC)
  29. SetVisualFlag(NPC)
  30. elseif HasCompletedQuest(Spawn, ABowForABeauty) then
  31. ProvidesQuest(NPC, SheWillBeAShiningPetal)
  32. SetInfoFlag(NPC)
  33. SetVisualFlag(NPC)
  34. elseif HasCompletedQuest(Spawn, SheWillBeAShiningPetal) then
  35. ProvidesQuest(NPC, PeppermintsAndPotions)
  36. SetInfoFlag(NPC)
  37. SetVisualFlag(NPC)
  38. elseif HasCompletedQuest(Spawn, PeppermintsAndPotions) then
  39. ProvidesQuest(NPC, SongToPrexus)
  40. SetInfoFlag(NPC)
  41. SetVisualFlag(NPC)
  42. end
  43. end
  44. function respawn(NPC)
  45. spawn(NPC)
  46. end
  47. function hailed(NPC, Spawn)
  48. local conversation = CreateConversation()
  49. FaceTarget(NPC, Spawn)
  50. local choice = MakeRandomInt(1, 5)
  51. if choice == 1 then
  52. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1034.mp3", "", "", 0, 0, Spawn)
  53. elseif choice == 2 then
  54. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1034.mp3", "", "", 0, 0, Spawn)
  55. elseif choice == 3 then
  56. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1034.mp3", "", "", 0, 0, Spawn)
  57. elseif choice == 4 then
  58. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1012.mp3", "", "", 0, 0, Spawn)
  59. elseif choice == 5 then
  60. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1012.mp3", "", "", 0, 0, Spawn)
  61. end
  62. if not HasQuest(Spawn, UnderAShadyTree) and not HasCompletedQuest(Spawn, UnderAShadyTree) then
  63. AddConversationOption(conversation, "It seems not as well as you.", "Option1")
  64. AddConversationOption(conversation, "I have no time for love.")
  65. StartConversation(conversation, NPC, Spawn, "Do you know love, my friend?")
  66. 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
  67. PlayFlavor(NPC, "", "Returning to me with information of love?", "", 1689589577, 4560189, Spawn)
  68. elseif GetQuestStep(Spawn, UnderAShadyTree) == 2 then
  69. AddConversationOption(conversation, "Here are the flowers.", "Option4")
  70. AddConversationOption(conversation, "I have no time for love.")
  71. StartConversation(conversation, NPC, Spawn, "Her beauty will never wilt.")
  72. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and not HasQuest(Spawn, ABowForABeauty) and not HasCompletedQuest(Spawn, ABowForABeauty) then
  73. Option5(NPC, Spawn)
  74. elseif GetQuestStep(Spawn, ABowForABeauty) == 3 then
  75. Option8(NPC, Spawn)
  76. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and HasCompletedQuest(Spawn, ABowForABeauty) and not HasQuest(Spawn, SheWillBeAShiningPetal) and not HasCompletedQuest(Spawn, SheWillBeAShiningPetal) then
  77. Option10(NPC, Spawn)
  78. elseif GetQuestStep(Spawn, SheWillBeAShiningPetal) == 2 then
  79. Option13(NPC, Spawn)
  80. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and HasCompletedQuest(Spawn, ABowForABeauty) and HasCompletedQuest(Spawn, SheWillBeAShiningPetal) and not HasQuest(Spawn, PeppermintsAndPotions) and not HasCompletedQuest(Spawn, PeppermintsAndPotions) then
  81. Option15(NPC, Spawn)
  82. elseif GetQuestStep(Spawn, ABowForABeauty) == 4 then
  83. Option17(NPC, Spawn)
  84. 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
  85. Option19(NPC, Spawn)
  86. elseif GetQuestStep(Spawn, SongToPrexus) == 2 then
  87. Option23(NPC, Spawn)
  88. elseif HasCompletedQuest(Spawn, UnderAShadyTree) and HasCompletedQuest(Spawn, ABowForABeauty) and HasCompletedQuest(Spawn, SheWillBeAShiningPetal) and HasCompletedQuest(Spawn, PeppermintsAndPotions) and HasCompletedQuest(Spawn, SongToPrexus) then
  89. PlayFlavor(NPC, "", "I may have lost love, but I have grown as a person.", "", 1689589577, 4560189, Spawn)
  90. end
  91. end
  92. function Option1(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. local conversation = CreateConversation()
  95. AddConversationOption(conversation, "Oh, what does she look like?", "Option2")
  96. AddConversationOption(conversation, "Well, good luck to you. Bye.")
  97. 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.")
  98. end
  99. function Option2(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. local conversation = CreateConversation()
  102. AddConversationOption(conversation, "She sounds beautiful. Your flowers are wilted though. Let me gather some new ones for you.", "Option3")
  103. AddConversationOption(conversation, "Good luck giving her the present. Bye.")
  104. 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.")
  105. end
  106. function Option3(NPC, Spawn)
  107. FaceTarget(NPC, Spawn)
  108. local conversation = CreateConversation()
  109. AddConversationOption(conversation, "I will find them.", "offer")
  110. StartConversation(conversation, NPC, Spawn, "That would be splendid! Last I saw, there were some beneath a shaded tree north of here.")
  111. end
  112. function Option4(NPC, Spawn)
  113. SetStepComplete(Spawn, UnderAShadyTree, 2)
  114. FaceTarget(NPC, Spawn)
  115. local conversation = CreateConversation()
  116. AddConversationOption(conversation, "Most excellent.")
  117. StartConversation(conversation, NPC, Spawn, "Splendid! They will look wonderful in her hair.")
  118. end
  119. function Option5(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. local conversation = CreateConversation()
  122. AddConversationOption(conversation, "You seem to be full of it.", "Option6")
  123. AddConversationOption(conversation, "I have no time for love.")
  124. StartConversation(conversation, NPC, Spawn, "Such a powerful emotion love is, don't you think?")
  125. end
  126. function Option6(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. local conversation = CreateConversation()
  129. AddConversationOption(conversation, "What did you have in mind?", "Option7")
  130. AddConversationOption(conversation, "I'm sure she does, but I must go.")
  131. 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.")
  132. end
  133. function Option7(NPC, Spawn)
  134. FaceTarget(NPC, Spawn)
  135. local conversation = CreateConversation()
  136. AddConversationOption(conversation, "Absolutely.", "offer2")
  137. AddConversationOption(conversation, "No thanks. I am done courting your girl for you.")
  138. 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.")
  139. end
  140. function Option8(NPC, Spawn)
  141. FaceTarget(NPC, Spawn)
  142. local conversation = CreateConversation()
  143. AddConversationOption(conversation, "Here are the legs.", "Option9")
  144. AddConversationOption(conversation, "I have no time for love.")
  145. StartConversation(conversation, NPC, Spawn, "I would wait an eternity to be by love's side.")
  146. end
  147. function Option9(NPC, Spawn)
  148. SetStepComplete(Spawn, ABowForABeauty, 3)
  149. FaceTarget(NPC, Spawn)
  150. local conversation = CreateConversation()
  151. AddConversationOption(conversation, "Good for you.")
  152. StartConversation(conversation, NPC, Spawn, "To make the best bow!")
  153. end
  154. function Option10(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. local conversation = CreateConversation()
  157. AddConversationOption(conversation, "Does love's flower still bloom?", "Option11")
  158. AddConversationOption(conversation, "I have no time for love.")
  159. StartConversation(conversation, NPC, Spawn, "Love fills one with the glow of life.")
  160. end
  161. function Option11(NPC, Spawn)
  162. FaceTarget(NPC, Spawn)
  163. local conversation = CreateConversation()
  164. AddConversationOption(conversation, "Of course she will. How may I help?", "Option12")
  165. AddConversationOption(conversation, "A true sadness. I must be going, though.")
  166. 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.")
  167. end
  168. function Option12(NPC, Spawn)
  169. FaceTarget(NPC, Spawn)
  170. local conversation = CreateConversation()
  171. AddConversationOption(conversation, "I would be honored.", "offer3")
  172. AddConversationOption(conversation, "Not now, friend.")
  173. 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?")
  174. end
  175. function Option13(NPC, Spawn)
  176. FaceTarget(NPC, Spawn)
  177. local conversation = CreateConversation()
  178. AddConversationOption(conversation, "Here are the shells.", "Option14")
  179. AddConversationOption(conversation, "I have no time for love.")
  180. StartConversation(conversation, NPC, Spawn, "Even in darkness I can find her.")
  181. end
  182. function Option14(NPC, Spawn)
  183. SetStepComplete(Spawn, SheWillBeAShiningPetal, 2)
  184. FaceTarget(NPC, Spawn)
  185. local conversation = CreateConversation()
  186. AddConversationOption(conversation, "Okay.")
  187. StartConversation(conversation, NPC, Spawn, "Her glow will outshine anything I fear.")
  188. end
  189. function Option15(NPC, Spawn)
  190. FaceTarget(NPC, Spawn)
  191. local conversation = CreateConversation()
  192. AddConversationOption(conversation, "When will the wedding occur?", "Option16")
  193. AddConversationOption(conversation, "I have no time for love.")
  194. StartConversation(conversation, NPC, Spawn, "Today is a joyous day, where my heart flies above the land.")
  195. end
  196. function Option16(NPC, Spawn)
  197. FaceTarget(NPC, Spawn)
  198. local conversation = CreateConversation()
  199. AddConversationOption(conversation, "Of course. Where is she?", "offer4")
  200. AddConversationOption(conversation, "Not right now.")
  201. 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?")
  202. end
  203. function Option17(NPC, Spawn)
  204. FaceTarget(NPC, Spawn)
  205. local conversation = CreateConversation()
  206. AddConversationOption(conversation, "I have looked everywhere.", "Option18")
  207. AddConversationOption(conversation, "I have no time for love.")
  208. StartConversation(conversation, NPC, Spawn, "\"Together, forever,\" is what I said.")
  209. end
  210. function Option18(NPC, Spawn)
  211. SetStepComplete(Spawn, PeppermintsAndPotions, 4)
  212. FaceTarget(NPC, Spawn)
  213. local conversation = CreateConversation()
  214. AddConversationOption(conversation, "Most assuredly.")
  215. StartConversation(conversation, NPC, Spawn, "I have heard from her, but am too distraught to talk. Please, return to me later.")
  216. end
  217. function Option19(NPC, Spawn)
  218. FaceTarget(NPC, Spawn)
  219. local conversation = CreateConversation()
  220. AddConversationOption(conversation, "What's wrong?", "Option20")
  221. AddConversationOption(conversation, "I have no time for love.")
  222. StartConversation(conversation, NPC, Spawn, "The horror! The shame!")
  223. end
  224. function Option20(NPC, Spawn)
  225. FaceTarget(NPC, Spawn)
  226. local conversation = CreateConversation()
  227. AddConversationOption(conversation, "What happened?", "Option21")
  228. AddConversationOption(conversation, "Never mind.")
  229. StartConversation(conversation, NPC, Spawn, "I... I... She... Ohhh!!!")
  230. end
  231. function Option21(NPC, Spawn)
  232. FaceTarget(NPC, Spawn)
  233. local conversation = CreateConversation()
  234. AddConversationOption(conversation, "Calm down. There are other fish in the sea.", "Option22")
  235. AddConversationOption(conversation, "I will leave you to mourn.")
  236. 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!")
  237. end
  238. function Option22(NPC, Spawn)
  239. FaceTarget(NPC, Spawn)
  240. local conversation = CreateConversation()
  241. AddConversationOption(conversation, "How dare she! Of course I will do this for you.", "offer5")
  242. AddConversationOption(conversation, "I cannot, friend. You may regret it.")
  243. 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.")
  244. end
  245. function Option23(NPC, Spawn)
  246. FaceTarget(NPC, Spawn)
  247. local conversation = CreateConversation()
  248. AddConversationOption(conversation, "Think of her no more.", "Option24")
  249. AddConversationOption(conversation, "I have no time for love.")
  250. StartConversation(conversation, NPC, Spawn, "What now? What shall I do?")
  251. end
  252. function Option24(NPC, Spawn)
  253. SetStepComplete(Spawn, SongToPrexus, 2)
  254. FaceTarget(NPC, Spawn)
  255. local conversation = CreateConversation()
  256. AddConversationOption(conversation, "Don't give up hope.")
  257. StartConversation(conversation, NPC, Spawn, "I may never love again the way I loved her so.")
  258. end
  259. function offer(NPC, Spawn)
  260. OfferQuest(NPC, Spawn, UnderAShadyTree)
  261. end
  262. function offer2(NPC, Spawn)
  263. OfferQuest(NPC, Spawn, ABowForABeauty)
  264. end
  265. function offer3(NPC, Spawn)
  266. OfferQuest(NPC, Spawn, SheWillBeAShiningPetal)
  267. end
  268. function offer4(NPC, Spawn)
  269. OfferQuest(NPC, Spawn, PeppermintsAndPotions)
  270. end
  271. function offer5(NPC, Spawn)
  272. OfferQuest(NPC, Spawn, SongToPrexus)
  273. end