9
3

SoberingRemedy.lua 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. -- Quest ID's
  13. local SOBERING_REMEDY = 246
  14. function Init(Quest)
  15. AddQuestStepKill(Quest, 1, "I must gather pieces from bog slugs", 1, 100, "I need to gather the components for Vondorinsarnoo's concoction from the Peat Bog, reachable by mariner bell within the City of Qeynos.", 289, 1980018)
  16. AddQuestStepKill(Quest, 2, "I must gather whiskers from large scavengers", 1, 100, "I need to gather the components for Vondorinsarnoo's concoction from the Peat Bog, reachable by mariner bell within the City of Qeynos.", 2123, 1980017)
  17. AddQuestStepKill(Quest, 3, "I must gather bile from bog sludges", 1, 100, "I need to gather the components for Vondorinsarnoo's concoction from the Peat Bog, reachable by mariner bell within the City of Qeynos.", 1162, 1980002)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  20. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  21. end
  22. function Step1Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 1, "I have what I need from the bog slugs")
  24. DoneWithSteps(Quest, QuestGiver, Player)
  25. end
  26. function Step2Complete(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 2, "I have gathered the whiskers I need.")
  28. DoneWithSteps(Quest, QuestGiver, Player)
  29. end
  30. function Step3Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 3, "I have gathered the bile I needed.")
  32. DoneWithSteps(Quest, QuestGiver, Player)
  33. end
  34. function DoneWithSteps(Quest, QuestGiver, Player)
  35. if QuestIsComplete(Player, SOBERING_REMEDY) then
  36. GiveStep4(Quest, QuestGiver, Player)
  37. end
  38. end
  39. function GiveStep4(Quest, QuestGiver, Player)
  40. UpdateQuestTaskGroupDescription(Quest, 1, "I've successfully gathered what Vondorinsarnoo's concoction calls for.")
  41. 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)
  42. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  43. end
  44. function QuestComplete(Quest, QuestGiver, Player)
  45. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  46. UpdateQuestStepDescription(Quest, 4, "I've spoken with Vondorinsarnoo.")
  47. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Vondorinsarnoo and given him the components he needed.")
  48. 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.")
  49. GiveQuestReward(Quest, Player)
  50. end
  51. function Reload(Quest, QuestGiver, Player, Step)
  52. if Step == 1 then
  53. Step1Complete(Quest, QuestGiver, Player)
  54. elseif Step == 2 then
  55. Step2Complete(Quest, QuestGiver, Player)
  56. elseif Step == 3 then
  57. Step3Complete(Quest, QuestGiver, Player)
  58. elseif Step == 4 then
  59. QuestComplete(Quest, QuestGiver, Player)
  60. end
  61. end
  62. function Accepted(Quest, QuestGiver, Player)
  63. FaceTarget(QuestGiver, Player)
  64. local conversation = CreateConversation()
  65. AddConversationOption(conversation, "These items shouldn't be too difficult to find.", "dlg_59_3")
  66. StartConversation(conversation, QuestGiver, Player, "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.")
  67. end
  68. function Declined(Quest, QuestGiver, Player)
  69. -- Add dialog here for when the quest is declined
  70. end
  71. function Deleted(Quest, QuestGiver, Player)
  72. -- Remove any quest specific items here when the quest is deleted
  73. end