9
3

peppermints_and_potions.lua 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. --[[
  2. Script Name : Quests/Antonica/peppermints_and_potions.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.09.15 08:09:44
  5. Script Purpose :
  6. Zone : Antonica
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepZoneLoc(Quest, 1, "She might be at the lighthouse.", 10, "Landwyn has asked me to deliver a package, but he doesnt know where.", 10, 339, -17, 762, 12)
  13. AddQuestStepZoneLoc(Quest, 2, "She might be in Archer Woods.", 10, "Landwyn has asked me to deliver a package, but he doesnt know where.", 10, -778, -2, 548, 12 )
  14. AddQuestStepZoneLoc(Quest, 3, "She could be at The Tower of the Oracles.", 10, "Landwyn has asked me to deliver a package, but he doesnt know where.", 10, -1030, 14, -618, 12)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. FaceTarget(QuestGiver, Player)
  21. local conversation = CreateConversation()
  22. AddConversationOption(conversation, "I'll be back.")
  23. StartConversation(conversation, QuestGiver, Player, "Well, you see, that is the problem, isn't it? I can't find her. Long did I search, but she is nowhere to be found. Sadly, I only had enough time to check a few of her favorite places. Please check the rest and deliver her this gift.")
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. -- Add dialog here for when the quest is declined
  27. end
  28. function Deleted(Quest, QuestGiver, Player)
  29. -- Remove any quest specific items here when the quest is deleted
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "She was not at the lighthouse.")
  33. CheckProgress(Quest, QuestGiver, Player)
  34. end
  35. function Step2Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "She was not in Archer Woods.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function CheckProgress(Quest, QuestGiver, Player)
  40. if QuestStepIsComplete(Player, 5359, 1) and QuestStepIsComplete(Player, 5359, 2) and QuestStepIsComplete(Player, 5359, 3) then
  41. UpdateQuestTaskGroupDescription(Quest, 1, "I have looked everywhere.")
  42. AddQuestStepChat(Quest, 4, "I should tell Landwyn that I could not find his lady love.", 1, "I have searched high and low, and have not found Landwyn's love. I should let him know.", 10, 121388)
  43. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  44. end
  45. end
  46. function Step3Complete(Quest, QuestGiver, Player)
  47. UpdateQuestStepDescription(Quest, 3, "She was not at The Tower of the Oracles.")
  48. CheckProgress(Quest, QuestGiver, Player)
  49. end
  50. function QuestComplete(Quest, QuestGiver, Player)
  51. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  52. UpdateQuestStepDescription(Quest, 4, "I have spoken to Landwyn.")
  53. UpdateQuestTaskGroupDescription(Quest, 2, "I told Landwyn that I could not find her.")
  54. UpdateQuestDescription(Quest, "Unfortunately, I was unable to find his love to deliver the package to.")
  55. GiveQuestReward(Quest, Player)
  56. end
  57. function Reload(Quest, QuestGiver, Player, Step)
  58. if Step == 1 then
  59. Step1Complete(Quest, QuestGiver, Player)
  60. elseif Step == 2 then
  61. Step2Complete(Quest, QuestGiver, Player)
  62. elseif Step == 3 then
  63. Step3Complete(Quest, QuestGiver, Player)
  64. elseif Step == 4 then
  65. QuestComplete(Quest, QuestGiver, Player)
  66. end
  67. end