the_door_knocker.lua 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. --[[
  2. Script Name : the_door_knocker.lua
  3. Script Purpose : Handles the quest, "The Door Knocker"
  4. Script Author : Scatman
  5. Script Date : 2009.07.09
  6. Zone : The Graveyard
  7. Quest Giver: Custodian Zaddar Sullissia
  8. Preceded by: None
  9. Followed by: Paying a Visit (paying_a_visit.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep(Quest, 1, "Find the tomb of Sir Penan to the northwest and ensure it is sealed.", 1, 100, "I need to find the tombs of the fallen knights and ensure that they have remained sealed. I should check the larger tombs, the ones that have plaques noting who is buried there.", 2339)
  13. AddQuestStep(Quest, 2, "Find the tomb of Sir Breel to the west and ensure it is sealed.", 1, 100, "I need to find the tombs of the fallen knights and ensure that they have remained sealed. I should check the larger tombs, the ones that have plaques noting who is buried there.", 2339)
  14. AddQuestStepKill(Quest, 3, "Find the tomb of Sir Haligan to the north and ensure it is sealed.", 1, 100, "I need to find the tombs of the fallen knights and ensure that they have remained sealed. I should check the larger tombs, the ones that have plaques noting who is buried there.", 2339, 1250054)
  15. AddQuestStep(Quest, 4, "Find the tomb of Sir Arlin to the southwest and ensure it is sealed.", 1, 100, "I need to find the tombs of the fallen knights and ensure that they have remained sealed. I should check the larger tombs, the ones that have plaques noting who is buried there.", 2339)
  16. AddQuestStep(Quest, 5, "Find the tomb of Sir Xantille to the north and ensure it is sealed.", 1, 100, "I need to find the tombs of the fallen knights and ensure that they have remained sealed. I should check the larger tombs, the ones that have plaques noting who is buried there.", 2339)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_FoundTomb1")
  18. AddQuestStepCompleteAction(Quest, 2, "Step2_Complete_FoundTomb2")
  19. AddQuestStepCompleteAction(Quest, 3, "Step3_Complete_FoundTomb3")
  20. AddQuestStepCompleteAction(Quest, 4, "Step4_Complete_FoundTomb4")
  21. AddQuestStepCompleteAction(Quest, 5, "Step5_Complete_FoundTomb5")
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. conversation = CreateConversation()
  26. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/custodian_zaddar_sullissia/fprt_adv02_graveyard/custodian_zaddar030.mp3", "", "", 3091175973, 1298049191, Player)
  27. AddConversationOption(conversation, "The things I do for fame and fortune...")
  28. StartConversation(conversation, QuestGiver, Player, "The Overlord will have us both executed if he finds out anyone has been tampering with the tombs in his graveyard! Report back with what you discover.")
  29. end
  30. function Declined(Quest, QuestGiver, Player)
  31. end
  32. function Step1_Complete_FoundTomb1(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I found the secure tomb of Sir Penan.")
  34. if QuestIsComplete(Player, 231) then
  35. FoundAllTombs(Quest, QuestGiver, Player)
  36. end
  37. end
  38. function Step2_Complete_FoundTomb2(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 2, "I found the secure tomb of Sir Breel.")
  40. if QuestIsComplete(Player, 231) then
  41. FoundAllTombs(Quest, QuestGiver, Player)
  42. end
  43. end
  44. function Step3_Complete_FoundTomb3(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 3, "The tomb of Sir Haligan appears to have been disturbed.")
  46. if QuestIsComplete(Player, 231) then
  47. FoundAllTombs(Quest, QuestGiver, Player)
  48. end
  49. end
  50. function Step4_Complete_FoundTomb4(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 4, "I found the secure tomb of Sir Arlin.")
  52. if QuestIsComplete(Player, 231) then
  53. FoundAllTombs(Quest, QuestGiver, Player)
  54. end
  55. end
  56. function Step5_Complete_FoundTomb5(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 5, "I found the secure tomb of Sir Xantille.")
  58. if QuestIsComplete(Player, 231) then
  59. FoundAllTombs(Quest, QuestGiver, Player)
  60. end
  61. end
  62. function FoundAllTombs(Quest, QuestGiver, Player)
  63. UpdateQuestTaskGroupDescription(Quest, 1, "I found the tombs that Zaddar asked of me and reported my findings.")
  64. AddQuestStepChat(Quest, 6, "Return to Zaddar in the Graveyard.", 1, "I must return to Zaddar and let him know of my findings.", 0, 1250014)
  65. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  66. end
  67. function QuestComplete(Quest, QuestGiver, Player)
  68. UpdateQuestStepDescription(Quest, 6, "I have returned to Zaddar after checking on the tombs.")
  69. UpdateQuestTaskGroupDescription(Quest, 2, "I have returned to Zaddar and told him of my findings.")
  70. GiveQuestReward(Quest, Player)
  71. UpdateQuestDescription(Quest, "After spending time with Zaddar in the graveyard, he has taught me much of Freeport's history.")
  72. end
  73. function Reload(Quest, QuestGiver, Player, Step)
  74. if Step == 1 then
  75. Step1_Complete_FoundTomb1(Quest, QuestGiver, Player)
  76. elseif Step == 2 then
  77. Step2_Complete_FoundTomb2(Quest, QuestGiver, Player)
  78. elseif Step == 3 then
  79. Step3_Complete_FoundTomb3(Quest, QuestGiver, Player)
  80. elseif Step == 4 then
  81. Step4_Complete_FoundTomb4(Quest, QuestGiver, Player)
  82. elseif Step == 5 then
  83. Step5_Complete_FoundTomb5(Quest, QuestGiver, Player)
  84. end
  85. end