PoundingTheEnemy.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. --[[
  2. Script Name : PoundingtheEnemy.lua
  3. Script Purpose : Handles the quest, "Pounding the Enemy"
  4. Script Author : jakejp
  5. Script Date : 10/4/2018
  6. Script Notes :
  7. Zone : The Ruins
  8. Quest Giver : Lieutenant Argosian
  9. Preceded by : Pawns in the Game
  10. Followed by : Prophet and Loss
  11. --]]
  12. -- QUEST ID'S --
  13. local PoundingTheEnemy = 370
  14. -- MOB ID'S --
  15. local BrokentuskGuard = 1270014
  16. local BrokentuskWarrior = 1270013
  17. local BrokentuskOverseer = 1270006
  18. -- NPC ID's --
  19. local LieutenantArgosian = 1270019
  20. function Init(Quest)
  21. AddQuestStepKill(Quest, 1, "Defeat Brokentusk guards", 5, 100, "I have been ordered to defeat the Brokentusk orcs in the Ruins and defend the vagrant squatters. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, BrokentuskGuard)
  22. AddQuestStepKill(Quest, 2, "Defeat Brokentusk warriors", 5, 100, "I have been ordered to defeat the Brokentusk orcs in the Ruins and defend the vagrant squatters. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, BrokentuskWarrior)
  23. AddQuestStepKill(Quest, 3, "Slay the overseer", 1, 100, "I have been ordered to defeat the Brokentusk orcs in the Ruins and defend the vagrant squatters. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 2489, BrokentuskOverseer)
  24. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  25. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  26. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  27. end
  28. function CheckProgress(Quest, QuestGiver, Player)
  29. if QuestStepIsComplete(Player, PoundingTheEnemy, 1) and QuestStepIsComplete(Player, PoundingTheEnemy, 2) and QuestStepIsComplete(Player, PoundingTheEnemy, 3) then
  30. Step4Complete(Quest, QuestGiver, Player)
  31. end
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have defeated five Brokentusk guards.")
  35. CheckProgress(Quest, QuestGiver, Player)
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have defeated five Brokentusk warriors.")
  39. CheckProgress(Quest, QuestGiver, Player)
  40. end
  41. function Step3Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 3, "I have slain the orc overseer.")
  43. CheckProgress(Quest, QuestGiver, Player)
  44. end
  45. function Step4Complete(Quest, QuestGiver, Player)
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I have defeated the orcs, keeping the vagrants safe for now.")
  47. AddQuestStepChat(Quest, 4, "Report to Lieutenant Argosian", 1, "I should return to Lieutenant Argosian in the Ruins and report that the vagrants are safe for now. I can reach the Ruins by using any of the bells in and around the City of Freeport.", 11, LieutenantArgosian)
  48. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  49. end
  50. function QuestComplete(Quest, QuestGiver, Player)
  51. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  52. UpdateQuestStepDescription(Quest, 4, "I have reported back to Lieutenant Argosian.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I have returned to Lieutenant Argosian.")
  54. UpdateQuestDescription(Quest, "I defeated a variety of Brokentusk orcs and kept the squatters safe in the Ruins. The threat is far from over, however.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. --[[ if Step == 1 then
  59. Step1Complete(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2Complete(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3Complete(Quest, QuestGiver, Player)
  64. elseif Step == 4 then
  65. QuestComplete(Quest, QuestGiver, Player)
  66. end
  67. --]]
  68. if QuestStepIsComplete(Player, PoundingTheEnemy, 1) then
  69. Step1Complete(Quest, QuestGiver, Player)
  70. end
  71. if QuestStepIsComplete(Player, PoundingTheEnemy, 2) then
  72. Step2Complete(Quest, QuestGiver, Player)
  73. end
  74. if QuestStepIsComplete(Player, PoundingTheEnemy, 3) then
  75. Step3Complete(Quest, QuestGiver, Player)
  76. end
  77. if QuestStepIsComplete(Player, PoundingTheEnemy, 4) then
  78. Step4Complete(Quest, QuestGiver, Player)
  79. end
  80. end
  81. function Accepted(Quest, QuestGiver, Player)
  82. FaceTarget(QuestGiver, Player)
  83. conversation = CreateConversation()
  84. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/lieutenant_argosian/fprt_adv04_ruins/revamp/lieutenant_argosian015b.mp3", "", "", 102436079, 1387861460, Player)
  85. AddConversationOption(conversation, "I will.", "dlg_10_5")
  86. StartConversation(conversation, QuestGiver, Player, "I knew I could count on you. Return to me when the orcs have paid for their crimes.")
  87. end
  88. function Declined(Quest, QuestGiver, Player)
  89. -- Add dialog here for when the quest is declined
  90. end