of_spars_and_sails_and_.lua 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : Quests/QeynosHarbor/of_spars_and_sails_and_.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.14 06:06:21
  5. Script Purpose :
  6. Zone : QeynosHarbor
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStep(Quest, 1, "Find a ship's spar.", 1, 100, "I need to recover the stolen items.", 875)
  13. AddQuestStep(Quest, 2, "Find a ship's sail.", 1, 100, "I need to recover the stolen items.", 780)
  14. AddQuestStep(Quest, 3, "Find a ship's map.", 1, 100, "I need to recover the stolen items.", 2184)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is accepted
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I found a spar.")
  30. CheckProgress(Quest, QuestGiver, Player)
  31. end
  32. function Step2Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 2, "I've found a sail.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step3Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 3, "I've found a map.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function CheckProgress(Quest, QuestGiver, Player)
  41. if QuestStepIsComplete(Player, 5387, 1) and QuestStepIsComplete(Player, 5387, 2) and QuestStepIsComplete(Player, 5387, 3) then
  42. UpdateQuestTaskGroupDescription(Quest, 1, "I've recovered several stolen items.")
  43. AddQuestStepChat(Quest, 4, "I need to speak with Dajor Botswein in Qeynos Harbor.", 1, "There are still some loose ends to tie up in this mystery.", 11,2210115)
  44. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  45. end
  46. end
  47. function Step4Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 4, "I've spoken with Dajor.")
  49. AddQuestStepKill(Quest, 5, "Dajor believes the pirates have the ship's lamp somewhere in the Thundering Steppes.", 1, 25, "There are still some loose ends to tie up in this mystery.", 565,2490273,2490089)
  50. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  51. end
  52. function Step5Complete(Quest, QuestGiver, Player)
  53. UpdateQuestStepDescription(Quest, 5, "I've found the missing lamp.")
  54. UpdateQuestTaskGroupDescription(Quest, 2, "Some pirates hid the lamp, but I found it and got rid of them as well.")
  55. AddQuestStepChat(Quest, 6, "I need to speak with Dajor Botswein in Qeynos Harbor.", 1, "Now to return to Dajor Botswein in Qeynos Harbor and claim my reward!", 11, 2210115)
  56. AddQuestStepCompleteAction(Quest, 6, "Step6Complete")
  57. end
  58. function Step6Complete(Quest, QuestGiver, Player)
  59. UpdateQuestStepDescription(Quest, 6, "I've spoken with Dajor.")
  60. AddQuestStepChat(Quest, 7, "I need to collect my reward from a barmaid named Drinna near the tavern in Qeynos Harbor.", 1, "Now to return to Dajor Botswein in Qeynos Harbor and claim my reward!", 11, 2210025)
  61. AddQuestStepCompleteAction(Quest, 7, "QuestComplete")
  62. end
  63. function QuestComplete(Quest, QuestGiver, Player)
  64. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  65. UpdateQuestStepDescription(Quest, 7, "I've collected my reward.")
  66. UpdateQuestTaskGroupDescription(Quest, 3, "I've collected the reward.")
  67. UpdateQuestDescription(Quest, "I located a few of the items but I don't seem any closer to finding out who the pirates are and why they are stealing such peculiar items. I need to talk to someone else in Qeynos Harbor and see if I can learn more about these mysterious happenings, starting with that barmaid that gave me my reward.")
  68. GiveQuestReward(Quest, Player)
  69. end
  70. function Reload(Quest, QuestGiver, Player, Step)
  71. if Step == 1 then
  72. Step1Complete(Quest, QuestGiver, Player)
  73. elseif Step == 2 then
  74. Step2Complete(Quest, QuestGiver, Player)
  75. elseif Step == 3 then
  76. Step3Complete(Quest, QuestGiver, Player)
  77. elseif Step == 4 then
  78. Step4Complete(Quest, QuestGiver, Player)
  79. elseif Step == 5 then
  80. Step5Complete(Quest, QuestGiver, Player)
  81. elseif Step == 6 then
  82. Step6Complete(Quest, QuestGiver, Player)
  83. elseif Step == 7 then
  84. QuestComplete(Quest, QuestGiver, Player)
  85. end
  86. end