sprawl_guttersnipe_sweep.lua 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --[[
  2. Script Name : Quests/TheSprawl/sprawl_guttersnipe_sweep.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.12.04 04:12:27
  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, 2)
  13. SetQuestFeatherColor(Quest, 3)
  14. SetQuestRepeatable(Quest)
  15. if RandomChoice == 1 then
  16. AddQuestStepKill(Quest, 1, "Slay Guttersnipe hooligans", 6, 100, "I'm supposed to knock these Dervishes in the Sprawl down a few notches. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 611, 8400011)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. elseif RandomChoice == 2 then
  19. AddQuestStepKill(Quest, 1, "Slay Guttersnipe crooks", 6, 100, "I'm supposed to knock these Dervishes in the Sprawl down a few notches. I can reach the Sprawl by using any of the bells in and around the City of Freeport.", 611, 8400010)
  20. AddQuestStepCompleteAction(Quest, 1, "Step2Complete")
  21. end
  22. end
  23. function Accepted(Quest, QuestGiver, Player)
  24. FaceTarget(QuestGiver, Player)
  25. conversation = CreateConversation()
  26. AddConversationOption(conversation, "I will do so.")
  27. StartConversation(conversation, QuestGiver, Player, "Glad to hear it. Defeat them and return to me for your payment.")
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is declined
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. -- Remove any quest specific items here when the quest is deleted
  34. end
  35. function Step1Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I've dealt with the Guttersnipe.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I've dealt with the Guttersnipe.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function CheckProgress(Quest, QuestGiver, Player)
  44. if QuestStepIsComplete(Player, 5934, 1) then
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I'd say they've been cut down to size.")
  46. UpdateQuestTaskGroupDescription(Quest, 1, "Class dismissed.")
  47. 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)
  48. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  49. end
  50. end
  51. function QuestComplete(Quest, QuestGiver, Player)
  52. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  53. UpdateQuestStepDescription(Quest, 3, "I spoke with Liege Aquila.")
  54. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Liege Aquila.")
  55. UpdateQuestDescription(Quest, "I've taken care of the dervishes here in the Sprawl, just like Liege Aquila asked. I should return to him only if I desire to continue doing this sort of work.")
  56. GiveQuestReward(Quest, Player)
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. local RandomChoice = MakeRandomInt(1, 3)
  60. if Step == 1 then
  61. if RandomChoice == 1 then
  62. Step1Complete(Quest, QuestGiver, Player)
  63. elseif RandomChoice == 2 then
  64. Step2Complete(Quest, QuestGiver, Player)
  65. elseif RandomChoice == 3 then
  66. Step3Complete(Quest, QuestGiver, Player)
  67. end
  68. elseif Step == 2 then
  69. CheckProgress(Quest, QuestGiver, Player)
  70. elseif Step == 3 then
  71. QuestComplete(Quest, QuestGiver, Player)
  72. end
  73. end