StartingtheNegotiations.lua 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. --[[
  2. Script Name : Quests/Commonlands/StartingtheNegotiations.lua
  3. Script Purpose : Handles the quest, "Starting the Negotiations"
  4. Script Author : premierio015
  5. Script Date : 03.01.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver : Brandus Levine
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to eliminate Dervish cutthroats", 3, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330092, 330104)
  14. AddQuestStepKill(Quest, 2, "I need to remove the Dervish thug threat", 3, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330105, 330096)
  15. AddQuestStepKill(Quest, 3, "I need to quell the Dervish zealots's fervor", 3, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330098)
  16. AddQuestStepKill(Quest, 4, "I need to exact justice on Dervish ruffians", 2, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330103, 330100)
  17. AddQuestStepKill(Quest, 5, "I need to execute Dervish assassins", 2, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330102, 330099)
  18. AddQuestStepKill(Quest, 6, "I need to teach Dervish heretics the error of their ways", 2, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330095, 330107)
  19. AddQuestStepKill(Quest, 7, "I need to dispose of Dervish outlanders", 2, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330101, 330093)
  20. AddQuestStepKill(Quest, 8, "I need to rid the lands of Dervish thaumaturges", 2, 100, "I should eliminate a few Dervishes from the Commonlands. They can be found on the far Western end of the Commonlands.", 611, 330106, 330094)
  21. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  22. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  23. AddQuestStepCompleteAction(Quest, 3, "Step2Complete")
  24. AddQuestStepCompleteAction(Quest, 4, "Step2Complete")
  25. AddQuestStepCompleteAction(Quest, 5, "Step2Complete")
  26. AddQuestStepCompleteAction(Quest, 6, "Step2Complete")
  27. AddQuestStepCompleteAction(Quest, 7, "Step2Complete")
  28. AddQuestStepCompleteAction(Quest, 8, "Step2Complete")
  29. end
  30. function Accepted(Quest, QuestGiver, Player)
  31. FaceTarget(QuestGiver, Player)
  32. PlayFlavor(QuestGiver, "brandus_levine/commonlands/quests/brandus_levine/brandus_levine015.mp3", "", "", 1439836789, 4202652757, Player)
  33. conversation = CreateConversation()
  34. AddConversationOption(conversation, "Right.")
  35. StartConversation(conversation, QuestGiver, Player, "You'll be back when THEY'RE done, heh.")
  36. end
  37. function Declined(Quest, QuestGiver, Player)
  38. -- Add dialog here for when the quest is declined
  39. end
  40. function Deleted(Quest, QuestGiver, Player)
  41. -- Remove any quest specific items here when the quest is deleted
  42. end
  43. function Step1Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 1, "I feel I have eliminated enough of the Dervish cutthroats.")
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I feel I have eliminated enough of the Dervish cutthroats.")
  46. CheckProgress(Quest, QuestGiver, Player)
  47. end
  48. function Step2Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 2, "I feel I have eliminated enough of the Dervish thugs.")
  50. CheckProgress(Quest, QuestGiver, Player)
  51. end
  52. function Step3Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 3, "I feel I have eliminated enough of the Dervish zealots.")
  54. CheckProgress(Quest, QuestGiver, Player)
  55. end
  56. function Step4Complete(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 4, "I feel I have eliminated enough of the Dervish ruffians.")
  58. CheckProgress(Quest, QuestGiver, Player)
  59. end
  60. function Step5Complete(Quest, QuestGiver, Player)
  61. UpdateQuestStepDescription(Quest, 5, "I feel I have eliminated enough of the Dervish assassins.")
  62. CheckProgress(Quest, QuestGiver, Player)
  63. end
  64. function Step6Complete(Quest, QuestGiver, Player)
  65. UpdateQuestStepDescription(Quest, 6, "I feel I have eliminated enough of the Dervish heretics.")
  66. CheckProgress(Quest, QuestGiver, Player)
  67. end
  68. function Step7Complete(Quest, QuestGiver, Player)
  69. UpdateQuestStepDescription(Quest, 7, "I feel I have eliminated enough of the Dervish outlanders.")
  70. CheckProgress(Quest, QuestGiver, Player)
  71. end
  72. function Step8Complete(Quest, QuestGiver, Player)
  73. UpdateQuestStepDescription(Quest, 8, "I feel I have eliminated enough of the Dervish thaumaturges.")
  74. CheckProgress(Quest, QuestGiver, Player)
  75. end
  76. function QuestComplete(Quest, QuestGiver, Player)
  77. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  78. UpdateQuestStepDescription(Quest, 9, "I have spoken with Brandus.")
  79. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken to Brandus about the next step in the plan.")
  80. UpdateQuestDescription(Quest, "I have removed quite a number of Dervishes from the Commonlands. After speaking with Brandus his temper seems to have dissipated some and in his clearer thinking he is working on the next step in the negotiations.")
  81. GiveQuestReward(Quest, Player)
  82. end
  83. function CheckProgress(Quest, QuestGiver, Player)
  84. if QuestStepIsComplete(Player, 424, 1) and QuestStepIsComplete(Player, 424, 2) and QuestStepIsComplete(Player, 424, 3) and QuestStepIsComplete(Player, 424, 4) and QuestStepIsComplete(Player, 424, 5) and QuestStepIsComplete(Player, 424, 6) and QuestStepIsComplete(Player, 424, 7) and QuestStepIsComplete(Player, 424, 8) then
  85. UpdateQuestTaskGroupDescription(Quest, 1, "I found the Dervishes and eliminated several of their number.")
  86. AddQuestStepChat(Quest, 9, "I should return to Brandus", 1, "I have eliminated enough Dervish cutthroats. I should return to Brandus to see what his next plan is.", 11, 330149)
  87. AddQuestStepCompleteAction(Quest, 9, "QuestComplete")
  88. end
  89. end
  90. function Reload(Quest, QuestGiver, Player, Step)
  91. if Step == 1 then
  92. Step1Complete(Quest, QuestGiver, Player)
  93. elseif Step == 2 then
  94. Step2Complete(Quest, QuestGiver, Player)
  95. elseif Step == 3 then
  96. Step3Complete(Quest, QuestGiver, Player)
  97. elseif Step == 4 then
  98. Step4Complete(Quest, QuestGiver, Player)
  99. elseif Step == 5 then
  100. Step5Complete(Quest, QuestGiver, Player)
  101. elseif Step == 6 then
  102. Step6Complete(Quest, QuestGiver, Player)
  103. elseif Step == 7 then
  104. Step7Complete(Quest, QuestGiver, Player)
  105. elseif Step == 8 then
  106. Step8Complete(Quest, QuestGiver, Player)
  107. elseif Step == 9 then
  108. QuestComplete(Quest, QuestGiver, Player)
  109. end
  110. end