baubbleshire_citizenship_task.lua 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. --[[
  2. Script Name : Quests/Hallmark/baubbleshire_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: baubbleshire 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 Caves.", 5, 30, "The local caves have been seeded with tokens for the citizens of the Baubbleshire to gather. These tokens may be found on any creatures in the Caves.", 1350, 8260001, 8260002, 8260003, 8260004, 8260005, 8260006, 8260007, 8260008, 8260009, 8260010, 8260011, 8260012, 8260013, 8260014, 8260015,8260016, 8260017, 8260018, 8260019, 8260020, 8260021, 8260022, 8260023, 8260024, 8260025, 8260026, 8260028, 8260030, 8260031, 8260032, 8260034, 8260073,8260074, 8260077, 8260078, 8260079, 8260080, 8260082, 8260083, 8260086, 8260087, 8260088, 8260089, 8260090, 8260091, 8260093, 8260094)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. UpdateQuestZone(Quest,"Caves")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is declined
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. -- Remove any quest specific items here when the quest is deleted
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  26. UpdateQuestStepDescription(Quest, 1, "I have gathered five tokens from the Caves.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I have gathered the tokens required to prove my worth as a citizen.")
  28. UpdateQuestZone(Quest,"Baubbleshire")
  29. 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",1350)
  30. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  31. end
  32. function Step2Complete(Quest, QuestGiver, Player)
  33. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  34. UpdateQuestStepDescription(Quest, 2, "I've entered the citizenship trial.")
  35. UpdateQuestTaskGroupDescription(Quest, 2, "I've entered the citizenship trial.")
  36. UpdateQuestZone(Quest,"Qeynos Citizenship Trial Chamber")
  37. 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", 1350, 22101350)
  38. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  42. UpdateQuestStepDescription(Quest, 3, "I've entered the citizenship trial.")
  43. UpdateQuestTaskGroupDescription(Quest, 3, "I've entered the citizenship trial.")
  44. 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)
  45. 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)
  46. 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)
  47. 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)
  48. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  49. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  50. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  51. AddQuestStepCompleteAction(Quest, 7, "Step7Complete")
  52. end
  53. function Step4Complete(Quest, QuestGiver, Player)
  54. UpdateQuestStepDescription(Quest, 4, "I've judged the Freeport mole.")
  55. CheckProgress(Quest, QuestGiver, Player)
  56. end
  57. function Step5Complete(Quest, QuestGiver, Player)
  58. UpdateQuestStepDescription(Quest, 5, "I've judged the disgruntled refugee.")
  59. CheckProgress(Quest, QuestGiver, Player)
  60. end
  61. function Step6Complete(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 6, "I've judged the Freeport partisan.")
  63. CheckProgress(Quest, QuestGiver, Player)
  64. end
  65. function Step7Complete(Quest, QuestGiver, Player)
  66. UpdateQuestStepDescription(Quest, 7, "I've judged Tavithi N'sari.")
  67. CheckProgress(Quest, QuestGiver, Player)
  68. end
  69. function CheckProgress(Quest, QuestGiver, Player)
  70. if QuestStepIsComplete(Player, 5718, 4) and QuestStepIsComplete(Player, 5718, 5) and QuestStepIsComplete(Player, 5718, 6) and QuestStepIsComplete(Player, 5718, 7)then
  71. UpdateQuestTaskGroupDescription(Quest, 7, "I have dealt with the traitors")
  72. 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)
  73. AddQuestStepCompleteAction(Quest, 8, "QuestComplete")
  74. end
  75. end
  76. function QuestComplete(Quest, QuestGiver, Player)
  77. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  78. UpdateQuestStepDescription(Quest, 8, "Qeynos Citizenship Granted")
  79. UpdateQuestTaskGroupDescription(Quest, 8, "I returned to Marshal Glorfel and he has granted me Qeynos citizenship.")
  80. UpdateQuestDescription(Quest, "The task list is completed and you may now apply to become a citizen of the city of Qeynos.")
  81. GiveQuestReward(Quest, Player)
  82. end
  83. function Reload(Quest, QuestGiver, Player, Step)
  84. if Step == 1 then
  85. Step1Complete(Quest, QuestGiver, Player)
  86. elseif Step == 2 then
  87. Step2Complete(Quest, QuestGiver, Player)
  88. elseif Step == 3 then
  89. Step3Complete(Quest, QuestGiver, Player)
  90. elseif Step == 4 then
  91. Step4Complete(Quest, QuestGiver, Player)
  92. elseif Step == 5 then
  93. Step5Complete(Quest, QuestGiver, Player)
  94. elseif Step == 6 then
  95. Step6Complete(Quest, QuestGiver, Player)
  96. elseif Step == 7 then
  97. Step7Complete(Quest, QuestGiver, Player)
  98. elseif Step == 8 then
  99. QuestComplete(Quest, QuestGiver, Player)
  100. end
  101. end