Rikantus.lua 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. --[[
  2. Script Name : SpawnScripts/Antonica/Rikantus.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.21 09:07:19
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local ScrawlingsInTheDark = 5329
  10. local TheTrialsOfSirMorgan = 5330
  11. local TheHiddenRiddle = 5331
  12. local WhispersOfFortune = 5809
  13. function spawn(NPC)
  14. SetPlayerProximityFunction(NPC, 10, "InRange")
  15. ProvidesQuest(NPC,ScrawlingsInTheDark)
  16. ProvidesQuest(NPC,TheTrialsOfSirMorgan)
  17. ProvidesQuest(NPC,TheHiddenRiddle)
  18. ProvidesQuest(NPC,WhispersOfFortune)
  19. end
  20. function InRange(NPC, Spawn)
  21. if CanRecieveQuest(Spawn, ScrawlingsInTheDark) then
  22. ProvidesQuest(NPC, ScrawlingsInTheDark)
  23. SetInfoFlag(NPC)
  24. SetVisualFlag(NPC)
  25. elseif HasCompletedQuest(Spawn, ScrawlingsInTheDark) then
  26. ProvidesQuest(NPC, TheTrialsOfSirMorgan)
  27. SetInfoFlag(NPC)
  28. SetVisualFlag(NPC)
  29. elseif HasCompletedQuest(Spawn, TheTrialsOfSirMorgan) then
  30. ProvidesQuest(NPC, TheHiddenRiddle)
  31. SetInfoFlag(NPC)
  32. SetVisualFlag(NPC)
  33. elseif HasCompletedQuest(Spawn, TheHiddenRiddle) and not HasCompletedQuest(Spawn, WhispersOfFortune) then
  34. ProvidesQuest(NPC, WhispersOfFortune)
  35. SetInfoFlag(NPC)
  36. SetVisualFlag(NPC)
  37. end
  38. end
  39. function hailed(NPC, Spawn)
  40. FaceTarget(NPC, Spawn)
  41. if CanReceiveQuest(Spawn, ScrawlingsInTheDark) then
  42. Option0(NPC, Spawn)
  43. elseif GetQuestStep(Spawn, ScrawlingsInTheDark) < 5 then
  44. PlayFlavor(NPC, "voiceover/english/optional1/rikantus/antonica/quest/020_human_male_rikantus_incomplete_fc0224e5.mp3", "I sent you on your way. Do not return until you have what I desire.", "", 532105714, 2356318843, Spawn)
  45. elseif GetQuestStep(Spawn, ScrawlingsInTheDark) == 5 then
  46. Option5(NPC, Spawn)
  47. elseif HasCompletedQuest(Spawn, ScrawlingsInTheDark) and not HasQuest(Spawn, TheTrialsOfSirMorgan) and not HasCompletedQuest(Spawn, TheTrialsOfSirMorgan) then
  48. Option8(NPC, Spawn)
  49. elseif GetQuestStep(Spawn, TheTrialsOfSirMorgan) == 15 then
  50. Option9(NPC, Spawn)
  51. elseif HasCompletedQuest(Spawn, TheTrialsOfSirMorgan) and not HasCompletedQuest(Spawn, TheHiddenRiddle) then
  52. Option11(NPC, Spawn)
  53. elseif GetQuestStep(Spawn, TheHiddenRiddle) == 5 then
  54. Option15(NPC, Spawn)
  55. elseif HasCompletedQuest(Spawn, TheHiddenRiddle) and not HasQuest(Spawn, WhispersOfFortune) then
  56. Option17(NPC, Spawn)
  57. elseif GetQuestStep(Spawn, WhispersOfFortune) == 1 or GetQuestStep(Spawn, WhispersOfFortune) == 2 then
  58. Option18(NPC, Spawn)
  59. elseif GetQuestStep(Spawn, WhispersOfFortune) == 3 then
  60. Option19(NPC, Spawn)
  61. elseif HasCompletedQuest(Spawn, WhispersOfFortune) then
  62. QuestsCompleted(NPC, Spawn)
  63. end
  64. end
  65. function QuestsCompleted(NPC, Spawn)
  66. Dialog.New(NPC, Spawn)
  67. Dialog.AddDialog("I offer you the key to fortunes never dreamt. Do not reject them! Obtain the exquisite pleasures of the eternal embrace of Nektropos Castle, " .. GetName(Spawn) .. " ")
  68. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_1_1052.mp3", 0, 0)
  69. Dialog.AddOption("Maybe I should return to Nektropos Castle. Farewell Rikantus or whatever you are. ")
  70. Dialog.Start()
  71. end
  72. function Option0(NPC, Spawn)
  73. Dialog.New(NPC, Spawn)
  74. Dialog.AddDialog("My camp is your camp, traveler. Sit, sit ... rest a spell. Perhaps the evils of the countryside will subside whilst you warm your belly with some eidolon stew.")
  75. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus000.mp3", 1901210985, 121957326)
  76. Dialog.AddOption("You're very kind, but how safe can a cemetery be? ", "Option1")
  77. Dialog.AddOption("This place gives me the creeps. I am going.")
  78. Dialog.Start()
  79. end
  80. function Option1(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. Dialog.New(NPC, Spawn)
  83. Dialog.AddDialog("Do not fear Evernight Cemetery. It is nothing but an old forgotten plot of land now. Nothing to fear here. The dead have long since dug their way out and found their way home or found their way to vengeance. Now how about that stew? My best batch yet.")
  84. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus001.mp3", 3613823523, 1875879979)
  85. PlayFlavor(NPC,"","","no",0,0,Spawn)
  86. Dialog.AddOption("Thank you. So what brings an old man into the wilderness? ", "Option2")
  87. Dialog.AddOption("This place gives me the creeps. I am going. ")
  88. Dialog.Start()
  89. end
  90. function Option2(NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. Dialog.New(NPC, Spawn)
  93. Dialog.AddDialog("I'm glad you asked. I am a trader of rare trinkets and a haggler of oddities. Only within the undiscovered territories will I find lost treasures the likes of which attract only the highest profits.")
  94. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus002.mp3", 4016493170, 1510119490)
  95. Dialog.AddOption("So you risk your life for heavy coin? ", "Option3")
  96. Dialog.AddOption("You're rathed to be out here and so am I. Farewell.")
  97. Dialog.Start()
  98. end
  99. function Option3(NPC, Spawn)
  100. FaceTarget(NPC, Spawn)
  101. Dialog.New(NPC, Spawn)
  102. Dialog.AddDialog("Profit is not always measured in the tangible. I carry only the rarest of goods and require the greatest of value in trade. Often times the most valuable possessions cannot be contained within a coin purse. Perhaps we can haggle?")
  103. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus003.mp3", 2196343128, 4289160442)
  104. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  105. Dialog.AddOption("What do you have for sale? ", "Option4")
  106. Dialog.AddOption("I am afraid I can stay no longer. Farewell.")
  107. Dialog.Start()
  108. end
  109. function Option4(NPC, Spawn)
  110. FaceTarget(NPC, Spawn)
  111. Dialog.New(NPC, Spawn)
  112. Dialog.AddDialog("You are not ready to behold one of my curios, but we may well have business to discuss. You are an explorer, an adventurer of the wilds. I am but an old man with a walking stick. Help me and I will offer you a sliver of wonder ... a trinket more priceless than all the platinum on Norrath.")
  113. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus004.mp3", 1663634136, 3735069894)
  114. PlayFlavor(NPC,"","","no",0,0,Spawn)
  115. Dialog.AddOption("What do you wish me to do in exchange for such a trinket? ", "offer")
  116. Dialog.AddOption("I cannot help you. I must leave.")
  117. Dialog.Start()
  118. end
  119. function Option5(NPC, Spawn)
  120. FaceTarget(NPC, Spawn)
  121. Dialog.New(NPC, Spawn)
  122. Dialog.AddDialog("The Scrawlings of Chirannis are mine yet again. Never shall we let it drift from embrace until the cursed words and foul creed are needed again.")
  123. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus006.mp3", 2543025307, 3679314881)
  124. Dialog.AddOption("What is this book and why did the gnolls have it? ", "Option6")
  125. Dialog.AddOption("I have no time for your words. Farewell.")
  126. Dialog.Start()
  127. end
  128. function Option6(NPC, Spawn)
  129. FaceTarget(NPC, Spawn)
  130. Dialog.New(NPC, Spawn)
  131. Dialog.AddDialog("The scratches within this ghastly tome have traveled far to meet the ears of gnolls. It speaks to them of origins and guides them to a foreboding destiny. The gnolls regard this as their newfound highest writ from the dog lord, Chirannis. They shall be very displeased that the sacred words were stolen from their lair.")
  132. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus007.mp3", 1593578762, 1746394351)
  133. Dialog.AddOption("You promised me a reward.", "Option7")
  134. Dialog.AddOption("I have no time for your words. Farewell.")
  135. Dialog.Start()
  136. end
  137. function Option7(NPC, Spawn)
  138. SetStepComplete(Spawn, ScrawlingsInTheDark, 5)
  139. FaceTarget(NPC, Spawn)
  140. Dialog.New(NPC, Spawn)
  141. Dialog.AddDialog("Here is your reward, a trinket from my personal vaults. It may appear old and tattered, but the wisdom within shall lead to great fortune.")
  142. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus008.mp3", 2038978809, 4230232989)
  143. Dialog.AddOption("Farewell.")
  144. Dialog.Start()
  145. end
  146. function Option8(NPC, Spawn)
  147. FaceTarget(NPC, Spawn)
  148. Dialog.New(NPC, Spawn)
  149. Dialog.AddDialog("I have given you a rare trinket, traveler. Take your time to examine its riddles and let it lead you to fortune.")
  150. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus009.mp3", 1847543773, 266333460)
  151. Dialog.AddOption("I will examine the trinket. Farewell.")
  152. Dialog.Start()
  153. end
  154. function Option9(NPC, Spawn)
  155. FaceTarget(NPC, Spawn)
  156. Dialog.New(NPC, Spawn)
  157. Dialog.AddDialog("Back again so soon? Perhaps you're hungry. I was just about to prepare some patchwork goulash. Nothing feeds a ravenous hunger like a bowl of patchwork goulash.")
  158. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus010.mp3", 4196671453, 2147837790)
  159. PlayFlavor(NPC,"","","ponder",0,0,Spawn)
  160. Dialog.AddOption("Your book led me to no fortune. ", "Option10")
  161. Dialog.AddOption("I cannot rest right now. I must go.")
  162. Dialog.Start()
  163. end
  164. function Option10(NPC, Spawn)
  165. SetStepComplete(Spawn, TheTrialsOfSirMorgan, 15)
  166. FaceTarget(NPC, Spawn)
  167. Dialog.New(NPC, Spawn)
  168. Dialog.AddDialog("So, you read \"The Trials of Sir Morgan.\" Such a brave knight he was, loved by all. If you read his tale, then fortune has just begun.")
  169. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus011.mp3", 1018819553, 3991155928)
  170. Dialog.AddOption("All i have is this amulet. Take it. It's worthless.", "Option11")
  171. Dialog.AddOption("I don't have time to talk. Farewell.")
  172. Dialog.Start()
  173. end
  174. function Option11(NPC, Spawn)
  175. FaceTarget(NPC, Spawn)
  176. Dialog.New(NPC, Spawn)
  177. Dialog.AddDialog("The Amulet of Ullkorruuk! I once held this many ages ago. I mean, many decades ago. Forgive an old man's memory. I meant to say my family held this long ago when I had a home. With it comes an ancient curse, a curse that cannot be lifted. I shall see that it makes its way home, should I ever return.")
  178. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus012.mp3", 3588173678, 2145543554)
  179. PlayFlavor(NPC,"","","boggle",0,0,Spawn)
  180. Dialog.AddOption("It's yours? But the book said it came from the Keep of Immortality?", "Option12")
  181. Dialog.AddOption("I don't have time to talk. Farewell.")
  182. Dialog.Start()
  183. end
  184. function Option12(NPC, Spawn)
  185. FaceTarget(NPC, Spawn)
  186. Dialog.New(NPC, Spawn)
  187. Dialog.AddDialog("The Keep of Immortality housed many wondrous artifacts. Its master was known to associate with my ancestors. The master was a mage called Valdoartus Varsoon and if he holds this, then he must surely hold the Riddle of Saryrn.")
  188. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus013.mp3", 3290450870, 3371711202)
  189. Dialog.AddOption("What is the Riddle of Saryrn?", "Option13")
  190. Dialog.AddOption("I don't have time for your stories. Farewell. ")
  191. Dialog.Start()
  192. end
  193. function Option13(NPC, Spawn)
  194. FaceTarget(NPC, Spawn)
  195. Dialog.New(NPC, Spawn)
  196. Dialog.AddDialog("The riddle is a puzzle box made of rare metals and forged over time in a vat of planar blood. Silly myth. It is nothing more than an ancient toy. It is nothing special at all, but it is a memento of my heritage.")
  197. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus014.mp3", 3295215206, 1663469634)
  198. Dialog.AddOption("If I find this box for you, will you grant me true fortune?", "Option14")
  199. Dialog.AddOption("I don't have time for your stories. Farewell.")
  200. Dialog.Start()
  201. end
  202. function Option14(NPC, Spawn)
  203. if CanRecieveQuest(Spawn, TheHiddenRiddle) then
  204. OfferQuest(NPC, Spawn, TheHiddenRiddle)
  205. elseif HasQuest(Spawn, TheHiddenRiddle) then
  206. Dialog.New(NPC, Spawn)
  207. Dialog.AddDialog("Return to me the Riddle of Saryrn, and you will have your fortune. I promise this or may my soul be cursed to walk this land for eternity.")
  208. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus015.mp3", 89864911, 2778083584)
  209. Dialog.AddOption("I will return with the puzzle box. ")
  210. Dialog.Start()
  211. end
  212. end
  213. function Option15(NPC, Spawn)
  214. Dialog.New(NPC, Spawn)
  215. Dialog.AddDialog("My traveler has returned. And you have brought me the puzzle box. I believe I have a debt to pay now. Shall we celebrate over some fermented elixirs?")
  216. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_2_1052.mp3", 0, 0)
  217. PlayFlavor(NPC,"","","happy",0,0,Spawn)
  218. Dialog.AddOption("All I want is my fortune.", "Option16")
  219. Dialog.AddOption("I don't need your fortune or elixirs. Farewell.")
  220. Dialog.Start()
  221. end
  222. function Option16(NPC, Spawn)
  223. Dialog.New(NPC, Spawn)
  224. Dialog.AddDialog("I am pleased that your desire has risen. You are already on your way to riches. But you are still lost and far from your goal.")
  225. Dialog.AddOption("Just tell me where I must go. ", "Option17")
  226. Dialog.AddOption("I don't care for any fortunes. Farewell.")
  227. Dialog.Start()
  228. end
  229. function Option17(NPC, Spawn)
  230. if GetQuestStep(Spawn, TheHiddenRiddle, 5) then
  231. SetStepComplete(Spawn, TheHiddenRiddle, 5)
  232. end
  233. Dialog.New(NPC, Spawn)
  234. Dialog.AddDialog("You must travel to the Ashlands of Nektulos. Cross the span, and the whisper of fortune will find you. Soon you shall gaze upon an account of journeys past, an account much like yours. Follow it and you will find wealth the likes of which you have never dreamt.")
  235. Dialog.AddOption("Give me more information about this whispering fortune.", "offer2")
  236. Dialog.AddOption("I don't care for any fortunes. Farewell.")
  237. Dialog.Start()
  238. end
  239. function Option18(NPC, Spawn)
  240. Dialog.New(NPC, Spawn)
  241. Dialog.AddDialog("Go and claim your fortune, and leave me to the silence of the dead. We have nothing left to share.")
  242. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_2_1052.mp3", 0, 0)
  243. Dialog.AddOption("Sorry to bother you Rikantus. ")
  244. Dialog.Start()
  245. end
  246. function Option19(NPC, Spawn)
  247. SetStepComplete(Spawn, WhispersOfFortune, 3)
  248. Dialog.New(NPC, Spawn)
  249. Dialog.AddDialog("You should not have returned! You refused the fortunes of Nektropos Castle, but its embrace will always linger in your soul. Such defiance is deserving of a reward. I offer you anything you can take from my chest, and I offer you a gift greater than any platinum or silver; I offer you ... the Fleshbound Tome! Take great care of it. Its wisdom may appear when you least expect it.")
  250. Dialog.AddOption("Sorry to bother you Rikantus. ")
  251. Dialog.Start()
  252. end
  253. function offer2(NPC, Spawn)
  254. OfferQuest(NPC, Spawn, WhispersOfFortune)
  255. end
  256. function offer(NPC, Spawn)
  257. OfferQuest(NPC, Spawn, ScrawlingsInTheDark)
  258. end
  259. function respawn(NPC)
  260. spawn(NPC)
  261. end