FinishingtheNegotiations.lua 5.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. --[[
  2. Script Name : Quests/Commonlands/FinishingtheNegotiations.lua)
  3. Script Purpose : Handles the quest, "Finishing 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. AddQuestStepChat(Quest, 1, "I need to speak with Captain Vertas at the Crossroads", 1, "According to Brandus, Captain Vertas has no love for the dervishes. Brandus made mention that Vertas can be used for our purposes in punishing the dervishes.", 11, 330178)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. conversation = CreateConversation()
  19. AddConversationOption(conversation, "Perhaps.")
  20. StartConversation(conversation, QuestGiver, Player, "He may have some other work for you while I try to find my sorcerer partner.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have spoken with Captain Vertas.")
  30. UpdateQuestTaskGroupDescription(Quest, 1, "I have spoken with Vertas and learned he has his own agenda when it comes to the dervishes.")
  31. AddQuestStepChat(Quest, 2, "I should inform Brandus of what I've learned", 1, "I should return to Brandus and inform him of the connection Captain Vertas suspects with the Deathfist orcs.", 11, 330149)
  32. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  33. end
  34. function Step2Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have spoken to Brandus.")
  36. UpdateQuestTaskGroupDescription(Quest, 2, "Brandus was intrigued by my information from Captain Vertas. He no longer seems to care about his shipment but would still like to see the return of his sorcerer.")
  37. AddQuestStepKill(Quest, 3, "I should intercept an orc runner", 3, 100, "Brandus has asked me to find the orc runners near the encampments in the Southern portion of the Commonlands. I should intercept whatever partial messages they are delivering and see what I can uncover.", 75, 330743, 330126)
  38. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have intercepted an orc runner carrying an encoded message.")
  42. UpdateQuestTaskGroupDescription(Quest, 3, "I have found some interesting notes from the orc runners in the Commonlands.")
  43. SummonItem(Player, 3595, 1)
  44. AddQuestStep(Quest, 4, "I should look for several decoded phrases on lone Bloodskull warriors", 1, 10, "I was able to find three separate encoded message pieces on the orc runners. The messages were for lone Bloodskull warriors, they may carry the instructions I need to decode them. I should see if I can find any decoded phrases, with enough of them I might be able to decode the entire message.", 185)
  45. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "I have found the complete decoding instructions.")
  49. AddQuestStep(Quest, 5, "I should decode and read the message", 1, 100, "I was able to find three separate encoded message pieces on the orc runners. The messages were for lone Bloodskull warriors, they may carry the instructions I need to decode them. I should see if I can find any decoded phrases, with enough of them I might be able to decode the entire message.", 11)
  50. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  51. end
  52. function Step5Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 5, "I have decoded and read the message.")
  54. UpdateQuestTaskGroupDescription(Quest, 4, "I have found enough of the instructions to decode the messages I received.")
  55. AddQuestStepChat(Quest, 6, "I should return to Brandus", 1, "I'm sure Brandus will be very interested in this information. I should return to him and tell him of what I've learned.", 11, 330149)
  56. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  57. end
  58. function QuestComplete(Quest, QuestGiver, Player)
  59. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  60. UpdateQuestStepDescription(Quest, 6, "I have returned to Brandus and given him the information I gathered.")
  61. UpdateQuestTaskGroupDescription(Quest, 5, "I have given Brandus the information he was looking for.")
  62. UpdateQuestDescription(Quest, "I found the information Brandus was searching for and have uncovered a meeting between the Bloodskull orcs, the dervish cutthroats, and the sorcerer Brandus has been working with.")
  63. GiveQuestReward(Quest, Player)
  64. end
  65. function Reload(Quest, QuestGiver, Player, Step)
  66. if Step == 1 then
  67. Step1Complete(Quest, QuestGiver, Player)
  68. elseif Step == 2 then
  69. Step2Complete(Quest, QuestGiver, Player)
  70. elseif Step == 3 then
  71. Step3Complete(Quest, QuestGiver, Player)
  72. elseif Step == 4 then
  73. Step4Complete(Quest, QuestGiver, Player)
  74. elseif Step == 5 then
  75. Step5Complete(Quest, QuestGiver, Player)
  76. elseif Step == 6 then
  77. QuestComplete(Quest, QuestGiver, Player)
  78. end
  79. end