SeerStone.lua 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --[[
  2. Script Name : Quests/TheCommonlands/SeerStone.lua
  3. Script Purpose : Handles the quest, "Seer Stone"
  4. Script Author : premierio015
  5. Script Date : 18.05.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : Madam Vi
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to collect five piles of bone dust from skeletons", 5, 100, "Madam Vi wants some components to complete her Seer Stone. I need to collect five piles of bone dust, five water glands, and five sparkly bits.", 181, 330075, 330076, 330077, 330329, 330232, 330074, 330228, 330158, 330279, 330083, 330211)
  14. AddQuestStepKill(Quest, 2, "I need to collect five water glands from any vulrich", 5, 100, "Madam Vi wants some components to complete her Seer Stone. I need to collect five piles of bone dust, five water glands, and five sparkly bits.", 135, 330031, 330032, 330087, 330774)
  15. AddQuestStepKill(Quest, 3, "I need to collect five sparkly bits from any wisps", 5, 100, "Madam Vi wants some components to complete her Seer Stone. I need to collect five piles of bone dust, five water glands, and five sparkly bits.", 2515, 330162, 330161, 330194, 330163)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. local conversation = CreateConversation()
  23. AddConversationOption(conversation, "All right.")
  24. StartConversation(conversation, QuestGiver, Player, "Please hurry!")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have collected five piles of bone dust for Madam Vi.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have collected five water glands for Madam Vi at the Crossroads.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have collected five sparkly bits for Madam Vi at the Crossroads.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function CheckProgress(Quest, QuestGiver, Player)
  45. if QuestStepIsComplete(Player, 5225, 1) and QuestStepIsComplete(Player, 5225, 2) and QuestStepIsComplete(Player, 5225, 3) then
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I have collected all of the components for Madam Vi's Seer Stone and should return them to her at the Crossroads.")
  47. AddQuestStepChat(Quest, 4, "I should return to Madam Vi.", 1, "I have collected all of the components for Madam Vi's Seer Stone.", 11, 330179)
  48. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  49. end
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  53. UpdateQuestStepDescription(Quest, 4, "I have returned to Madam Vi.")
  54. UpdateQuestTaskGroupDescription(Quest, 2, "I have helped Madam Vi complete her Seer Stone.")
  55. UpdateQuestDescription(Quest, "I collected all of the components for Madam Vi's Seer Stone.")
  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. QuestComplete(Quest, QuestGiver, Player)
  67. end
  68. end