AnExplosiveIdea.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. --[[
  2. Script Name : AnExplosiveIdea.lua
  3. Script Purpose : Handles the quest, "An Explosive Idea"
  4. Script Author : Shatou
  5. Script Date : 1/5/2020
  6. Script Notes :
  7. Zone : Caves
  8. Quest Giver : Emma Torque
  9. Preceded by : None
  10. Followed by : Destroying the Foundation
  11. --]]
  12. local BLASTING_POWDER_ID = 4342
  13. function Init(Quest)
  14. AddQuestStepHarvest(Quest, 1, "I need to collect the explosive powder from 15 piles of powdered minerals.", 15, 100, "Emma Torque has asked me to collect some explosive powder for her.", 344, BLASTING_POWDER_ID)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Step1Complete(Quest, QuestGiver, Player)
  18. UpdateQuestStepDescription(Quest, 1, "I have collected the explosive powder from 15 piles of powdered minerals.")
  19. AddQuestStepChat(Quest, 2, "I need to bring this explosive powder to Emma Torque.", 1, "Emma Torque has asked me to collect some explosive powder for her.", 344, BLASTING_POWDER_ID)
  20. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  21. end
  22. function QuestComplete(Quest, QuestGiver, Player)
  23. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  24. UpdateQuestStepDescription(Quest, 2, "I have brought Emma Torque the explosive powder.")
  25. UpdateQuestTaskGroupDescription(Quest, 1, "I have done Emma's task for her.")
  26. UpdateQuestDescription(Quest, "I have collected the explosive powder that Emma required.")
  27. GiveQuestReward(Quest, Player)
  28. end
  29. function Reload(Quest, QuestGiver, Player, Step)
  30. if Step == 1 then
  31. Step1Complete(Quest, QuestGiver, Player)
  32. elseif Step == 2 then
  33. QuestComplete(Quest, QuestGiver, Player)
  34. end
  35. end
  36. function Accepted(Quest, QuestGiver, Player)
  37. -- Add dialog here for when the quest is accepted
  38. end
  39. function Declined(Quest, QuestGiver, Player)
  40. -- Add dialog here for when the quest is declined
  41. end