9
3

scrawlings_in_the_dark.lua 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. --[[
  2. Script Name : Quests/Antonica/scrawlings_in_the_dark.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.07.21 06:07:18
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "Search for the unholy tome 'Scrawlings of Chirannis.'", 1, 100, "I must venture into Blackburrow and search for the Ark of Chirannis. Inside will be the tome called Scrawlings of Chirannis.", 717)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("I desire a trinket for a trinket, a stolen vault of knowledge. Within the depths of the Sabertooth lair resides a tome bound of gnoll hide and scribed in the black blood of Norrath. Find and return this tome to me, and I shall grant you wonders of time long past. Find me the Scrawlings of Chirannis.")
  20. Dialog.AddVoiceover("voiceover/english/optional1/rikantus/antonica/rikantus005.mp3", 1926201932, 488253869)
  21. Dialog.AddOption("I will return the tome to you.")
  22. Dialog.Start()
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. -- Add dialog here for when the quest is declined
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. -- Remove any quest specific items here when the quest is deleted
  29. end
  30. function Step1Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "Found the unholy tome 'Scrawlings of Chirannis.'")
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I found the tome called 'Scrawlings of Chirannis,' but five pages have been removed.")
  33. AddQuestStepKill(Quest, 2, "Hunt down Sabertooth diviners for the first missing page.", 1, 100, "I must obtain the five missing pages of the 'Scrawlings of Chirannis' from the paws of the gnoll priests in Blackburrow.", 2180, 170019)
  34. AddQuestStepKill(Quest, 3, "Hunt down Sabertooth chanters for the next missing page.", 1, 100, "I must obtain the five missing pages of the 'Scrawlings of Chirannis' from the paws of the gnoll priests in Blackburrow.", 2180, 170026)
  35. AddQuestStepKill(Quest, 4, "Hunt down Sabertooth oracles for the final missing pages.", 3, 100, "I must obtain the five missing pages of the 'Scrawlings of Chirannis' from the paws of the gnoll priests in Blackburrow.", 2180, 170042)
  36. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  37. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  38. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  39. end
  40. function Step2Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 2, "Obtained a missing page of 'Scrawlings of Chirannis.'")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function Step3Complete(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 3, "Obtained a missing page of 'Scrawlings of Chirannis.'")
  46. CheckProgress(Quest, QuestGiver, Player)
  47. end
  48. function Step4Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 4, "Obtained the final pages of 'Scrawlings of Chirannis.'")
  50. CheckProgress(Quest, QuestGiver, Player)
  51. end
  52. function CheckProgress(Quest, QuestGiver, Player)
  53. if QuestStepIsComplete(Player, 5329, 1) and QuestStepIsComplete(Player, 5329, 2) and QuestStepIsComplete(Player, 5329, 3) and QuestStepIsComplete(Player, 5329, 4) then
  54. UpdateQuestTaskGroupDescription(Quest, 1, "I found the tome called 'Scrawlings of Chirannis,' but five pages have been removed.")
  55. UpdateQuestTaskGroupDescription(Quest, 2, "I obtained the five missing pages of the 'Scrawlings of Chirannis' from the paws of the gnoll priests in Blackburrow.")
  56. AddQuestStepChat(Quest, 5, "Return to Rikantus at Evernight Cemetery in Antonica.", 1, "I must return the 'Scrawlings of Chirannis' to Rikantus at Evernight Cemetery in Antonica.", 11, 120403)
  57. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  58. end
  59. end
  60. function QuestComplete(Quest, QuestGiver, Player)
  61. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  62. UpdateQuestStepDescription(Quest, 5, "Returned to Rikantus at Evernight Cemetery in Antonica.")
  63. UpdateQuestTaskGroupDescription(Quest, 3, "I gave the tome called 'Scrawlings of Chirannis' to Rikantus at Evernight Cemetery in Antonica.")
  64. if HasItem(Player, 14236) then
  65. RemoveItem(Player, 14236)
  66. end
  67. UpdateQuestDescription(Quest, "I gave the tome called 'Scrawlings of Chirannis' to Rikantus at Evernight Cemetery in Antonica.")
  68. GiveQuestReward(Quest, Player)
  69. end
  70. function Reload(Quest, QuestGiver, Player, Step)
  71. if Step == 1 then
  72. Step1Complete(Quest, QuestGiver, Player)
  73. elseif Step == 2 then
  74. Step2Complete(Quest, QuestGiver, Player)
  75. elseif Step == 3 then
  76. Step3Complete(Quest, QuestGiver, Player)
  77. elseif Step == 4 then
  78. Step4Complete(Quest, QuestGiver, Player)
  79. elseif Step == 5 then
  80. QuestComplete(Quest, QuestGiver, Player)
  81. end
  82. end