visions_of_coldwind_point.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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 Point\".", 11, -698, -3, 596, 12)
  31. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  32. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  33. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  34. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "Visited the lighthouse.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "Visited the Peeking Tree.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function Step4Complete(Quest, QuestGiver, Player)
  45. UpdateQuestStepDescription(Quest, 4, "Visited the Qeynos Hills Claymore.")
  46. CheckProgress(Quest, QuestGiver, Player)
  47. end
  48. function Step5Complete(Quest, QuestGiver, Player)
  49. UpdateQuestStepDescription(Quest, 5, "Visited the Great Oak.")
  50. CheckProgress(Quest, QuestGiver, Player)
  51. end
  52. function QuestComplete(Quest, QuestGiver, Player)
  53. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  54. UpdateQuestTaskGroupDescription(Quest, 2, "I visited the four location in Antonica mentioned in \"Visions of Coldwind Point\".")
  55. if HasItem(Player, 15265) then
  56. RemoveItem(Player, 15265)
  57. end
  58. UpdateQuestDescription(Quest, "I visited all four locations mentioned in the four poems of Quallium found in \"Visions of Coldwind Point\".")
  59. GiveQuestReward(Quest, Player)
  60. end
  61. function CheckProgress(Quest, QuestGiver, Player)
  62. if QuestStepIsComplete(Player, 5332, 2) and QuestStepIsComplete(Player, 5332, 3) and QuestStepIsComplete(Player, 5332, 4) and QuestStepIsComplete(Player, 5332, 5) then
  63. AddQuestStepCompleteAction(Quest, 5, "Quest5Complete")
  64. end
  65. end
  66. function Reload(Quest, QuestGiver, Player, Step)
  67. if Step == 1 then
  68. Step1Complete(Quest, QuestGiver, Player)
  69. elseif Step == 2 then
  70. Step2Complete(Quest, QuestGiver, Player)
  71. elseif Step == 3 then
  72. Step3Complete(Quest, QuestGiver, Player)
  73. elseif Step == 4 then
  74. Step4Complete(Quest, QuestGiver, Player)
  75. elseif Step == 5 then
  76. QuestComplete(Quest, QuestGiver, Player)
  77. end
  78. end