words_of_pure_magic.lua 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. --[[
  2. Script Name : words_of_pure_magic.lua
  3. Script Purpose : Handles the quest, "Words of Pure Magic"
  4. Script Author : Dorbin
  5. Script Date : 5/31/2022
  6. Script Notes :
  7. Zone : Language
  8. Quest Giver : North Freeport, Academy of Arcane Science, main floor ( 11, -7, -128 ) , stack of books on top of the table
  9. South Qeynos, Mage Tower, yellow teleporter ( 707, 82, 127 ) "Words of Pure Magic" text.
  10. Kelethin, Kelethin Research Library building, ( 136, 109, 178 ) , half stack of books on table
  11. Neriak, City of Hate, Library of K'Lorn, ( -686, 18, 249 ) , books on top of the shelf
  12. New Halas, Glacierbane's Vault, ( -117, 148, -82 ) , open book on the floor beside Dannon Ramsdell
  13. Preceded by : None
  14. Followed by : None
  15. --]]
  16. function Init(Quest)
  17. AddQuestStepChat(Quest, 1, "Find the Zet Druzaic Shrine.", 1, "I need to venture into the Shattered Lands and find the four Druzaic Shrines. Knowling the locations of these mythical shrines would be wise before I begin this quest. The Druzaic Shrines could be anywhere!", 11, 2490617,1790462)
  18. AddQuestStepChat(Quest, 2, "Find the Myr Druzaic Shrine.", 1, "I need to venture into the Shattered Lands and find the four Druzaic Shrines. Knowling the locations of these mythical shrines would be wise before I begin this quest. The Druzaic Shrines could be anywhere!", 11, 390471,1900347)
  19. AddQuestStepChat(Quest, 3, "Find the Uzu Druzaic Shrine.", 1, "I need to venture into the Shattered Lands and find the four Druzaic Shrines. Knowling the locations of these mythical shrines would be wise before I begin this quest. The Druzaic Shrines could be anywhere!", 11, 1710304)
  20. AddQuestStepChat(Quest, 4, "Find the Kab Druzaic Shrine.", 1, "I need to venture into the Shattered Lands and find the four Druzaic Shrines. Knowling the locations of these mythical shrines would be wise before I begin this quest. The Druzaic Shrines could be anywhere!", 11, 1790462,2490617)
  21. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  22. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  23. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  24. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  25. end
  26. function Accepted(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is accepted
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is declined
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. -- Remove any quest specific items here when the quest is deleted
  34. end
  35. function Step1Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I found and studied the Vul'Zet Shrine.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I found and studied the Vul'Myr Shrine.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step3Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I found and studied the Vul'Uzu Shrine.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "I found and studied the Vul'Kab Shrine.")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function CheckProgress(Quest, QuestGiver, Player)
  52. if QuestStepIsComplete(Player, 5572, 1) and QuestStepIsComplete(Player, 5572, 2) and QuestStepIsComplete(Player, 5572, 3) and QuestStepIsComplete(Player, 5572, 4)then
  53. UpdateQuestTaskGroupDescription(Quest, 1, "I found all four Druzaic Shrines and now comprehend the language of pure magic, Druzaic.")
  54. UpdateQuestDescription(Quest, "I finally discovered all four of the Druzaic Shrines in the Shattered Lands. I have studied them and learned the language of pure magic, Druzaic.")
  55. GiveQuestReward(Quest, Player)
  56. AddLanguage(Player, 27)
  57. SendMessage(Player, "You have learned the basics of the Druzaic language.", "White")
  58. end
  59. end
  60. function Reload(Quest, QuestGiver, Player, Step)
  61. if Step == 1 then
  62. Step1Complete(Quest, QuestGiver, Player)
  63. elseif Step == 2 then
  64. Step2Complete(Quest, QuestGiver, Player)
  65. elseif Step == 3 then
  66. Step3Complete(Quest, QuestGiver, Player)
  67. elseif Step == 4 then
  68. Step4Complete(Quest, QuestGiver, Player)
  69. end
  70. end