relics_for_elurad.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/Stormhold/relics_for_elurad.lua
  3. Script Purpose : Handles the quest, "Relics for Elurad"
  4. Script Author : Shatou
  5. Script Date : 8/5/2022
  6. Script Notes :
  7. Zone : Stormhold
  8. Quest Giver : Archaeologist Elurad
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local ARCHAEOLOGIST_ELURAD_ID = 150001
  13. function Init(Quest)
  14. AddQuestStep(Quest, 1, "Locate the Mace of Thunder in the Stormhold Armory.", 1, 100, "I need to find the three objects Elurad mentioned.", 634)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. -- Add dialog here for when the quest is accepted
  19. end
  20. function Declined(Quest, QuestGiver, Player)
  21. -- Add dialog here for when the quest is declined
  22. end
  23. function Deleted(Quest, QuestGiver, Player)
  24. -- Remove any quest specific items here when the quest is deleted
  25. end
  26. function Step1Complete(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 1, "I've recovered the Mace of Thunder.")
  28. AddQuestStep(Quest, 2, "Locate the Vessel of Storms in the Chapel of Karana in Stormhold.", 1, 100, "I need to find the three objects Elurad mentioned.", 1017)
  29. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  30. end
  31. function Step2Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 2, "I've recovered the Vessel of Storms.")
  33. AddQuestStep(Quest, 3, "Locate the Tome of Thunder in the Library of Karana in Stormhold.", 1, 100, "I need to find the three objects Elurad mentioned.", 716)
  34. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  35. end
  36. function Step3Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 3, "I've recovered the Tome of Thunder.")
  38. UpdateQuestTaskGroupDescription(Quest, 1, "I've found all three relics Elurad requires.")
  39. AddQuestStepChat(Quest, 4, "Speak with Elurad in Stormhold.", 1, "I need to speak with Elurad at the entrance of Stormhold.", 11, ARCHAEOLOGIST_ELURAD_ID)
  40. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  41. end
  42. function QuestComplete(Quest, QuestGiver, Player)
  43. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  44. UpdateQuestStepDescription(Quest, 4, "I've spoken with Elurad in Stormhold.")
  45. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Elurad and given him the relics he wanted.")
  46. UpdateQuestDescription(Quest, "I managed to retrieve the mace, tome and chalice from the depths of Stormhold. Elurad seemed very pleased with the results.")
  47. GiveQuestReward(Quest, Player)
  48. end
  49. function Reload(Quest, QuestGiver, Player, Step)
  50. if Step == 1 then
  51. Step1Complete(Quest, QuestGiver, Player)
  52. elseif Step == 2 then
  53. Step2Complete(Quest, QuestGiver, Player)
  54. elseif Step == 3 then
  55. Step3Complete(Quest, QuestGiver, Player)
  56. elseif Step == 4 then
  57. QuestComplete(Quest, QuestGiver, Player)
  58. end
  59. end