charge_of_the_leatherfoot_brigade__doopy.lua 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : Quests/FallenGate/charge_of_the_leatherfoot_brigade__doopy.lua
  3. Script Purpose : Handles the quest, "Charge of the Leatherfoot Brigade - Doopy"
  4. Script Author : premierio015
  5. Script Date : 10.07.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Fallen Gate
  8. Quest Giver : The Sarge(1190020)
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to get a spectral badge from a blighted denizen.", 1, 10, "I doubt this will make much of a difference, but I might as well give it a try. I should try to find these badges on the undead Teir'Dal the Sarge mentioned.", 1268, 1190039, 1190068)
  14. AddQuestStepKill(Quest, 2, "I need to get a spectral badge from a blighted shopkeeper.", 1, 100, "I doubt this will make much of a difference, but I might as well give it a try. I should try to find these badges on the undead Teir'Dal the Sarge mentioned.", 1268, 1190037, 1190041, 1190049, 1190113)
  15. AddQuestStepKill(Quest, 3, "I need to get a spectral badge from a blighted outcast.", 1, 100, "I doubt this will make much of a difference, but I might as well give it a try. I should try to find these badges on the undead Teir'Dal the Sarge mentioned.", 1268, 1190038)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. local conversation = CreateConversation()
  23. PlayFlavor(QuestGiver, "voiceover/english/the_sarge/fallengate/qst_the_sarge005.mp3", "", "", 1573437629, 1012284227, Player)
  24. AddConversationOption(conversation, "But they're all dead! How are you supposed... fine, I'll do it.")
  25. StartConversation(conversation, QuestGiver, Player, "Here's what you gotta do, Doopy. Go in there and get the attention of the important looking elves and lure them back here. Try to get the soldiers, or witches, heck, even a shopkeeper will do. No! Don't think of fighting them, son. You'll get yerself killed! When you bring them back here, we'll see if they have one of those trader's medallions on them! Now get out there, son!")
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. -- Add dialog here for when the quest is declined
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. -- Remove any quest specific items here when the quest is deleted
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I've found a spectral badge on a blighted denizen.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I've found a spectral badge on a blighted shopkeeper.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I've found a spectral badge on a blighted outcast.")
  43. CheckProgress(Quest, QuestGiver, Player)
  44. end
  45. function QuestComplete(Quest, QuestGiver, Player)
  46. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  47. UpdateQuestStepDescription(Quest, 4, "I've spoken with the Sarge's ghost")
  48. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with the Sarge again, but he still didn't remember me speaking with him.")
  49. UpdateQuestDescription(Quest, "I've scouted the areas that the Sarge mentioned, but it didn't make much of a difference to him. <br>")
  50. GiveQuestReward(Quest, Player)
  51. end
  52. function CheckProgress(Quest, QuestGiver, Player)
  53. if QuestStepIsComplete(Player, 5309, 1) and QuestStepIsComplete(Player, 5309, 2) and QuestStepIsComplete(Player, 5309, 3) then
  54. UpdateQuestTaskGroupDescription(Quest, 1, "I've found a spectral badge from each one of the Teir'Dal")
  55. AddQuestStepChat(Quest, 4, "I need to speak with the Sarge's ghost", 1, "Now that I've found these badges, maybe I should bring them back to the Sarge as well. Perhaps this time he'll notice me and stop replaying his memories.", 11, 1190020)
  56. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  57. end
  58. end
  59. function Reload(Quest, QuestGiver, Player, Step)
  60. if Step == 1 then
  61. Step1Complete(Quest, QuestGiver, Player)
  62. elseif Step == 2 then
  63. Step2Complete(Quest, QuestGiver, Player)
  64. elseif Step == 3 then
  65. Step3Complete(Quest, QuestGiver, Player)
  66. elseif Step == 4 then
  67. QuestComplete(Quest, QuestGiver, Player)
  68. end
  69. end