9
3

KnocktheFightOutofEm.lua 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : KnocktheFightOutofEm.lua
  3. Script Purpose : Handles the quest, "Knock the Fight Out of 'Em"
  4. Script Author : jakejp
  5. Script Date : 12/28/2018
  6. Script Notes :
  7. Zone : The Ruins
  8. Quest Giver : Lieutenant Imperidus
  9. Preceded by : Stepping Up The Offensive
  10. Followed by : Vengeance For Shoreside
  11. --]]
  12. local KnocktheFightOutofEm = 392
  13. local LieutenantImperidus = 1270031
  14. local OrcCauldron = 1270075
  15. local OrcKnight = 1270076
  16. local WorshipIdol = 1270074
  17. local WineCask = 1270073
  18. function Init(Quest)
  19. AddQuestStepObtainItem(Quest, 1, "Throw dirt in the orcs' dinner pot", 1, 100, "I must seek out the symbols in the Ruins that the orcs use to inspire themselves. Then I will defile these objects to crush their spirits. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 650, OrcCauldron)
  20. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  21. AddQuestStepObtainItem(Quest, 2, "Deface the statue of an orc knight", 1, 100, "I must seek out the symbols in the Ruins that the orcs use to inspire themselves. Then I will defile these objects to crush their spirits. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 1214, OrcKnight)
  22. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  23. AddQuestStepObtainItem(Quest, 3, "Deface a Lonetusk worship idol", 1, 100, "I must seek out the symbols in the Ruins that the orcs use to inspire themselves. Then I will defile these objects to crush their spirits. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 1058, WorshipIdol)
  24. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  25. AddQuestStepObtainItem(Quest, 4, "Poke a hole in the orcs' wine cask", 1, 100, "I must seek out the symbols in the Ruins that the orcs use to inspire themselves. Then I will defile these objects to crush their spirits. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2287, WineCask)
  26. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  27. end
  28. function CheckProgress(Quest, QuestGiver, Player)
  29. if QuestStepIsComplete(Player, KnocktheFightOutofEm, 1) and QuestStepIsComplete(Player, KnocktheFightOutofEm, 2) and QuestStepIsComplete(Player, KnocktheFightOutofEm, 3) and QuestStepIsComplete(Player, KnocktheFightOutofEm, 4) then
  30. NextStep(Quest, QuestGiver, Player)
  31. end
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I threw dirt in the orcs' dinner pot. Take that, orcs!")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have defaced the statue of an orc knight.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have defaced an idol that the Lonetusk seem to worship.")
  43. CheckProgress(Quest, QuestGiver, Player)
  44. end
  45. function Step4Complete(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 4, "I poked a hole in the orcs' wine cask. Now they'll be thirsty!")
  47. CheckProgress(Quest, QuestGiver, Player)
  48. end
  49. function NextStep(Quest, QuestGiver, Player)
  50. UpdateQuestTaskGroupDescription(Quest, 1, "I found and defaced many objects the orcs hold dear. Hopefully this takes the fight out of them.")
  51. AddQuestStepChat(Quest, 5, "Report to Lieutenant Imperidus", 1, "Having defaced the orc artifacts, I should return to Lieutenant Imperidus at the second outpost in the Ruins. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 11, LieutenantImperidus)
  52. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  53. end
  54. function QuestComplete(Quest, QuestGiver, Player)
  55. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  56. UpdateQuestStepDescription(Quest, 5, "I have reported back to Lieutenant Imperidus.")
  57. UpdateQuestTaskGroupDescription(Quest, 2, "I have reported back to Lieutenant Imperidus.")
  58. UpdateQuestDescription(Quest, "I followed the orders of Lieutenant Imperidus, defacing statues the Lonetusk orcs use to inspire their troops. I also threw dirt into their food and drained their supply of wine. Hopefully the lieutenant's plan will work and my actions will have takens some of the fight out of the orcs.")
  59. GiveQuestReward(Quest, Player)
  60. end
  61. function Reload(Quest, QuestGiver, Player, Step)
  62. if Step == 1 then
  63. Step1Complete(Quest, QuestGiver, Player)
  64. elseif Step == 2 then
  65. Step2Complete(Quest, QuestGiver, Player)
  66. elseif Step == 3 then
  67. Step3Complete(Quest, QuestGiver, Player)
  68. elseif Step == 4 then
  69. Step4Complete(Quest, QuestGiver, Player)
  70. elseif Step == 5 then
  71. QuestComplete(Quest, QuestGiver, Player)
  72. end
  73. end
  74. function Accepted(Quest, QuestGiver, Player)
  75. FaceTarget(QuestGiver, Player)
  76. conversation = CreateConversation()
  77. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_imperidus/fprt_adv04_ruins/revamp/lieutenant_imperidus009.mp3", "", "", 3046376303, 2999823619, Player)
  78. AddConversationOption(conversation, "Do you really think wrecking statues and ruining food is going to ensure victory?", "dlg_3_8")
  79. AddConversationOption(conversation, "I'll get to it.")
  80. StartConversation(conversation, QuestGiver, Player, "Our surest path to victory is to take the fight out of them. Go out there and face the Lonetusk, and deface any statues you see. Seek out their supplies of food and drink and spoil them. Without symbols of victory to inspire them and food in their bellies, their spirits will crumble and they will become easy pickings for us.")
  81. end
  82. function Declined(Quest, QuestGiver, Player)
  83. -- Add dialog here for when the quest is declined
  84. end