9
3

deer_hunting.lua 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/IsleofRefuge/deer_hunting.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.10 08:09:56
  5. Script Purpose :
  6. Zone : IsleofRefuge
  7. Quest Giver: Vladiminn
  8. Preceded by: Speaking with Vladiminn
  9. Followed by: Scouting the Goblin Camp
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStep(Quest, 1, "I need to kill healthy deer in the grove.", 5, 100, "I need to track down and kill five healthy deer for their meat to restore the outposts food supply. The deer can be found in the island's central grove just northwest of the outpost.", 135)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("Your service is invaluable. Now, listen well hunt only the deer healed by the clergy. We cannot eat diseased meat, lest we become ill ourselves. Use your skills wisely... and uh if I may offer some advice, bring a priest with you on your hunt. A clergyman can heal the deer before you slay it.")
  20. Dialog.AddVoiceover("voiceover/english/vladiminn/tutorial_island02/vladiminn002.mp3", 2857587826, 449408957)
  21. PlayFlavor(QuestGiver, "", "", "thanks", 0, 0, Player)
  22. Dialog.AddOption("Sound advice. I'll bring back a good amount of meat.")
  23. Dialog.Start()
  24. if HasQuest(Player, 5730) then
  25. SetStepComplete(Player,5730,1)
  26. end
  27. end
  28. function Declined(Quest, QuestGiver, Player)
  29. -- Add dialog here for when the quest is declined
  30. end
  31. function Deleted(Quest, QuestGiver, Player)
  32. -- Remove any quest specific items here when the quest is deleted
  33. end
  34. function Step1Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 1, "I have killed healthy deer in the grove.")
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I've gathered enough venison to feed quite a few refugees.")
  37. AddQuestStepChat(Quest, 2, "Return to Vladiminn.", 1, "I need to return to Vladiminn in the outpost and give him the venison I've gathered.", 11, 3250016)
  38. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  39. end
  40. function Step2Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 2, "I've given the meat from the deer to Vladiminn.")
  42. UpdateQuestTaskGroupDescription(Quest, 2, "I've given the meat I gathered to Vladiminn.")
  43. AddQuestStepChat(Quest, 3, "I need to pick up my boots from the bank.", 1, "I need to visit the bank in the village to pick up my boots.", 11, 3250036)
  44. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  45. end
  46. function QuestComplete(Quest, QuestGiver, Player)
  47. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  48. UpdateQuestStepDescription(Quest, 3, "I went to the bank to pick up my boots.")
  49. UpdateQuestTaskGroupDescription(Quest, 3, "I went to the bank in the village to pick up my boots.")
  50. UpdateQuestDescription(Quest, "I've gathered enough meat for quite a few new refugees with the help of the priests curing the strange disease the deer have come down with. Vladiminn rewarded me with some supple boots to help while stalking my prey.")
  51. GiveQuestReward(Quest, Player)
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. Step1Complete(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. Step2Complete(Quest, QuestGiver, Player)
  58. elseif Step == 3 then
  59. QuestComplete(Quest, QuestGiver, Player)
  60. end
  61. end