9
3

a_deepice_mystery.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  1. --[[
  2. Script Name : a_deepice_mystery.lua
  3. Script Purpose : Handles the quest, "A Deepice Mystery"
  4. Script Author : vo1d
  5. Script Date : 10/29/2019
  6. Script Notes :
  7. Zone : World Event
  8. Quest Giver : Jingle
  9. Preceded by : None
  10. Followed by : The Giftgiver's Dilemma
  11. --]]
  12. -- **********************************************************************
  13. -- Known Issues
  14. -- Rewards:
  15. -- Order of rewards is wrong
  16. -- Reward items missing from DB (Petamorph Wand: Frost Fae Drake) and (Frost Fae Drake Plushie). I used other rewards in the mean time.
  17. -- Only receive one E'ci token even though the quantity is set to 5. (I think this might be related to it being a selectable item?)
  18. --
  19. -- Spawns:
  20. -- Encounters within the Frostfell Wonderland only have single spawns/locations. Need to setup proximity and multiple spawn locations.
  21. -- Jarok needs to be added to the Frostbite encounter along with a three headed ice wolf beast that you kill before fighting frostbite & jarok.
  22. -- **********************************************************************
  23. function Init(Quest)
  24. Step1(Quest)
  25. end
  26. function Accepted(Quest, QuestGiver, Player)
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. end
  32. function Step1(Quest)
  33. SetQuestFeatherColor(Quest, 3)
  34. SetQuestRepeatable(Quest)
  35. AddQuestStepKill(Quest, 1, "Defeat a living blaze for burning embers", 1, 100, "Jingle believes she can make a lasting thaw potion from living embers and ice crystals.", 2522, 1710369) -- a living blaze
  36. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  37. end
  38. function Step1Complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 1, "")
  40. AddQuestStepKill(Quest, 2, "Defeat a living snow flurry for ice crystals", 1, 100, "Jingle believes she can make a lasting thaw potion from living embers and ice crystals.", 1135, 410267) -- a living snow flurry
  41. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  42. end
  43. function Step2Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 2, "")
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I obtained the living embers and ice crystals for Jingle's lasting thaw potion.")
  46. AddQuestStepChat(Quest, 3, "Return to Jingle", 1, "I must return to Jingle in Frostfell Wonderland Village with the embers and ice crystals.", 11, 4120178) -- Jingle
  47. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  48. end
  49. function Step3Complete(Quest, QuestGiver, Player)
  50. GiveQuestItem(Quest, Player, "Here is your quest item", 3080)
  51. UpdateQuestStepDescription(Quest, 3, "")
  52. UpdateQuestTaskGroupDescription(Quest, 2, "Jingle made a lasting thaw potion for me to use on each of the deep freeze victims.")
  53. AddQuestStepSpell(Quest, 4, "Cast lasting thaw potion on Candice Cheriweth on Candy Isle", 1, 100, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 1177, 4120025) -- Candice
  54. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  55. end
  56. function Step4Complete(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 4, "")
  58. AddQuestStepChat(Quest, 5, "Speak with Candice Cheriweth", 1, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 11, 4120025) -- Candice
  59. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  60. end
  61. function Step5Complete(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 5, "")
  63. AddQuestStepSpell(Quest, 6, "Cast lasting thaw potion on Gardy Ex-Giftgiver on the Isle of Great Gifts", 1, 100, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 1177, 4120018) -- Gardy
  64. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  65. end
  66. function Step6Complete(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 6, "")
  68. AddQuestStepChat(Quest, 7, "Speak with Gardy Ex-Giftgiver", 1, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 11, 4120018) -- Gardy
  69. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  70. end
  71. function Step7Complete(Quest, QuestGiver, Player)
  72. UpdateQuestStepDescription(Quest, 7, "")
  73. AddQuestStepSpell(Quest, 8, "Cast lasting thaw potion on Mr. McScroogle on McScroogle Isle", 1, 100, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 1177, 4120037) -- Scroogle
  74. AddQuestStepCompleteAction(Quest, 8, "Step8Complete")
  75. end
  76. function Step8Complete(Quest, QuestGiver, Player)
  77. UpdateQuestStepDescription(Quest, 8, "")
  78. AddQuestStepChat(Quest, 9, "Speak with Mr. McScroogle", 1, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 11, 4120037) -- Scroogle
  79. AddQuestStepCompleteAction(Quest, 9, "Step9Complete")
  80. end
  81. function Step9Complete(Quest, QuestGiver, Player)
  82. UpdateQuestStepDescription(Quest, 9, "")
  83. AddQuestStepSpell(Quest, 10, "Cast lasting thaw potion on Queen Bunny on the Isle of Great Gifts", 1, 100, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 1177, 4120022) -- Queen
  84. AddQuestStepCompleteAction(Quest, 10, "Step10Complete")
  85. end
  86. function Step10Complete(Quest, QuestGiver, Player)
  87. UpdateQuestStepDescription(Quest, 10, "")
  88. AddQuestStepChat(Quest, 11, "Speak with Queen Bunny", 1, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 11, 4120022) -- Queen
  89. AddQuestStepCompleteAction(Quest, 11, "Step11Complete")
  90. end
  91. function Step11Complete(Quest, QuestGiver, Player)
  92. UpdateQuestStepDescription(Quest, 11, "")
  93. AddQuestStepSpell(Quest, 12, "Cast lasting thaw potion on Snarf Frostfoot on Frostfoot Isle", 1, 100, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 1177, 4120179) -- Snarf
  94. AddQuestStepCompleteAction(Quest, 12, "Step12Complete")
  95. end
  96. function Step12Complete(Quest, QuestGiver, Player)
  97. UpdateQuestStepDescription(Quest, 12, "")
  98. AddQuestStepChat(Quest, 13, "Speak with Snarf Frostfoot", 1, "I must use Jingle's lasting thaw potion on the deep freeze victims in Frostfell Wonderland Village. Hopefully, they can shed some light on who or what was behind this attack.", 11, 4120179) -- Snarf
  99. AddQuestStepCompleteAction(Quest, 13, "Step13Complete")
  100. end
  101. function Step13Complete(Quest, QuestGiver, Player)
  102. UpdateQuestStepDescription(Quest, 13, "")
  103. UpdateQuestTaskGroupDescription(Quest, 3, "The victims of the deep freeze had different theories as to who was behind the attack, but I was able to get a few clues.")
  104. AddQuestStepChat(Quest, 14, "Speak with Jingle", 1, "I must return to Jingle in Frostfell Wonderland Village.", 11, 4120178) -- Jingle
  105. AddQuestStepCompleteAction(Quest, 14, "Step14Complete")
  106. end
  107. function Step14Complete(Quest, QuestGiver, Player)
  108. UpdateQuestStepDescription(Quest, 14, "")
  109. UpdateQuestTaskGroupDescription(Quest, 4, "Jingle and I suspect that the deep freeze culprit is still somewhere within the Frostfell Wonderland Village.")
  110. AddQuestStepKill(Quest, 15, "Search the northern islands for a mysterious ice creature", 1, 100, "I should search Frostfell Wonderland Village for the mysterious ice animals connected to this mystery.", 11, 6870000) -- a hoarfrost attacker
  111. AddQuestStepCompleteAction(Quest, 15, "Step15Complete")
  112. end
  113. function Step15Complete(Quest, QuestGiver, Player)
  114. UpdateQuestStepDescription(Quest, 15, "The hoarfrost attacker teleported away!")
  115. AddQuestStepKill(Quest, 16, "Hunt for the mysterious ice creature in the north-western islands", 1, 100, "I should search Frostfell Wonderland Village for the mysterious ice animals connected to this mystery.", 11, 6870000) -- a hoarfrost attacker
  116. AddQuestStepCompleteAction(Quest, 16, "Step16Complete")
  117. end
  118. function Step16Complete(Quest, QuestGiver, Player)
  119. UpdateQuestStepDescription(Quest, 16, "The iceclaw scrapper teleported away!")
  120. AddQuestStepKill(Quest, 17, "Hunt for the mysterious ice creature in the southern islands", 1, 100, "I should search Frostfell Wonderland Village for the mysterious ice animals connected to this mystery.", 11, 6870001) -- a frostbite scrapper
  121. AddQuestStepCompleteAction(Quest, 17, "Step17Complete")
  122. end
  123. function Step17Complete(Quest, QuestGiver, Player)
  124. UpdateQuestStepDescription(Quest, 17, "The ice creature was revealed to be some sort of frost fae!")
  125. AddQuestStepKill(Quest, 18, "Battle Jarok Frostpetal and Frostbite", 1, 100, "I should search Frostfell Wonderland Village for the mysterious ice animals connected to this mystery.", 11, 6870002) -- Frostbite
  126. AddQuestStepCompleteAction(Quest, 18, "Step18Complete")
  127. end
  128. function Step18Complete(Quest, QuestGiver, Player)
  129. UpdateQuestStepDescription(Quest, 18, "")
  130. UpdateQuestTaskGroupDescription(Quest, 5, "Attacking the mysterious ice creatures forced the culprit, Jarok Frostpetal, to reveal himself!")
  131. AddQuestStepChat(Quest, 19, "Speak with Jarok Frostpetal", 1, "I must confront Jarok Frostpetal. He couldn't have gotten far within Frostfell Wonderland Village. He's likely still on the southernmost island.", 11, 6870003) -- Jarok Frostpetal
  132. AddQuestStepCompleteAction(Quest, 19, "QuestComplete")
  133. end
  134. function QuestComplete(Quest, QuestGiver, Player)
  135. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  136. UpdateQuestStepDescription(Quest, 19, "")
  137. UpdateQuestTaskGroupDescription(Quest, 6, "I spoke with Jarok Frostpetal.")
  138. UpdateQuestDescription(Quest, "Jarok Frostpetal, a frost fae dedicated to E'ci, was behind the deep freeze spell that had taken hold of Frostfell Wonderland Village. His intentions may have been well intended, but his execution left a little to be desired, especially since it would have involved some chilling ramifications. He was satisfied that the village will remain a sanctuary for those that wish to be close to the magic of E'ci.")
  139. GiveQuestReward(Quest, Player)
  140. end
  141. function Reload(Quest, QuestGiver, Player, Step)
  142. if Step == 1 then
  143. Step1Complete(Quest, QuestGiver, Player)
  144. elseif Step == 2 then
  145. Step2Complete(Quest, QuestGiver, Player)
  146. elseif Step == 3 then
  147. Step3Complete(Quest, QuestGiver, Player)
  148. elseif Step == 4 then
  149. Step4Complete(Quest, QuestGiver, Player)
  150. elseif Step == 5 then
  151. Step5Complete(Quest, QuestGiver, Player)
  152. elseif Step == 6 then
  153. Step6Complete(Quest, QuestGiver, Player)
  154. elseif Step == 7 then
  155. Step7Complete(Quest, QuestGiver, Player)
  156. elseif Step == 8 then
  157. Step8Complete(Quest, QuestGiver, Player)
  158. elseif Step == 9 then
  159. Step9Complete(Quest, QuestGiver, Player)
  160. elseif Step == 10 then
  161. Step10Complete(Quest, QuestGiver, Player)
  162. elseif Step == 11 then
  163. Step11Complete(Quest, QuestGiver, Player)
  164. elseif Step == 12 then
  165. Step12Complete(Quest, QuestGiver, Player)
  166. elseif Step == 13 then
  167. Step13Complete(Quest, QuestGiver, Player)
  168. elseif Step == 14 then
  169. Step14Complete(Quest, QuestGiver, Player)
  170. elseif Step == 15 then
  171. Step15Complete(Quest, QuestGiver, Player)
  172. elseif Step == 16 then
  173. Step16Complete(Quest, QuestGiver, Player)
  174. elseif Step == 17 then
  175. Step17Complete(Quest, QuestGiver, Player)
  176. elseif Step == 18 then
  177. Step18Complete(Quest, QuestGiver, Player)
  178. elseif Step == 19 then
  179. QuestComplete(Quest, QuestGiver, Player)
  180. end
  181. end