unnatural_causes.lua 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. function Init(Quest)
  13. 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)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. -- Add dialog here for when the quest is accepted
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Deleted(Quest, QuestGiver, Player)
  23. -- Remove any quest specific items here when the quest is deleted
  24. end
  25. function Step1Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have found a crude arrow in the body of a fallen deer.")
  27. GiveQuestItem(Quest, Player, "You found a crude arrow impailed in the deer.", 1466)
  28. while HasItem(Player, 1466) do
  29. RemoveItem(Player,1466)
  30. end
  31. 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)
  32. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  33. end
  34. function Step2Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have shown Ilaen Lilac the crude arrow.")
  36. 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)
  37. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  38. end
  39. function QuestComplete(Quest, QuestGiver, Player)
  40. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  41. UpdateQuestStepDescription(Quest, 3, "I have spoken with Lieutenant Germain.")
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I discovered gnoll teeth in one of the dead animals. I have given this information to Lieutenant Germain.")
  43. 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.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. Step1Complete(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. Step2Complete(Quest, QuestGiver, Player)
  51. elseif Step == 3 then
  52. QuestComplete(Quest, QuestGiver, Player)
  53. end
  54. end