DockDelinquency.lua 4.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : DockDelinquency.lua
  3. Script Purpose : Handles the quest, "Dock Delinquency"
  4. Script Author : jakejp
  5. Script Date : 5/31/2018
  6. Script Notes :
  7. Zone : Butcherblock Mountains
  8. Quest Giver : Dockmaster Waulon
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local DockDelinquency = 249
  13. function Accepted(Quest, QuestGiver, Player)
  14. FaceTarget(NPC, Player)
  15. local conversation = CreateConversation()
  16. AddConversationOption(conversation, "I'll begin at once!")
  17. StartConversation(conversation, QuestGiver, Player, "A number of the beasties that roam this 'ere coast have been causing problems 'ere and I don't have the time nor the manpower to resolve this issue by meself. Here, take this list an' see if you can keep the beasties in check.")
  18. end
  19. function Declined(Quest, QuestGiver, Player)
  20. -- Add dialog here for when the quest is declined
  21. end
  22. function Init(Quest)
  23. AddQuestStepKill(Quest, 1, "Rustfiends have been eating the workers' tools! I need to thin their numbers a bit.", 4, 100, "Dockmaster Waulon has asked me to cull some of the local wildlife so they will stop interfering with the day to day business of the docks.", 611, 1080055, 1081092)
  24. AddQuestStepKill(Quest, 2, "Coastal basilisks have been chasing away the local fishermen! I must reduce their numbers.", 6, 100, "Dockmaster Waulon has asked me to cull some of the local wildlife so they will stop interfering with the day to day business of the docks.", 611, 1080054, 1081091)
  25. AddQuestStepKill(Quest, 3, "Aqua goblin runts have attacked many newcomers. They need to be taught a lesson!", 6, 100, "Dockmaster Waulon has asked me to cull some of the local wildlife so they will stop interfering with the day to day business of the docks.", 159, 1080347)
  26. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  27. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  28. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  29. end
  30. function CheckProgressDockDelinquency(Quest, QuestGiver, Player)
  31. if QuestStepIsComplete(Player, DockDelinquency, 1) and QuestStepIsComplete(Player, DockDelinquency, 2) and QuestStepIsComplete(Player, DockDelinquency, 3) then
  32. FinalStepDockDelinquency(Quest, QuestGiver, Player)
  33. end
  34. end
  35. function Step1Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I have reduced the number of rustfiends near the Butcherblock Docks.")
  37. CheckProgressDockDelinquency(Quest, QuestGiver, Player)
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I have reduced the number of coastal basilisks on the beach.")
  41. CheckProgressDockDelinquency(Quest, QuestGiver, Player)
  42. end
  43. function Step3Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I have taught the aqua goblin runts a lesson they will never forget!")
  45. CheckProgressDockDelinquency(Quest, QuestGiver, Player)
  46. end
  47. function FinalStepDockDelinquency(Quest, QuestGiver, Player)
  48. UpdateQuestTaskGroupDescription(Quest, 1, "I successfully culled some of the local wildlife.")
  49. AddQuestStepChat(Quest, 4, "I need to speak with Dockmaster Waulon.", 1, "I need to let Dockmaster Waulon know I was successful at culling the list of creatures that were interferring with the dockworkers.", 11, 1080008)
  50. AddQuestStepCompleteAction(Quest, 4, "QuestCompleteDockDelinquency")
  51. end
  52. function QuestCompleteDockDelinquency(Quest, QuestGiver, Player)
  53. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  54. UpdateQuestStepDescription(Quest, 4, "I spoke with Dockmaster Waulon.")
  55. UpdateQuestTaskGroupDescription(Quest, 2, "I spoke with Dockmaster Waulon.")
  56. UpdateQuestDescription(Quest, "I've 'trimmed' back the local wildlife population as per Dockmaster Waulon's request. Hopefully he won't have as many problems to deal with now. The Dockmaster was most appreciative of my efforts.")
  57. GiveQuestReward(Quest, Player)
  58. end
  59. function Reload(Quest, QuestGiver, Player, Step)
  60. if Step == 1 then
  61. Step1Complete(Quest, QuestGiver, Player)
  62. elseif Step == 2 then
  63. Step2Complete(Quest, QuestGiver, Player)
  64. elseif Step == 3 then
  65. Step3Complete(Quest, QuestGiver, Player)
  66. elseif Step == 4 then
  67. QuestCompleteDockDelinquency(Quest, QuestGiver, Player)
  68. end
  69. end