9
3

ElementsOfARitual.lua 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : ElementsofaRitual.lua
  3. Script Purpose : Handles the quest, "Elements of a Ritual"
  4. Script Author : Shatou
  5. Script Date : 1/3/2020
  6. Script Notes :
  7. Zone : Caves
  8. Quest Giver : Consul Bree
  9. Preceded by : Hit Them Where it Hurts
  10. Followed by : High Shaman of the Rockpaw
  11. --]]
  12. local EMMA_TORQUE_ID = 1970007
  13. local ALBINO_PYTHON_ID = 1970009
  14. local INCANTATION_DUST_ID = 8295
  15. local RIVER_STONE_ID = 11599
  16. local DRAWING_RAY_ID = 46016
  17. function Init(Quest)
  18. AddQuestStepChat(Quest, 1, "I need to speak with Emma Torque.", 1, "I need to acquire the object necessary to get a river stone from a river behemoth from Emma Torque.", 11, EMMA_TORQUE_ID)
  19. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  20. end
  21. function Step1Complete(Quest, QuestGiver, Player)
  22. UpdateQuestStepDescription(Quest, 1, "I have spoken with Emma Torque.")
  23. UpdateQuestTaskGroupDescription(Quest, 1, "I have acquired the Drawing Ray.")
  24. AddQuestStepKill(Quest, 2, "I need to collect five crown scales from albino pythons here in the Caves.", 5, 100, "I need to collect the items necessary for the summoning ritual.", 84, ALBINO_PYTHON_ID)
  25. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  26. end
  27. function Step2Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 2, "I have collected five crown scales.")
  29. AddQuestStepHarvest(Quest, 3, "I need to collect incantation dust from the Rockpaw camps.", 1, 100, "I need to collect the items necessary for the summoning ritual.", 10, INCANTATION_DUST_ID)
  30. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  31. end
  32. function Step3Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 3, "I have collected incantation dust from the Rockpaw camps.")
  34. --AddQuestStepKill(Quest, 4, "I need to collect a river stone from a river behemoth. I will need to use Emma's device on the remains of one to get the stone.", 1, 100, "I need to collect the items necessary for the summoning ritual.", 769, 1970031)
  35. AddQuestStepObtainItem(Quest, 4, "I need to collect a river stone from a river behemoth. I will need to use Emma's device on the remains of one to get the stone.", 1, 100, "I need to collect the items necessary for the summoning ritual.", 769, RIVER_STONE_ID)
  36. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  37. end
  38. function Step4Complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 4, "I have collected a river stone.")
  40. UpdateQuestTaskGroupDescription(Quest, 2, "I have collected the necessary items.")
  41. AddQuestStepChat(Quest, 5, "I need to return to Consul Bree.", 1, "I need to return to Consul Bree now that I have collected all of the needed items.", 11, RIVER_STONE_ID, INCANTATION_DUST_ID)
  42. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  43. end
  44. function QuestComplete(Quest, QuestGiver, Player)
  45. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  46. UpdateQuestStepDescription(Quest, 5, "I have spoken with Consul Bree.")
  47. UpdateQuestTaskGroupDescription(Quest, 3, "I have spoken with Consul Bree.")
  48. UpdateQuestDescription(Quest, "Now that I have gotten all of the items required for the ritual, I will be able to summon Zen'Durath.")
  49. GiveQuestReward(Quest, Player)
  50. RemoveItem(Player, DRAWING_RAY_ID)
  51. end
  52. function Reload(Quest, QuestGiver, Player, Step)
  53. if Step == 1 then
  54. Step1Complete(Quest, QuestGiver, Player)
  55. elseif Step == 2 then
  56. Step2Complete(Quest, QuestGiver, Player)
  57. elseif Step == 3 then
  58. Step3Complete(Quest, QuestGiver, Player)
  59. elseif Step == 4 then
  60. Step4Complete(Quest, QuestGiver, Player)
  61. elseif Step == 5 then
  62. QuestComplete(Quest, QuestGiver, Player)
  63. end
  64. end
  65. function Accepted(Quest, QuestGiver, Player)
  66. -- Add dialog here for when the quest is accepted
  67. end
  68. function Declined(Quest, QuestGiver, Player)
  69. -- Add dialog here for when the quest is declined
  70. end
  71. function Deleted(Quest, Player)
  72. RemoveItem(Player, DRAWING_RAY_ID)
  73. end