searching_the_depths_of_fallen_gate.lua 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name : Quests/FallenGate/searching_the_depths_of_fallen_gate.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.12 09:07:14
  5. Script Purpose :
  6. Zone : FallenGate, City of Freeport
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep(Quest, 1, "I must find the tome Ilucide wrote about in his journal.", 1, 100, "I must seek out the knowledge required at the Academy of Arcane sciences in Freeport.", 195)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. -- Add dialog here for when the quest is accepted
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is declined
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. -- Remove any quest specific items here when the quest is deleted
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I've found the tome detailing how to open the barrier.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I have found the lore to unlock the sealed door.")
  27. AddQuestStep(Quest, 2, "I must find the urn containing the remains of a fallen dragoon.", 1, 100, "I need to find the three pieces required to break the barrier to the lower depths of Fallen Gate.", 991)
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I have found the urn.")
  32. AddQuestStep(Quest, 3, "I need to find the spell sequestered away in Fallen Gate.", 1, 100, "I need to find the three pieces required to break the barrier to the lower depths of Fallen Gate.", 374)
  33. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  34. end
  35. function Step3Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 3, "I found the spell that was hidden in Fallen Gate.")
  37. AddQuestStep(Quest, 4, "I need to find the bangle hidden in a chest in Fallen Gate.", 1, 100, "I need to find the three pieces required to break the barrier to the lower depths of Fallen Gate.", 950)
  38. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  39. end
  40. function Step4Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 4, "I've found the bangle.")
  42. UpdateQuestTaskGroupDescription(Quest, 2, "I've found the three pieces required to break the barrier to the lower depths of Fallen Gate.")
  43. AddQuestStep(Quest, 5, "I need to examine the bangle.", 1, 100, "I should examine the bangle that I created.", 950)
  44. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  45. end
  46. function QuestComplete(Quest, QuestGiver, Player)
  47. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  48. UpdateQuestStepDescription(Quest, 5, "I've examined the bangle.")
  49. UpdateQuestTaskGroupDescription(Quest, 3, "I've examined the bangle.")
  50. if HasItem(Player, 7025) then
  51. RemoveItem(Player, 7025)
  52. elseif HasItem(Player, 8259) then
  53. RemoveItem(Player, 8259)
  54. end
  55. UpdateQuestDescription(Quest, "I've managed to complete the incantation and the door at the bottom of Fallen Gate now opens for me. Based on what I've learned so far, a great evil has been sealed behind this barrier, perhaps the being which is responsible for the animation of all the dead in Fallen Gate.")
  56. GiveQuestReward(Quest, Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if Step == 1 then
  60. Step1Complete(Quest, QuestGiver, Player)
  61. elseif Step == 2 then
  62. Step2Complete(Quest, QuestGiver, Player)
  63. elseif Step == 3 then
  64. Step3Complete(Quest, QuestGiver, Player)
  65. elseif Step == 4 then
  66. Step4Complete(Quest, QuestGiver, Player)
  67. elseif Step == 5 then
  68. QuestComplete(Quest, QuestGiver, Player)
  69. end
  70. end