vermins_plague.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. --[[
  2. Script Name : Quests/NorthQeynos/vermins_plague.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.11 08:05:04
  5. Script Purpose :
  6. Zone : NorthQeynos
  7. Quest Giver: Elsabethia Hartsunde
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "I must collect an infected grave scorpius", 1, 100, "I must collect samples of the infected.", 1859, 2000024)
  13. AddQuestStepKill(Quest, 2, "I must collect an infected burrower", 1, 100, "I must collect samples of the infected.", 99, 2000026)
  14. AddQuestStepKill(Quest, 3, "I must collect an infected tomb vermin", 1, 100, "I must collect samples of the infected.", 124, 2000029)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  17. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  18. end
  19. function Accepted(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is accepted
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. -- Add dialog here for when the quest is declined
  24. end
  25. function Deleted(Quest, QuestGiver, Player)
  26. -- Remove any quest specific items here when the quest is deleted
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have collected an infected grave scorpius.")
  30. CheckProgress(Quest, QuestGiver, Player)
  31. end
  32. function Step2Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 2, "I have collected an infected burrower.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step3Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 3, "I have collected an infected tomb vermin.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function CheckProgress(Quest, QuestGiver, Player)
  41. if QuestStepIsComplete(Player, 5545, 1) and QuestStepIsComplete(Player, 5545, 2) and QuestStepIsComplete(Player, 5545, 3) then
  42. AddQuestStepChat(Quest, 4, "I must return to Elsabethia", 1, "I must return to Elsabethia Hartsunder.", 11, 2220141)
  43. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  44. end
  45. end
  46. function QuestComplete(Quest, QuestGiver, Player)
  47. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  48. UpdateQuestStepDescription(Quest, 4, "I have returned to Elsabethia.")
  49. UpdateQuestTaskGroupDescription(Quest, 2, "I have returned to Elsabethia.")
  50. UpdateQuestDescription(Quest, "I volunteered to assist Elsabethia Hartsunder in the Temple of Life with her research. I was able to gather the infected specimens and return them to her.")
  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. Step3Complete(Quest, QuestGiver, Player)
  60. elseif Step == 4 then
  61. QuestComplete(Quest, QuestGiver, Player)
  62. end
  63. end