9
3

gnoll_shipping_lanes.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/Antonica/gnoll_shipping_lanes.lua
  3. Script Author : Premierio015
  4. Script Date : 2022.05.21 09:05:26
  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 find the dock on one of the gnoll islands south of where Tyllia is.", 10, "I need to go find the shipping manifest for Tyllia.", 11, -49, -37, 1056, 12 )
  13. AddQuestStepObtainItem(Quest, 2, "I need to acquire the shipping information from the gnoll dock guard.", 1, 100, "I need to go find the shipping manifest for Tyllia.", 374, 7800)
  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, "Thank you.")
  21. StartConversation(conversation, QuestGiver, Player, "Remember, you don't need to fight the entire island, The manifest should be on or near or on the docks. Good luck, " .. GetName(Spawn) .. "")
  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 found the dock.")
  31. ProgressCheck(Quest, Player)
  32. end
  33. function Step2Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I have acquired the shipping information.")
  35. ProgressCheck(Quest, Player)
  36. end
  37. function ProgressCheck(Quest, Player)
  38. if QuestStepIsComplete(Player, 5561, 1) and QuestStepIsComplete(Player, 5561, 2) then
  39. AddQuestStepChat(Quest, 3, "I need to return to Tyllia.", 1, "I need to go find the shipping manifest for Tyllia.", 11, 121435)
  40. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  41. end
  42. end
  43. function QuestComplete(Quest, QuestGiver, Player)
  44. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  45. UpdateQuestStepDescription(Quest, 3, "I have spoken with Tyllia.")
  46. UpdateQuestTaskGroupDescription(Quest, 1, "I have brought Tyllia the shipping manifest.")
  47. if HasItem(Player, 7800) then -- Gnoll Shipping Manifest Item
  48. RemoveItem(Player, 7800)
  49. end
  50. UpdateQuestDescription(Quest, "I brought Tyllia the manifest she asked for.")
  51. GiveQuestReward(Quest, Player)
  52. end
  53. function Reload(Quest, QuestGiver, Player, Step)
  54. if Step == 1 then
  55. Step1Complete(Quest, QuestGiver, Player)
  56. elseif Step == 2 then
  57. Step2Complete(Quest, QuestGiver, Player)
  58. elseif Step == 3 then
  59. QuestComplete(Quest, QuestGiver, Player)
  60. end
  61. end