BarbarianJustice.lua 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : Quests/Freeport/BarbarianJustice.lua
  3. Script Purpose : Handles the quest, "Barbarian Justice"
  4. Script Author : premierio015
  5. Script Date : 27.08.2020
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : The City of Freeport
  8. Quest Giver : Selyse Brazenroot
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "Kill the greedy, corrupt guards", 8, 100, "I should liberate the stolen Halasian antiques within Scale Yard: Traitors' End and deal with the corrupt guards.", 11, 6490005)
  14. AddQuestStep(Quest, 2, "Gather Halasian antiques", 6, 100, "I should liberate the stolen Halasian antiques within Scale Yard: Traitors' End and deal with the corrupt guards.", 11)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is accepted
  20. end
  21. function Declined(Quest, QuestGiver, Player)
  22. -- Add dialog here for when the quest is declined
  23. end
  24. function Deleted(Quest, QuestGiver, Player)
  25. -- Remove any quest specific items here when the quest is deleted
  26. end
  27. function Step1Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "")
  29. CheckProgress(Quest, QuestGiver, Player)
  30. AddQuestStepChat(Quest, 3, "Return to Selyse Brazenroot", 1, "I should return to Selyse Brazenroot, at the Freeport Militia House in the city of Freeport.", 11, 5590142)
  31. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  32. end
  33. function Step2Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function CheckProgress(Quest, QuestGiver, Player)
  38. if QuestStepIsComplete(Player, 577, 1) and QuestStepIsComplete(Player, 577, 2) then
  39. UpdateQuestTaskGroupDescription(Quest, 1, "")
  40. AddQuestStepChat(Quest, 3, "Return to Selyse Brazenroot", 1, "I should return to Selyse Brazenroot, at the Freeport Militia House in the city of Freeport.", 11, 5590142)
  41. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  42. end
  43. end
  44. function QuestComplete(Quest, QuestGiver, Player)
  45. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  46. UpdateQuestStepDescription(Quest, 2, "")
  47. UpdateQuestTaskGroupDescription(Quest, 2, "I returned to Selyse Brazenroot, the barbarian mentor.")
  48. UpdateQuestDescription(Quest, "Selyse Brazenroot, the barbarian mentor in Freeport, was pleased that I was able to recover so many Halasian antiques and heirlooms that were left behind within Scale Yard.")
  49. GiveQuestReward(Quest, Player)
  50. end
  51. function Reload(Quest, QuestGiver, Player, Step)
  52. if Step == 1 then
  53. Step1Complete(Quest, QuestGiver, Player)
  54. elseif Step == 2 then
  55. Quest2Complete(Quest, QuestGiver, Player)
  56. elseif Step == 3 then
  57. QuestComplete(Quest, QuestGiver, Player)
  58. end
  59. end