9
3

AStrangeMix.lua 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. --[[
  2. Script Name : AStrangeMix.lua
  3. Script Purpose : Handles the quest, "A Strange Mix"
  4. Script Author : jakejp
  5. Script Date : 6/14/2018
  6. Script Notes :
  7. Zone : Butcherblock Mountains
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local EmptyVial = 46457
  13. local FilledVial = 7641
  14. local AStrangeMix = 314
  15. function Init(Quest)
  16. AddQuestStep(Quest, 1, "I have not yet filled Geldrani's Vial.", 1, 100, "I must fill Geldrani's Vial with water from the pond in the center of the Druid Rings.", 176)
  17. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  18. end
  19. function Step1Complete(Quest, QuestGiver, Player)
  20. UpdateQuestStepDescription(Quest, 1, "Geldrani's Vial is now filled with water from the Druid Ring.")
  21. UpdateQuestTaskGroupDescription(Quest, 1, "I have filled Geldrani's Vial with the water he requested.")
  22. AddQuestStepChat(Quest, 2, "Geldrani should still be near the Highland Outposts. ", 1, "Geldrani will want this water as fresh as possible. I should return it to him immediately.", 176, 1081108)
  23. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  24. end
  25. function QuestComplete(Quest, QuestGiver, Player)
  26. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  27. UpdateQuestStepDescription(Quest, 2, "This water appears to be the last thing Geldrani needed.")
  28. UpdateQuestTaskGroupDescription(Quest, 2, "Geldrani used the vial to water his strange plant.")
  29. UpdateQuestDescription(Quest, "Geldrani now has the water from the druid rings, and evidently he is going to use it to help grow his plant. There's something odd about his experiment, but he is quite evasive about it.")
  30. GiveQuestReward(Quest, Player)
  31. end
  32. function Reload(Quest, QuestGiver, Player, Step)
  33. if Step == 1 then
  34. Step1Complete(Quest, QuestGiver, Player)
  35. elseif Step == 2 then
  36. QuestComplete(Quest, QuestGiver, Player)
  37. end
  38. end
  39. function Accepted(Quest, QuestGiver, Player)
  40. FaceTarget(QuestGiver, Player)
  41. conversation = CreateConversation()
  42. SummonItem(Player, EmptyVial, 1)
  43. PlayFlavor(QuestGiver, "voiceover/english/voice_emotes/greetings/greetings_2_1048.mp3", "", "", 0, 0, Player)
  44. AddConversationOption(conversation, "All right, then. I will return with the water soon.")
  45. StartConversation(conversation, QuestGiver, Player, "Indeed. It shouldn't take much more than what would be in that vial, as the water near the rings is quite rich in magical properties.")
  46. end
  47. function Declined(Quest, QuestGiver, Player)
  48. -- Add dialog here for when the quest is declined
  49. end
  50. function Deleted(Quest, QuestGiver, Player)
  51. if HasItem(Player, EmptyVial) then
  52. RemoveItem(Player, EmptyVial)
  53. end
  54. if HasItem(Player, FilledVial) then
  55. RemoveItem(Player, FilledVial)
  56. end
  57. end