antivenom_components_for_brendan.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. --[[
  2. Script Name : Quests/NorthQeynos/antivenom_components_for_brendan.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.09.25 06:09:15
  5. Script Purpose :
  6. Zone : NorthQeynos
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "Gather a cave serpent venom sac.", 1, 30, "I need to gather poison sacs from the snakes and spiders that live in the Caves. I can reach the Caves via mariner bell within the City of Qeynos.", 1161, 1970008)
  13. AddQuestStepKill(Quest, 2, "Gather white spider venom sacs.", 4, 30, "I need to gather poison sacs from the snakes and spiders that live in the Caves. I can reach the Caves via mariner bell within the City of Qeynos.", 413, 1970012)
  14. UpdateQuestZone(Quest,"The Caves")
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. FaceTarget(QuestGiver, Player)
  20. local conversation = CreateConversation()
  21. AddConversationOption(conversation, "I will be.")
  22. StartConversation(conversation, QuestGiver, Player, "Be safe, please!")
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. -- Add dialog here for when the quest is declined
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. -- Remove any quest specific items here when the quest is deleted
  29. end
  30. function Step1Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have gathered the poison sac I need.")
  32. CheckProgress(Quest, QuestGiver, Player)
  33. end
  34. function Step2Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 2, "I have gathered a venom sac from a white spider.")
  36. CheckProgress(Quest, QuestGiver, Player)
  37. end
  38. function QuestComplete(Quest, QuestGiver, Player)
  39. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  40. UpdateQuestStepDescription(Quest, 3, "I've returned to Medic Brendan and spoken with him.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "Medic Brendan's reagents have been delivered.")
  42. UpdateQuestDescription(Quest, "I was able to return safely with all of the required components for the antidote Brendan wished. With any luck those reagents will save a guard's life someday.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function CheckProgress(Quest, QuestGiver, Player)
  46. if QuestStepIsComplete(Player, 5362, 1) and QuestStepIsComplete(Player, 5362, 2) then
  47. UpdateQuestTaskGroupDescription(Quest, 1, "The components for Medic Brendan's anti-venom potions have been gathered.")
  48. AddQuestStepChat(Quest, 3, "I must return to Medic Brendan in North Qeynos.", 1, "I still need to return to Medic Brendan in North Qeynos with the poison sacs.", 11, 2220143)
  49. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  50. UpdateQuestZone(Quest,"North Qeynos")
  51. end
  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