9
3

SoberingRemedy.lua 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --[[
  2. Script Name : SoberingRemedy.lua
  3. Script Purpose : Handles the quest, "Sobering Remedy"
  4. Script Author : QuestParser (Replace this)
  5. Script Date : 6/15/2018
  6. Script Notes :
  7. Zone : Starcrest Commune
  8. Quest Giver : Vondorinsarnoo (2340023)
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. -- Quest ID's
  14. local SOBERING_REMEDY = 246
  15. function Init(Quest)
  16. UpdateQuestZone(Quest,"Peat Bog")
  17. AddQuestStepKill(Quest, 1, "I must gather pieces from bog slugs", 1, 33, "I need to gather the components for Vondorinsarnoo's concoction from the Peat Bog, reachable by mariner bell within the City of Qeynos.", 289, 8290005,8290006,8290031,8290027)
  18. AddQuestStepKill(Quest, 2, "I must gather whiskers from large scavengers", 1, 33, "I need to gather the components for Vondorinsarnoo's concoction from the Peat Bog, reachable by mariner bell within the City of Qeynos.", 2123, 8290021)
  19. AddQuestStepKill(Quest, 3, "I must gather bile from bog sludges", 1, 40, "I need to gather the components for Vondorinsarnoo's concoction from the Peat Bog, reachable by mariner bell within the City of Qeynos.", 1162, 8290004)
  20. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  21. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  22. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have what I need from the bog slugs")
  26. DoneWithSteps(Quest, QuestGiver, Player)
  27. end
  28. function Step2Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 2, "I have gathered the whiskers I need.")
  30. DoneWithSteps(Quest, QuestGiver, Player)
  31. end
  32. function Step3Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 3, "I have gathered the bile I needed.")
  34. DoneWithSteps(Quest, QuestGiver, Player)
  35. end
  36. function DoneWithSteps(Quest, QuestGiver, Player)
  37. if QuestIsComplete(Player, SOBERING_REMEDY) then
  38. GiveStep4(Quest, QuestGiver, Player)
  39. end
  40. end
  41. function GiveStep4(Quest, QuestGiver, Player)
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I've successfully gathered what Vondorinsarnoo's concoction calls for.")
  43. UpdateQuestZone(Quest,"Starcrest Commune")
  44. AddQuestStepChat(Quest, 4, "I must return to Vondorinsarnoo", 1, "I need to return to Vondorinsarnoo to give him the items for the concoction.", 11, 2340023)
  45. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  46. end
  47. function QuestComplete(Quest, QuestGiver, Player)
  48. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  49. UpdateQuestStepDescription(Quest, 4, "I've spoken with Vondorinsarnoo.")
  50. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Vondorinsarnoo and given him the components he needed.")
  51. UpdateQuestDescription(Quest, "I retrieved the items Vondorinsarnoo required for the concoction. The mixture will undoubtedly be strong enough to bring an ogre to its knees, and should perform quite well in removing whatever contents that drunk's stomach held, including the ale.")
  52. GiveQuestReward(Quest, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. Step1Complete(Quest, QuestGiver, Player)
  57. elseif Step == 2 then
  58. Step2Complete(Quest, QuestGiver, Player)
  59. elseif Step == 3 then
  60. Step3Complete(Quest, QuestGiver, Player)
  61. elseif Step == 4 then
  62. QuestComplete(Quest, QuestGiver, Player)
  63. end
  64. end
  65. function Accepted(Quest, QuestGiver, Player)
  66. FaceTarget(QuestGiver, Player)
  67. Dialog.New(QuestGiver, Player)
  68. PlayFlavor(QuestGiver, "", "", "nod", 0, 0, Player)
  69. Dialog.AddDialog("I'll write in your journal what I need from the local Peat Bog. I'll create a concoction so foul that he'll expel what resides in his belly. He'll speak more clearly with that rotgut out of his stomach.")
  70. Dialog.AddVoiceover("voiceover/english/vondorinsarnoo/qey_village02/vondorinsarnoo001.mp3", 197082902, 3827601565)
  71. Dialog.AddLanguage(4)
  72. Dialog.AddOption("These items shouldn't be too difficult to find.", "Final")
  73. Dialog.Start()
  74. end
  75. function Declined(Quest, QuestGiver, Player)
  76. -- Add dialog here for when the quest is declined
  77. end
  78. function Deleted(Quest, QuestGiver, Player)
  79. -- Remove any quest specific items here when the quest is deleted
  80. end