9
3

erudite_alchemy.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --[[
  2. Script Name : Quests/Stonestair/erudite_alchemy.lua
  3. Script Purpose : Handles the quest, "Erudite Alchemy"
  4. Script Author : QuestParser (Replace this)
  5. Script Date : 6/22/2018
  6. Script Notes :
  7. Zone : Stonestair Byway
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : tweezing_kerra.lua
  11. --]]
  12. -- Item ID's
  13. local HERBS = 8376
  14. function Init(Quest)
  15. AddQuestStepHarvest(Quest, 1, "Gather some of the herbs from around the Stonestair Byway.", 5, 100, "Find the herbs growing in the Byway for Vess.", 2312, HERBS)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. FaceTarget(QuestGiver, Player)
  20. conversation = CreateConversation()
  21. PlayFlavor(QuestGiver, "voiceover/english/tutorial_revamp/vesh_al_ishni/fprt_hood02/vesh_alishni013.mp3", "", "", 2691616073, 3518000896, Player)
  22. AddConversationOption(conversation, "Very well, it shall be done.")
  23. StartConversation(conversation, QuestGiver, Player, "I could use some assistance with gathering a few seeds from the herbs growing here in the Byway. Once you gather them, take them over to the scribe's shop, and grind them up there.")
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. -- Add dialog here for when the quest is declined
  27. end
  28. function Deleted(Quest, QuestGiver, Player)
  29. RemoveHerbs(Player)
  30. end
  31. function RemoveHerbs(Player)
  32. while HasItem(Player, HERBS, 1) do
  33. RemoveItem(Player, HERBS)
  34. end
  35. end
  36. function Step1Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 1, "I've gathered enough herbs for Vess' mixture.")
  38. AddQuestStep(Quest, 2, "Crush the herbs in the pestle.", 1, 100, "Find the herbs growing in the Byway for Vess.", 0)
  39. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  40. end
  41. function Step2Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 2, "The herbs have been crushed in the pestle.")
  43. RemoveHerbs(Player)
  44. AddQuestStepChat(Quest, 3, "I must bring the crushed herbs back to Vess.", 1, "Find the herbs growing in the Byway for Vess.", 0, 1350010)
  45. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  46. end
  47. function QuestComplete(Quest, QuestGiver, Player)
  48. UpdateQuestTaskGroupDescription(Quest, 1, "The herbs have been crushed in the pestle.")
  49. UpdateQuestDescription(Quest, "I've completed the mixture for Vess, but at this point, am unsure as to its use.")
  50. GiveQuestReward(Quest, Player)
  51. end
  52. function Reload(Quest, QuestGiver, Player, Step)
  53. if Step == 1 then
  54. Step1Complete(Quest, QuestGiver, Player)
  55. elseif Step == 2 then
  56. Step2Complete(Quest, QuestGiver, Player)
  57. elseif Step == 3 then
  58. QuestComplete(Quest, QuestGiver, Player)
  59. end
  60. end