9
3

testing_the_ward.lua 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. --[[
  2. Script Name : testing_the_ward.lua
  3. Script Purpose : Handles the quest, "Testing the Ward"
  4. Script Author : Scatman
  5. Script Date : 2009.07.11
  6. Zone : The Graveyard
  7. Quest Giver: Custodian Zaddar Sullissia
  8. Preceded by: Finding the Pages (finding_the_pages.lua)
  9. Followed by: Obtaining an Ancient Staff (obtaining_an_ancient_staff.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepChat(Quest, 1, "I must speak with Zaddar in the graveyard and obtain the relic from him.", 1, "I must speak with Zaddar and obtain the relic needed.", 0, 1250014)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_SpokeToZaddar")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/custodian_zaddar_sullissia/fprt_adv02_graveyard/custodian_zaddar052.mp3", "", "", 3643355771, 3506584636, Player)
  19. AddConversationOption(conversation, "Is something bad going to happen if I take it there?", "dlg_4_16")
  20. AddConversationOption(conversation, "I can't help you with this.")
  21. StartConversation(conversation, QuestGiver, Player, "Yes, the remains of that tower still serve as a tribute to Mithaniel Marr. Such a relic would be seen as an abomination to him.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. end
  25. function Step1_Complete_SpokeToZaddar(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have spoken with Zaddar and obtained the relic.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I spoke with Zaddar and obtained the relic needed.")
  28. AddQuestStep(Quest, 2, "I must take this relic to the Tower of Marr in the graveyard.", 1, 100, "Zaddar has given me an ancient relic seeping with unholy power to take to the tower of Marr in the graveyard. He claims that by placing this relic in the doorway of the tower, it will trigger any residual energy of Marr that might still remain. Zaddar feels that if the relic is placed and nothing happens, then the ward has not lost its potency.", 0)
  29. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_PlacedRelic")
  30. end
  31. function Step2_Complete_PlacedRelic(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 2, "I've taken the relic to the Tower of Marr as instructed by Zaddar.")
  33. UpdateQuestTaskGroupDescription(Quest, 2, "By placing the unholy relic within the doorway to the tower of Marr, the long-dormant residual energy of the diety Mithaniel Marr was stirred, smiting me in the process. This indication was enough for Zaddar to know that the ward is in fact weakening after four centuries and something must be done.")
  34. AddQuestStep(Quest, 3, "Retrieve the relic.", 1, 100, "I've placed the relic and been smited for doing so! I need to retrieve the relic!", 0)
  35. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_GotRelic")
  36. end
  37. function Step3_Complete_GotRelic(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 3, "I've picked-up the relic and put it in my bag.")
  39. UpdateQuestTaskGroupDescription(Quest, 3, "I've collected the relic.")
  40. AddQuestStepChat(Quest, 4, "I must speak with Zaddar at once!", 1, "I must return to Zaddar and tell him of what has happened immediately!", 0, 1250014)
  41. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  42. end
  43. function QuestComplete(Quest, QuestGiver, Player)
  44. -- Relic of Unholy Power
  45. while HasItem(Player, 9901) do
  46. RemoveItem(Player, 9901)
  47. end
  48. UpdateQuestStepDescription(Quest, 4, "I've spoken with Zaddar and told him what has happened.")
  49. UpdateQuestTaskGroupDescription(Quest, 4, "I've spoken with Zaddar.")
  50. GiveQuestReward(Quest, Player)
  51. UpdateQuestDescription(Quest, "I found out firsthand that the ward is weakening. It seems the residual power of Marr still holds sway here.")
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. Step1_Complete_SpokeToZaddar(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. Step2_Complete_PlacedRelic(Quest, QuestGiver, Player)
  58. elseif Step == 3 then
  59. Step3_Complete_GotRelic(Quest, QuestGiver, Player)
  60. end
  61. end