a_lonely_tree.lua 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/TheElddarGrove/a_lonely_tree.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.10 05:05:53
  5. Script Purpose :
  6. Zone : TheElddarGrove
  7. Quest Giver: Warble Wildmane
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepLocation(Quest, 1, "I need to find the Heartwood Tree of the Elddar Grove. ", 4, "I must find the Heartwood Tree of the Elddar Grove and see if I can uncover anything wrong.", 1802, 669, -10, -380 )
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. -- Add dialog here for when the quest is accepted
  17. end
  18. function Declined(Quest, QuestGiver, Player)
  19. -- Add dialog here for when the quest is declined
  20. end
  21. function Deleted(Quest, QuestGiver, Player)
  22. -- Remove any quest specific items here when the quest is deleted
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I held the woodsong pendant up to the bark of the mighty Arbos. ")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I found Arbos, the Heartwood Tree and now have visions of a young Heartwood tree dying in a misty land of goblins and halflings.")
  27. AddQuestStepLocation(Quest, 2, "I need to find the Elddar tree in a misty thicket.", 4, "I got a vison of a rare Elddar tree, it is dying in a misty thicket. The hills in the vision remind me of the ones I've heard about in the Enchanted Lands. I must find it and help it.", 1802, -592, 8, -737 )
  28. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  29. end
  30. function Step2Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I found Arddin, the Elddar tree of the Enchanted Lands. ")
  32. UpdateQuestTaskGroupDescription(Quest, 2, "I found Arddin, an Elddar tree in the Enchanted Lands, it is sick and being attacked by a corrupted tree folke.")
  33. AddQuestStepKill(Quest, 3, "I must slay the evil nymphs near Arddin, the Elddar tree. ", 15, 100, "I must clear the area of the corrupted tree folke, the various evil nymphs.", 611, 390195)
  34. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  35. end
  36. function Step3Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 3, "I have destroyed many of the twisted tree folke nymphs.")
  38. UpdateQuestTaskGroupDescription(Quest, 3, "I felt I did all I could for young Arddin the Elddar tree of the Enchanted Lands. I should report back to Warble Wildmane.")
  39. AddQuestStepChat(Quest, 4, "I must report to Warble Wildmane in the Elddar Grove.", 1, "I must report the existence of Arddin the Elddar Tree of the Enchanted Lands to Warble Wildmane in the Elddar Grove.", 11, 2070066,390194,390193)
  40. AddQuestStepCompleteAction(Quest, 4, "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, 4, "I have reported the existence of Arddin the Elddar tree in the Enchanted Lands. ")
  45. UpdateQuestTaskGroupDescription(Quest, 4, "I reported the existence of Arddin the Elddar tree of the Enchanted Lands to Warble Wildmane.")
  46. UpdateQuestDescription(Quest, "I discovered a young Elddar tree in the Enchanted Lands named Arddin. I have reported its existence to Warble Wildmane. I am sure he and the Elddar Alliance shall see to the well being of the young tree.")
  47. GiveQuestReward(Quest, Player)
  48. end
  49. function Reload(Quest, QuestGiver, Player, Step)
  50. if Step == 1 then
  51. Step1Complete(Quest, QuestGiver, Player)
  52. elseif Step == 2 then
  53. Step2Complete(Quest, QuestGiver, Player)
  54. elseif Step == 3 then
  55. Step3Complete(Quest, QuestGiver, Player)
  56. elseif Step == 4 then
  57. QuestComplete(Quest, QuestGiver, Player)
  58. end
  59. end