9
3

visions_of_coldwind_point.lua 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. --[[
  2. Script Name : Quests/Antonica/visions_of_coldwind_point.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.08.04 09:08:55
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver: Visions of Coldwind Point(Item)
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep(Quest, 1, "Read the book.", 1, 100, "I must read \"The Visions of Coldwind Point\" that Quallium gave me.", 11)
  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, "Read the book.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I read \"The Visions of Coldwind Point\".")
  27. AddQuestStepZoneLoc(Quest, 2, "Visit the vigilant giant.", 10, "I must visit the four location in Antonica mentioned in \"Visions of Coldwind Point\".", 11, 347, -9, 812, 12)
  28. AddQuestStepZoneLoc(Quest, 3, "Visit the tree that peeks.", 10, "I must visit the four location in Antonica mentioned in \"Visions of Coldwind Point\".", 11, -25, -5, 671, 12)
  29. AddQuestStepZoneLoc(Quest, 4, "Visit the sword like no other.", 10, "I must visit the four location in Antonica mentioned in \"Visions of Coldwind Point\".", 11, -435, 1, 553, 12)
  30. AddQuestStepZoneLoc(Quest, 5, "Visit the King of the thicket.", 10, "I must visit the four location in Antonica mentioned in \"Visions of Coldwind Poin\".", 11, -698, -3, 596, 12)
  31. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  32. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  33. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  34. end
  35. function Step2Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "Visited the lighthouse.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function Step3Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 3, "Visited the Peeking Tree.")
  41. CheckProgress(Quest, QuestGiver, Player)
  42. end
  43. function Step4Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 4, "Visited the Qeynos Hills Claymore.")
  45. CheckProgress(Quest, QuestGiver, Player)
  46. end
  47. function QuestComplete(Quest, QuestGiver, Player)
  48. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  49. UpdateQuestStepDescription(Quest, 5, "Visited the Great Oak.")
  50. UpdateQuestTaskGroupDescription(Quest, 2, "I visited the four location in Antonica mentioned in \"Visions of Coldwind Point\".")
  51. if HasItem(Player, 15265) then
  52. RemoveItem(Player, 15265)
  53. end
  54. UpdateQuestDescription(Quest, "I visited all four locations mentioned in the four poems of Quallium found in \"Visions of Coldwind Point\".")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function CheckProgress(Quest, QuestGiver, Player)
  58. if QuestStepIsComplete(Player, 5332, 2) and QuestStepIsComplete(Player, 5332, 3) and QuestStepIsComplete(Player, 5332, 4) and QuestStepIsComplete(Player, 5332, 5) then
  59. AddQuestStepCompleteAction(Quest, 5, "Quest5Complete")
  60. end
  61. end
  62. function Reload(Quest, QuestGiver, Player, Step)
  63. if Step == 1 then
  64. Step1Complete(Quest, QuestGiver, Player)
  65. elseif Step == 2 then
  66. Step2Complete(Quest, QuestGiver, Player)
  67. elseif Step == 3 then
  68. Step3Complete(Quest, QuestGiver, Player)
  69. elseif Step == 4 then
  70. Step4Complete(Quest, QuestGiver, Player)
  71. elseif Step == 5 then
  72. QuestComplete(Quest, QuestGiver, Player)
  73. end
  74. end