willow_wood_citizenship_task.lua 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. --[[
  2. Script Name : Quests/Hallmark/willow_wood_citizenship_task.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.08.30 06:08:00
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver: willow wood citizenship application
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "Gather five tokens from the creatures in the Forest Ruins.", 5, 30, "The local ruins have been seeded with tokens for the citizens of the Willow Wood to gather. These tokens may be found on any creatures in the Forest Ruins.", 1322, 8270002 ,8270003 ,8270005,8270006,8270007,8270008,8270009,8270010,8270011,8270012,8270013,8270014,8270015,8270016,8270017,8270018,8270019,8270020,8270021,8270024,8270025,8270026,8270027,8270028,8270031,8270034,8270045,8270056,8270058,8270059,8270060,8270061,8270062,8270063,8270064,8270065,8270075,8270076)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. UpdateQuestZone(Quest,"Forest Ruins")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  27. UpdateQuestStepDescription(Quest, 1, "I have gathered five tokens from the Forest Ruins.")
  28. UpdateQuestTaskGroupDescription(Quest, 1, "I have gathered the tokens required to prove my worth as a citizen.")
  29. UpdateQuestZone(Quest,"Willow Wood")
  30. AddQuestStep(Quest, 2, "I need to enter the citizenship trial.", 1, 100, "I must perform the citizenship trial by returning to the Citizenship Sign and entering the trial chamber", 1322)
  31. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  32. end
  33. function Step2Complete(Quest, QuestGiver, Player)
  34. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. UpdateQuestStepDescription(Quest, 2, "I've entered the citizenship trial.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "I've entered the citizenship trial.")
  37. UpdateQuestZone(Quest,"Qeynos Citizenship Trial Chamber")
  38. AddQuestStepChat(Quest, 3, "I need to speak with Marshal Glorfel regarding my Citizenship Trial.", 1, "I need to speak with Marshal Glorfel regarding my Citizenship Trial", 1322, 22101350)
  39. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  43. UpdateQuestStepDescription(Quest, 3, "I've entered the citizenship trial.")
  44. UpdateQuestTaskGroupDescription(Quest, 3, "I've entered the citizenship trial.")
  45. AddQuestStepChat(Quest, 4, "I need to judge the traitors.",1, "Marshal Glorfel has tasked me with rendering judgment upon some treasonous residents in order to gain citizenship. He has pointed out that there are those who would betray our great city to that wretch Lucan. To prove myself, I will have to render final judgment on all of them. ",0,22101351)
  46. AddQuestStepChat(Quest, 5, "I need to judge the traitors.",1, "Marshal Glorfel has tasked me with rendering judgment upon some treasonous residents in order to gain citizenship. He has pointed out that there are those who would betray our great city to that wretch Lucan. To prove myself, I will have to render final judgment on all of them. ",0,22101354)
  47. AddQuestStepChat(Quest, 6, "I need to judge the traitors.",1, "Marshal Glorfel has tasked me with rendering judgment upon some treasonous residents in order to gain citizenship. He has pointed out that there are those who would betray our great city to that wretch Lucan. To prove myself, I will have to render final judgment on all of them. ",0,22101353)
  48. AddQuestStepChat(Quest, 7, "I need to judge the traitors.",1, "Marshal Glorfel has tasked me with rendering judgment upon some treasonous residents in order to gain citizenship. He has pointed out that there are those who would betray our great city to that wretch Lucan. To prove myself, I will have to render final judgment on all of them. ",0,22101352)
  49. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  50. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  51. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  52. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  53. end
  54. function Step4Complete(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 4, "I've judged the Freeport mole.")
  56. CheckProgress(Quest, QuestGiver, Player)
  57. end
  58. function Step5Complete(Quest, QuestGiver, Player)
  59. UpdateQuestStepDescription(Quest, 5, "I've judged the disgruntled refugee.")
  60. CheckProgress(Quest, QuestGiver, Player)
  61. end
  62. function Step6Complete(Quest, QuestGiver, Player)
  63. UpdateQuestStepDescription(Quest, 6, "I've judged the Freeport partisan.")
  64. CheckProgress(Quest, QuestGiver, Player)
  65. end
  66. function Step7Complete(Quest, QuestGiver, Player)
  67. UpdateQuestStepDescription(Quest, 7, "I've judged Tavithi N'sari.")
  68. CheckProgress(Quest, QuestGiver, Player)
  69. end
  70. function CheckProgress(Quest, QuestGiver, Player)
  71. if QuestStepIsComplete(Player, 5723, 4) and QuestStepIsComplete(Player, 5723, 5) and QuestStepIsComplete(Player, 5723, 6) and QuestStepIsComplete(Player, 5723, 7)then
  72. UpdateQuestTaskGroupDescription(Quest, 7, "I have dealt with the traitors")
  73. AddQuestStepChat(Quest, 8, "I need to return to Marshal Glorfel.", 1, "I must return to Marshal Glorfel to let him know the deed is done.",0, 22101350)
  74. AddQuestStepCompleteAction(Quest, 8, "QuestComplete")
  75. end
  76. end
  77. function QuestComplete(Quest, QuestGiver, Player)
  78. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  79. UpdateQuestStepDescription(Quest, 8, "Qeynos Citizenship Granted")
  80. UpdateQuestTaskGroupDescription(Quest, 8, "I returned to Marshal Glorfel and he has granted me Qeynos citizenship.")
  81. UpdateQuestDescription(Quest, "The task list is completed and you may now apply to become a citizen of the city of Qeynos.")
  82. GiveQuestReward(Quest, Player)
  83. end
  84. function Reload(Quest, QuestGiver, Player, Step)
  85. if Step == 1 then
  86. Step1Complete(Quest, QuestGiver, Player)
  87. elseif Step == 2 then
  88. Step2Complete(Quest, QuestGiver, Player)
  89. elseif Step == 3 then
  90. Step3Complete(Quest, QuestGiver, Player)
  91. elseif Step == 4 then
  92. Step4Complete(Quest, QuestGiver, Player)
  93. elseif Step == 5 then
  94. Step5Complete(Quest, QuestGiver, Player)
  95. elseif Step == 6 then
  96. Step6Complete(Quest, QuestGiver, Player)
  97. elseif Step == 7 then
  98. Step7Complete(Quest, QuestGiver, Player)
  99. elseif Step == 8 then
  100. QuestComplete(Quest, QuestGiver, Player)
  101. end
  102. end