elements_of_a_ritual.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --[[
  2. Script Name : Quests/Caves/elements_of_a_ritual.lua
  3. Script Purpose : Handles the quest, "Elements of a Ritual"
  4. Script Author : Scatman
  5. Script Date : 2009.10.08
  6. Zone : The Caves
  7. Quest Giver: Consul Bree
  8. Preceded by: Hit Them Where it Hurts (hit_them_where_it_hurts.lua)
  9. Followed by: High Shaman of the Rockpaw (high_shaman_of_the_rockpaw.lua)
  10. --]]
  11. function Init(Quest)
  12. 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.", 0, 1970012)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeWithEmma")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/consul_bree/qey_adv03_caves/quests/bree/bree_012a.mp3", "", "", 2607411936, 2666860100, Player)
  19. AddConversationOption(conversation, "All right.")
  20. StartConversation(conversation, QuestGiver, Player, "Speak with Emma about the river stone. I believe she has been working on something.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. end
  24. function Step1_Complete_SpokeWithEmma(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have spoken with Emma Torque.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I have acquired the Drawing Ray.")
  27. 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, 1970013)
  28. AddQuestStepObtainItem(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, 7103)
  29. 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, 10068)
  30. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_KilledSnakes")
  31. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_GotDust")
  32. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_GotStone")
  33. end
  34. function Step2_Complete_KilledSnakes(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have collected five crown scales.")
  36. if QuestIsComplete(Player, 225) then
  37. MultipleStepsComplete(Quest, QuestGiver, Player)
  38. end
  39. end
  40. function Step3_Complete_GotDust(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have collected incantation dust from the Rockpaw camps.")
  42. if QuestIsComplete(Player, 225) then
  43. MultipleStepsComplete(Quest, QuestGiver, Player)
  44. end
  45. end
  46. function Step4_Complete_GotStone(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 4, "I have collected a river stone.")
  48. if QuestIsComplete(Player, 225) then
  49. MultipleStepsComplete(Quest, QuestGiver, Player)
  50. end
  51. end
  52. function MultipleStepsComplete(Quest, QuestGiver, Player)
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I have collected the necessary items.")
  54. 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.", 0, 1970010)
  55. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  56. end
  57. function QuestComplete(Quest, QuestGiver, Player)
  58. -- Incantation Dust
  59. while HasItem(Player, 7103) do
  60. RemoveItem(Player, 7103)
  61. end
  62. -- river stone
  63. while HasItem(Player, 10068) do
  64. RemoveItem(Player, 10068)
  65. end
  66. UpdateQuestStepDescription(Quest, 5, "I have spoken with Consul Bree.")
  67. UpdateQuestTaskGroupDescription(Quest, 3, "I have spoken with Consul Bree.")
  68. UpdateQuestDescription(Quest, "Now that I have gotten all of the items required for the ritual, I will be able to summon Zen'Durath.")
  69. GiveQuestReward(Quest, Player)
  70. end
  71. function Reload(Quest, QuestGiver, Player, Step)
  72. if Step == 1 then
  73. Step1_Complete_SpokeWithEmma(Quest, QuestGiver, Player)
  74. elseif Step == 2 then
  75. Step2_Complete_KilledSnakes(Quest, QuestGiver, Player)
  76. elseif Step == 3 then
  77. Step3_Complete_GotDust(Quest, QuestGiver, Player)
  78. elseif Step == 4 then
  79. Step4_Complete_GotStone(Quest, QuestGiver, Player)
  80. end
  81. end