repairing_the_ward.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Quest Template
  3. Script Name : repairing_the_ward.lua
  4. Script Purpose : Handles the quest, "Repairing the Ward"
  5. Script Author : Scatman
  6. Script Date : 2009.07.12
  7. Zone : The Graveyard
  8. Quest Giver : Custodian Zaddar Sullissia
  9. Preceded by : The Book of the Dead (the_book_of_the_dead.lua)
  10. Followed by : Reporting to the Ruins (reporting_to_the_ruins.lua)
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "Recite the incantations with Zaddar.", 1, "Recite the magical incantations with Zaddar to reseal the ward upon the graveyard.", 0, 1250014)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeWithZaddar")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/custodian_zaddar_sullissia/fprt_adv02_graveyard/custodian_zaddar100.mp3", "", "", 1431969198, 4289355071, Player)
  20. AddConversationOption(conversation, "Very well, I'll let you prepare.")
  21. StartConversation(conversation, QuestGiver, Player, "I must read the words from the pages of parchment that are now within the Book of the Dead. They are difficult to decipher, even with my skills. Give me a moment to study them.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_SpokeWithZaddar(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "Zaddar and I were not able to repair the ward. Now I must determine why.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I've attempted to reseal the ward by reciting the incantations with Custodian Zaddar but something was wrong.")
  28. AddQuestStepChat(Quest, 2, "I must check the tombs of the Knights of Truth to see which one is not sealed.", 1, "Determine what is preventing the ward from being resealed.", 0, 1250014)
  29. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_SealedTomb")
  30. end
  31. function Step2_Complete_SealedTomb(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 2, "Sir Haligan's tomb is sealed so the ritual can now be completed.")
  33. UpdateQuestTaskGroupDescription(Quest, 2, "I've found the tomb of Sir Haligan and resealed it.")
  34. AddQuestStepChat(Quest, 3, "I should go back to Zaddar and attempt the ritual once more.", 1, "Seek out Zaddar once again and make another attempt at resealing the ward.", 0, 1250014)
  35. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  36. end
  37. function QuestComplete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 3, "I've recited the arcane words with Zaddar and repaired the ward!")
  39. UpdateQuestTaskGroupDescription(Quest, 3, "I've found Zaddar and reattempted to seal the ward.")
  40. GiveQuestReward(Quest, Player)
  41. UpdateQuestDescription(Quest, "I've come a long way with Zaddar here in the graveyard and it's been an interesting adventure. I hope that by repairing the ward and keeping the undead bound to the graveyard, the Overlord will take notice of my actions and maybe reward me one day.")
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. Step1_Complete_SpokeWithZaddar(Quest, QuestGiver, Player)
  46. elseif Step == 2 then
  47. Step2_Complete_SealedTomb(Quest, QuestGiver, Player)
  48. end
  49. end