9
3

qeynos_castaways_isle.lua 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/Antonica/qeynos_castaways_isle.lua
  3. Script Author : Premierio015
  4. Script Date : 2022.05.20 08:05:58
  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, "I need to visit the western of the gnoll islands south of Tyllia's location.", 10, "I need to check the island for supplies.", 11, 161, -25, 882, 12)
  13. AddQuestStepKill(Quest, 2, "I need to kill 12 gnolls on the island south of where Tyllia is.", 12, 100, "I need to check the island for supplies.", 1222, 120340, 120420, 121433, 121481)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. local conversation = CreateConversation()
  20. AddConversationOption(conversation, "I will return.")
  21. StartConversation(conversation, QuestGiver, Player, "Return to me once this is done.")
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. -- Add dialog here for when the quest is declined
  25. end
  26. function Deleted(Quest, QuestGiver, Player)
  27. -- Remove any quest specific items here when the quest is deleted
  28. end
  29. function Step1Complete(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 1, "I have visited the island.")
  31. ProgressCheck(Quest, Player)
  32. end
  33. function ProgressCheck(Quest, Player)
  34. if QuestStepIsComplete(Player, 5560, 1) and QuestStepIsComplete(Player, 5560, 2) then
  35. UpdateQuestTaskGroupDescription(Quest, 1, "I have done what Tyllia asked of me.")
  36. AddQuestStepChat(Quest, 3, "I need to return to Tyllia.", 1, "I need to return to Tyllia now that I've done as she asked.", 11, 121435)
  37. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  38. UpdateQuestTaskGroupDescription(Quest, 1, "I have done as Tyllia asked.")
  39. end
  40. end
  41. function Step2Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 2, "I have killed 12 dankfur gnolls.")
  43. ProgressCheck(Quest, Player)
  44. end
  45. function QuestComplete(Quest, QuestGiver, Player)
  46. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  47. UpdateQuestStepDescription(Quest, 3, "I have spoken with Tyllia.")
  48. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Tyllia.")
  49. UpdateQuestDescription(Quest, "I did as Tyllia asked. There were no supplies on the westernmost gnoll island.")
  50. GiveQuestReward(Quest, Player)
  51. end
  52. function Reload(Quest, QuestGiver, Player, Step)
  53. if Step == 1 then
  54. Step1Complete(Quest, QuestGiver, Player)
  55. elseif Step == 2 then
  56. Step2Complete(Quest, QuestGiver, Player)
  57. elseif Step == 3 then
  58. QuestComplete(Quest, QuestGiver, Player)
  59. end
  60. end