9
3

ReclaimingTheBog.lua 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : ReclaimingtheBog.lua
  3. Script Purpose : Handles the quest, "Reclaiming the Bog"
  4. Script Author : Shatou
  5. Script Date : 1/8/2020
  6. Script Notes :
  7. Zone : Peat Bog
  8. Quest Giver : Lieutenant Dawson
  9. Preceded by : None
  10. Followed by : Mysterious Machine
  11. --]]
  12. local LIEUTENANT_DAWSON_ID = 1980012
  13. local A_SPOREAL_SEEDLING_ID = 1980011
  14. local A_SPOREAL_HERBALIST_ID = 1980027
  15. local A_SPOREAL_GUARD_ID = 1980031
  16. local A_SPOREAL_KNIGHT_ID = 1980033
  17. local A_RAVENOUS_BOG_SLUG_ID = 1980051
  18. function Init(Quest)
  19. AddQuestStepKill(Quest, 1, "I need to kill six fungus men.", 6, 100, "Lieutenant Dawson has asked that I kill some ravenous bog slugs and fungus men for her.", 611, A_SPOREAL_SEEDLING_ID, A_SPOREAL_HERBALIST_ID, A_SPOREAL_GUARD_ID, A_SPOREAL_KNIGHT_ID)
  20. AddQuestStepKill(Quest, 2, "I need to kill four ravenous bog slugs.", 4, 100, "Lieutenant Dawson has asked that I kill some ravenous bog slugs and fungus men for her.", 611, A_RAVENOUS_BOG_SLUG_ID)
  21. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  22. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  23. end
  24. function CheckProgress(Quest, QuestGiver, Player)
  25. if QuestStepIsComplete(Player, 507, 1) and QuestStepIsComplete(Player, 507, 2) then
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the ravenous bog slugs and the fungus men.")
  27. AddQuestStepChat(Quest, 3, "I need to return to Lieutenant Dawson near the gates to Nettleville.", 1, "I need to return to Lieutenant Dawson now that I have completed her task.", 11, LIEUTENANT_DAWSON_ID)
  28. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  29. end
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have slain six fungus men.")
  33. CheckProgress(Quest, QuestGiver, Player)
  34. end
  35. function Step2Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 2, "I have killed four ravenous bog slugs.")
  37. CheckProgress(Quest, QuestGiver, Player)
  38. end
  39. function QuestComplete(Quest, QuestGiver, Player)
  40. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  41. UpdateQuestStepDescription(Quest, 3, "I have spoken with Lieutenant Dawson.")
  42. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Lieutenant Dawson.")
  43. UpdateQuestDescription(Quest, "I have completed the small task for Lieutenant Dawson.")
  44. GiveQuestReward(Quest, Player)
  45. end
  46. function Reload(Quest, QuestGiver, Player, Step)
  47. if Step == 1 then
  48. Step1Complete(Quest, QuestGiver, Player)
  49. elseif Step == 2 then
  50. Step2Complete(Quest, QuestGiver, Player)
  51. elseif Step == 3 then
  52. QuestComplete(Quest, QuestGiver, Player)
  53. end
  54. end
  55. function Accepted(Quest, QuestGiver, Player)
  56. -- Add dialog here for when the quest is accepted
  57. end
  58. function Declined(Quest, QuestGiver, Player)
  59. -- Add dialog here for when the quest is declined
  60. end