9
3

Jingle.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. --[[
  2. Script Name : SpawnScripts/Frostfell/Jingle.lua
  3. Script Author : Vo1d
  4. Script Date : 2019.10.29 10:10:34
  5. Script Purpose :
  6. :
  7. --]]
  8. -- **********************************************************************
  9. -- Known Issues
  10. -- Spawns:
  11. -- Living blazes use the 75228 Dagger of Cinders weapon as an appearance.
  12. -- Living snow flurry model doesn't match live.
  13. -- **********************************************************************
  14. local ADeepiceMystery = 486
  15. function spawn(NPC)
  16. ProvidesQuest(NPC, ADeepiceMystery)
  17. end
  18. function respawn(NPC)
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. if HasCompletedQuest(Spawn, ADeepiceMystery) then
  23. elseif HasQuest(Spawn, ADeepiceMystery) then
  24. DebugMe(NPC, Spawn)
  25. if GetQuestStep(Spawn, ADeepiceMystery) == 3 then
  26. Step3Complete(NPC, Spawn)
  27. elseif GetQuestStep(Spawn, ADeepiceMystery) == 14 then
  28. Step14(NPC, Spawn)
  29. end
  30. else -- You haven't completed the quest nor are you on the quest.
  31. FirstGreetings(NPC, Spawn)
  32. end
  33. end
  34. -- DEBUG SHIT
  35. function DebugMe(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. Conversation = CreateConversation()
  38. AddConversationOption(Conversation, "Debug", "Debug_Options")
  39. AddConversationOption(Conversation, "Meh.")
  40. StartConversation(Conversation, NPC, Spawn, "Hey there, you're on the quest A Deepice Mystery!")
  41. end
  42. -- INITIAL DIALOGUE
  43. function FirstGreetings(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. Conversation = CreateConversation()
  46. AddConversationOption(Conversation, "That's a good question.", "Preamble1") --Proceed
  47. AddConversationOption(Conversation, "I don't know, nor do I care.")
  48. StartConversation(Conversation, NPC, Spawn, "Oh, goodness! What has befallen our Frostfell Wonderland!?")
  49. end
  50. -- FIRST DIALOGUE
  51. function Preamble1(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Conversation = CreateConversation()
  54. AddConversationOption(Conversation, "This wasn't a planned transformation?", "Preamble2") --Proceed
  55. StartConversation(Conversation, NPC, Spawn, "I was late to arrive, having been delayed, only to find that the land has been transformed.... beautifully.")
  56. end
  57. -- SECOND DIALOGUE
  58. function Preamble2(NPC, Spawn)
  59. FaceTarget(NPC, Spawn)
  60. Conversation = CreateConversation()
  61. AddConversationOption(Conversation, "Maybe we can melt them free.", "Preamble3") --Proceed
  62. StartConversation(Conversation, NPC, Spawn, "No, not that I am aware of. If it was, well then it went very wrong. So many that were here are now frozen with it! They need to be saved, first and foremost!")
  63. end
  64. -- THIRD DIALOGUE
  65. function Preamble3(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. Conversation = CreateConversation()
  68. AddConversationOption(Conversation, "I certainly can.", "Preamble4") --Proceed
  69. AddConversationOption(Conversation, "Unfortunately, no I am not able to help you.")
  70. StartConversation(Conversation, NPC, Spawn, "Good thinking, " .. GetName(Spawn).. "! It'll take some potent Frostfell magic to melt the arcane deep freeze that they are gripped by. I'll need some living burning embers and living ice crystals. Can you obtain them for me?")
  71. end
  72. -- FOURTH DIALOGUE
  73. function Preamble4(NPC, Spawn)
  74. FaceTarget(NPC, Spawn)
  75. Conversation = CreateConversation()
  76. AddConversationOption(Conversation, "I'll be back with the burning embers and ice crystals.", "FirstQuestOffer") --Proceed
  77. AddConversationOption(Conversation, "Oh, this is not what I had in mind. Goodbye.")
  78. StartConversation(Conversation, NPC, Spawn, "Great! The burning embers should be found on a living blaze in Lavastorm, and the ice crystals can be obtained from a living snow flurry in Everfrost.")
  79. end
  80. -- She now offers you 'A Deepice Mystery'
  81. function FirstQuestOffer(NPC, Spawn)
  82. OfferQuest(NPC, Spawn, ADeepiceMystery)
  83. end
  84. -- Player kills a living blaze: Progresses Quest to Step2
  85. -- Player kills a living snow flurry: Progresses Quest to Step3
  86. function Step3Complete(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. Conversation = CreateConversation()
  89. AddConversationOption(Conversation, "Yes! Here they are, " .. GetName(NPC).. ".", "Step3Complete2") --Proceed
  90. StartConversation(Conversation, NPC, Spawn, "Thank the gods! You've returned, " .. GetName(Spawn).. "! Have you the living burning embers and ice crystals?")
  91. end
  92. function Step3Complete2(NPC, Spawn)
  93. FaceTarget(NPC, Spawn)
  94. Conversation = CreateConversation()
  95. AddConversationOption(Conversation, "So we won't have to wait long, will we?", "Step3Complete3")
  96. StartConversation(Conversation, NPC, Spawn, "Perfect! The other components have already been prepared for the lasting thaw potion.")
  97. end
  98. function Step3Complete3(NPC, Spawn)
  99. FaceTarget(NPC, Spawn)
  100. Conversation = CreateConversation()
  101. AddConversationOption(Conversation, "Maybe then we'll learn who or what is behind this!", "Step3CompleteFinal") -- Proceed And Set Step Complete
  102. StartConversation(Conversation, NPC, Spawn, "No, Not at all. Which is good, as i fear time is slipping from us. We must prioritize the lasting thaw potion. Cast it to free Candice, Gardy, McScroogle, Queen Bunny, and Snarf of the deep freeze that they've been put under.")
  103. end
  104. function Step3CompleteFinal(NPC, Spawn)
  105. SetStepComplete(Spawn, ADeepiceMystery, 3)
  106. FaceTarget(NPC, Spawn)
  107. Conversation = CreateConversation()
  108. AddConversationOption(Conversation, "Me too, " .. GetName(NPC).. ". Me too.")
  109. StartConversation(Conversation, NPC, Spawn, "Good thinking, " .. GetName(Spawn).. "! They may have seen something. Yes. I just hope we're not too late!")
  110. end
  111. function Step14(NPC, Spawn)
  112. FaceTarget(NPC, Spawn)
  113. Conversation = CreateConversation()
  114. AddConversationOption(Conversation, "That it did, but the victims didn't see a whole lot.", "Step14_2")
  115. StartConversation(Conversation, NPC, Spawn, "Did the lasting thaw potion work, " .. GetName(Spawn).. "?")
  116. end
  117. function Step14_2(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. Conversation = CreateConversation()
  120. AddConversationOption(Conversation, "Three of them saw ice animals before being frozen, One of which was some sort of icy fae drake.", "Step14_3")
  121. StartConversation(Conversation, NPC, Spawn, "No? Well, don't be coy. What did they see?")
  122. end
  123. function Step14_3(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. Conversation = CreateConversation()
  126. AddConversationOption(Conversation, "If they were trying to change the area for themselves, it would stand to reason that they'd still be here.", "Step14_4")
  127. StartConversation(Conversation, NPC, Spawn, "That's our only true lead then, I agree. I wonder if they've left Frostfell Wonderland Village?")
  128. end
  129. function Step14_4(NPC, Spawn)
  130. FaceTarget(NPC, Spawn)
  131. Conversation = CreateConversation()
  132. if GetQuestStep(Spawn, ADeepiceMystery) == 14 then
  133. SetStepComplete(Spawn, ADeepiceMystery, 14)
  134. end
  135. AddConversationOption(Conversation, "I think I'll need it!")
  136. StartConversation(Conversation, NPC, Spawn, "You should start your search on the northern most islands, and then work south. Good luck!")
  137. end
  138. function Debug_Options(NPC, Spawn)
  139. FaceTarget(NPC, Spawn)
  140. Conversation = CreateConversation()
  141. AddConversationOption(Conversation, "What step am i on?", "WhatStep")
  142. AddConversationOption(Conversation, "I want to skip a specific step.", "Skips1")
  143. AddConversationOption(Conversation, "I want to skip the step i'm on.", "SkipCurrentStep")
  144. StartConversation(Conversation, NPC, Spawn, "Debug Options: ")
  145. end
  146. function Skips1(NPC, Spawn)
  147. FaceTarget(NPC, Spawn)
  148. Conversation = CreateConversation()
  149. AddConversationOption(Conversation, "Skip Step 1", "SkipStep1")
  150. AddConversationOption(Conversation, "Skip Step 2", "SkipStep2")
  151. AddConversationOption(Conversation, "Skip Step 3", "SkipStep3")
  152. AddConversationOption(Conversation, "Skip Step 4", "SkipStep4")
  153. AddConversationOption(Conversation, "Skip Step 5", "SkipStep5")
  154. AddConversationOption(Conversation, "More.", "Skips2")
  155. StartConversation(Conversation, NPC, Spawn, "Select a step to skip: ")
  156. end
  157. function Skips2(NPC, Spawn)
  158. FaceTarget(NPC, Spawn)
  159. Conversation = CreateConversation()
  160. AddConversationOption(Conversation, "Skip Step 6", "SkipStep6")
  161. AddConversationOption(Conversation, "Skip Step 7", "SkipStep7")
  162. AddConversationOption(Conversation, "Skip Step 8", "SkipStep8")
  163. AddConversationOption(Conversation, "Skip Step 9", "SkipStep9")
  164. AddConversationOption(Conversation, "Skip Step 10", "SkipStep10")
  165. StartConversation(Conversation, NPC, Spawn, "Select a step to skip: ")
  166. end
  167. function SkipCurrentStep(NPC, Spawn)
  168. local CurrentStep = GetQuestStep(Spawn, ADeepiceMystery)
  169. FaceTarget(NPC, Spawn)
  170. Conversation = CreateConversation()
  171. AddStepProgress(Spawn, ADeepiceMystery, CurrentStep, 1)
  172. AddConversationOption(Conversation, "Woot!")
  173. StartConversation(Conversation, NPC, Spawn, "You're now on step " .. GetQuestStep(Spawn, ADeepiceMystery))
  174. end
  175. function WhatStep(NPC, Spawn)
  176. Say(NPC, "You are currently on step " .. GetQuestStep(Spawn, ADeepiceMystery))
  177. end
  178. function SkipStep1(NPC, Spawn)
  179. AddStepProgress(Spawn, ADeepiceMystery, 1, 1)
  180. end
  181. function SkipStep2(NPC, Spawn)
  182. AddStepProgress(Spawn, ADeepiceMystery, 2, 1)
  183. end
  184. function SkipStep3(NPC, Spawn)
  185. AddStepProgress(Spawn, ADeepiceMystery, 3, 1)
  186. end
  187. function SkipStep4(NPC, Spawn)
  188. AddStepProgress(Spawn, ADeepiceMystery, 4, 1)
  189. end
  190. function SkipStep5(NPC, Spawn)
  191. AddStepProgress(Spawn, ADeepiceMystery, 5, 1)
  192. end
  193. function SkipStep6(NPC, Spawn)
  194. AddStepProgress(Spawn, ADeepiceMystery, 6, 1)
  195. end
  196. function SkipStep7(NPC, Spawn)
  197. AddStepProgress(Spawn, ADeepiceMystery, 7, 1)
  198. end
  199. function SkipStep8(NPC, Spawn)
  200. AddStepProgress(Spawn, ADeepiceMystery, 8, 1)
  201. end
  202. function SkipStep9(NPC, Spawn)
  203. AddStepProgress(Spawn, ADeepiceMystery, 9, 1)
  204. end
  205. function SkipStep10(NPC, Spawn)
  206. AddStepProgress(Spawn, ADeepiceMystery, 10, 1)
  207. end