scrawlings_in_the_dark.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. function Init(Quest)
  12. 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)
  13. 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)
  14. 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)
  15. 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)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  20. end
  21. function Accepted(Quest, QuestGiver, Player)
  22. FaceTarget(QuestGiver, Player)
  23. local conversation = CreateConversation()
  24. PlayFlavor(QuestGiver, "voiceover/english/optional1/rikantus/antonica/rikantus005.mp3", "", "", 1926201932, 488253869, Player)
  25. AddConversationOption(conversation, "I will return the tome to you.")
  26. StartConversation(conversation, QuestGiver, Player, "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.")
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. -- Add dialog here for when the quest is declined
  30. end
  31. function Deleted(Quest, QuestGiver, Player)
  32. -- Remove any quest specific items here when the quest is deleted
  33. end
  34. function Step1Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 1, "Found the unholy tome 'Scrawlings of Chirannis.'")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I found the tome called 'Scrawlings of Chirannis,' but five pages have been removed.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "Obtained a missing page of 'Scrawlings of Chirannis.'")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step3Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "Obtained a missing page of 'Scrawlings of Chirannis.'")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "Obtained the final pages of 'Scrawlings of Chirannis.'")
  49. CheckProgress(Quest, QuestGiver, Player)
  50. end
  51. function CheckProgress(Quest, QuestGiver, Player)
  52. if QuestStepIsComplete(Player, 5329, 1) and QuestStepIsComplete(Player, 5329, 2) and QuestStepIsComplete(Player, 5329, 3) and QuestStepIsComplete(Player, 5329, 4) then
  53. UpdateQuestTaskGroupDescription(Quest, 1, "I found the tome called 'Scrawlings of Chirannis,' but five pages have been removed.")
  54. UpdateQuestTaskGroupDescription(Quest, 2, "I obtained the five missing pages of the 'Scrawlings of Chirannis' from the paws of the gnoll priests in Blackburrow.")
  55. 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)
  56. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  57. end
  58. end
  59. function QuestComplete(Quest, QuestGiver, Player)
  60. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  61. UpdateQuestStepDescription(Quest, 5, "Returned to Rikantus at Evernight Cemetery in Antonica.")
  62. UpdateQuestTaskGroupDescription(Quest, 3, "I gave the tome called 'Scrawlings of Chirannis' to Rikantus at Evernight Cemetery in Antonica.")
  63. if HasItem(Player, 14236) then
  64. RemoveItem(Player, 14236)
  65. end
  66. UpdateQuestDescription(Quest, "I gave the tome called 'Scrawlings of Chirannis' to Rikantus at Evernight Cemetery in Antonica.")
  67. GiveQuestReward(Quest, Player)
  68. end
  69. function Reload(Quest, QuestGiver, Player, Step)
  70. if Step == 1 then
  71. Step1Complete(Quest, QuestGiver, Player)
  72. elseif Step == 2 then
  73. Step2Complete(Quest, QuestGiver, Player)
  74. elseif Step == 3 then
  75. Step3Complete(Quest, QuestGiver, Player)
  76. elseif Step == 4 then
  77. Step4Complete(Quest, QuestGiver, Player)
  78. elseif Step == 5 then
  79. QuestComplete(Quest, QuestGiver, Player)
  80. end
  81. end