sprawl_giantslayer_sweep.lua 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. --[[
  2. Script Name : Quests/TheSprawl/sprawl_giantslayer_sweep.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.12.04 02:12:31
  5. Script Purpose :
  6. Zone : TheSprawl
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. local RandomChoice = MakeRandomInt(1, 3)
  13. SetQuestFeatherColor(Quest, 3)
  14. SetQuestRepeatable(Quest)
  15. if RandomChoice == 1 then
  16. AddQuestStepKill(Quest, 1, "Slay Giantslayer thugs", 6, 100, "I'm to teach the Giantslayers in the Sprawl to respect Freeport and fear the Overlord. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 611, 8400015)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. elseif RandomChoice == 2 then
  19. AddQuestStepKill(Quest, 1, "Slay Giantslayer brutes", 6, 100, "I'm to teach the Giantslayers in the Sprawl to respect Freeport and fear the Overlord. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 611, 8400025)
  20. AddQuestStepCompleteAction(Quest, 1, "Step2Complete")
  21. elseif RandomChoice == 3 then
  22. AddQuestStepKill(Quest, 1, "Slay Giantslayer bashers", 6, 100, "I'm to teach the Giantslayers in the Sprawl to respect Freeport and fear the Overlord. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 611, 8400027)
  23. AddQuestStepCompleteAction(Quest, 1, "Step3Complete")
  24. end
  25. end
  26. function Accepted(Quest, QuestGiver, Player)
  27. FaceTarget(QuestGiver, Player)
  28. conversation = CreateConversation()
  29. AddConversationOption(conversation, "I will do so.")
  30. StartConversation(conversation, QuestGiver, Player, "There is a band of ruffians known as the Giantslayers. You will teach them to respect Freeport and fear the Overlord! Is that clear?")
  31. end
  32. function Declined(Quest, QuestGiver, Player)
  33. -- Add dialog here for when the quest is declined
  34. end
  35. function Deleted(Quest, QuestGiver, Player)
  36. -- Remove any quest specific items here when the quest is deleted
  37. end
  38. function Step1Complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 1, "I've dealt with the Giantslayer thugs.")
  40. CheckProgress(Quest, QuestGiver, Player)
  41. end
  42. function Step2Complete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 1, "I've dealt with the Giantslayer brutes.")
  44. CheckProgress(Quest, QuestGiver, Player)
  45. end
  46. function Step3Complete(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 1, "I've dealt with the Giantslayer bashers.")
  48. CheckProgress(Quest, QuestGiver, Player)
  49. end
  50. function CheckProgress(Quest, QuestGiver, Player)
  51. if QuestStepIsComplete(Player, 5933, 1) then
  52. UpdateQuestTaskGroupDescription(Quest, 1, "Class dismissed.")
  53. AddQuestStepChat(Quest, 3, "Report to Liege Aquila", 1, "I should report back to Liege Aquila in the Sprawl. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 11, 8400018)
  54. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  55. end
  56. end
  57. function QuestComplete(Quest, QuestGiver, Player)
  58. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  59. UpdateQuestStepDescription(Quest, 3, "I spoke with Liege Aquila.")
  60. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Liege Aquila.")
  61. UpdateQuestDescription(Quest, "There are a few less Giantslayers in the Sprawl that will disrespect Freeport. I have done as Liege Aquila had ordered. I should return to him only if I desire to continue doing this sort of work.")
  62. GiveQuestReward(Quest, Player)
  63. end
  64. function Reload(Quest, QuestGiver, Player, Step)
  65. local RandomChoice = MakeRandomInt(1, 3)
  66. if Step == 1 then
  67. if RandomChoice == 1 then
  68. Step1Complete(Quest, QuestGiver, Player)
  69. elseif RandomChoice == 2 then
  70. Step2Complete(Quest, QuestGiver, Player)
  71. elseif RandomChoice == 3 then
  72. Step3Complete(Quest, QuestGiver, Player)
  73. end
  74. elseif Step == 2 then
  75. CheckProgress(Quest, QuestGiver, Player)
  76. elseif Step == 3 then
  77. QuestComplete(Quest, QuestGiver, Player)
  78. end
  79. end