9
3

unnatural_causes.lua 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : unnatural_causes.lua
  3. Script Purpose : Handles the quest, "Unnatural Causes"
  4. Script Author : Dorbin
  5. Script Date : 2/27/2022
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Forest Ruins
  8. Quest Giver : Ilaen Lilac
  9. Preceded by : A Tribute for Ulinir
  10. Followed by : News for Germain
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepObtainItem(Quest, 1, "I need to inspect the bodies of slain deer until I find a clue telling me what killed them.", 1, 100, "Ilaen Lilac has asked me to inspect the dead deer around here to figure out what has been killing them.", 11, 1466)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Good. Go find the deer bodies that litter these lands. Ignore the bodies killed by predators, seek out only the intact bodies. Search them for clues: weapons, specific types of scars, anything that will help determine who is beind their death.")
  21. Dialog.AddVoiceover("voiceover/english/tutorial_revamp/ilaen_lilac/qey_adv02_ruins/quests/ilaen/ilaen004.mp3", 790266231, 2714051282)
  22. Dialog.AddOption("I will return.", "Dialog8")
  23. Dialog.Start()
  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. -- Remove any quest specific items here when the quest is deleted
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have found a crude arrow in the body of a fallen deer.")
  33. GiveQuestItem(Quest, Player, "You found a crude arrow impailed in the deer.", 1466)
  34. AddQuestStepChat(Quest, 2, "I need to take this arrow to Ilaen Lilac.", 1, "Ilaen Lilac has asked me to inspect the dead deer around here to figure out what has been killing them.", 363, 1960059)
  35. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I have shown Ilaen Lilac the crude arrow.")
  39. AddQuestStepChat(Quest, 3, "I need to speak with Lieutenant Germain and tell him what I found.", 1, "Ilaen Lilac has asked me to inspect the dead deer around here to figure out what has been killing them.", 363, 1960005)
  40. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  41. end
  42. function QuestComplete(Quest, QuestGiver, Player)
  43. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  44. UpdateQuestStepDescription(Quest, 3, "I have spoken with Lieutenant Germain.")
  45. UpdateQuestTaskGroupDescription(Quest, 1, "I discovered gnoll teeth in one of the dead animals. I have given this information to Lieutenant Germain.")
  46. if HasItem(Player, 1466) then
  47. RemoveItem(Player,1466)
  48. end
  49. UpdateQuestDescription(Quest, "I found gnoll teeth in the bodies of one of the dead animals. I gave this information to Lieutenant Germain at Ilaen's request.")
  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