antivenom_components_for_brendan.lua 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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, 25, "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,8260002, 8260019 ,8260023)
  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,8260003,8260024,8260030,8260074,8260082)
  14. UpdateQuestZone(Quest,"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. UpdateQuestZone(Quest,"North Qeynos")
  43. 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.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function CheckProgress(Quest, QuestGiver, Player)
  47. if QuestStepIsComplete(Player, 5362, 1) and QuestStepIsComplete(Player, 5362, 2) then
  48. UpdateQuestTaskGroupDescription(Quest, 1, "The components for Medic Brendan's anti-venom potions have been gathered.")
  49. 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)
  50. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  51. UpdateQuestZone(Quest,"North Qeynos")
  52. end
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. Step1Complete(Quest, QuestGiver, Player)
  57. elseif Step == 2 then
  58. Step2Complete(Quest, QuestGiver, Player)
  59. elseif Step == 3 then
  60. QuestComplete(Quest, QuestGiver, Player)
  61. end
  62. end