qeynosian_civil_service.lua 3.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. --[[
  2. Script Name : QeynosianCivilService.lua
  3. Script Purpose : Handles the quest, "Qeynosian Civil Service"
  4. Script Author : geordie0511
  5. Script Date : 13.03.2019
  6. Script Notes :
  7. Zone : Antonica
  8. Quest Giver : Knight-Lieutenant Alesso
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. SetQuestFeatherColor(Quest, 3)
  15. SetQuestRepeatable(Quest)
  16. AddQuestStepKill(Quest, 1, "I need to kill ten rats.", 10, 100, "I need to head out into Antonica and kill the vermin that infest the land; rats, snakes and beetles. Knight-Lieutenant Alesso said I should kill about ten of each.", 99, 120066, 121224)
  17. AddQuestStepKill(Quest, 2, "I need to kill ten snakes.", 10, 100, "I need to head out into Antonica and kill the vermin that infest the land; rats, snakes and beetles. Knight-Lieutenant Alesso said I should kill about ten of each.", 1908, 120068, 121226, 121347)
  18. AddQuestStepKill(Quest, 3, "I need to kill ten beetles.", 10, 100, "I need to head out into Antonica and kill the vermin that infest the land; rats, snakes and beetles. Knight-Lieutenant Alesso said I should kill about ten of each.", 162, 120067, 121225, 120253, 120373, 120367, 121443, 120371, 121369)
  19. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  22. end
  23. function Step1Complete(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 1, "I've killed ten rats.")
  25. CheckProgress(Quest, QuestGiver, Player)
  26. end
  27. function Step2Complete(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 2, "I have killed ten snakes.")
  29. CheckProgress(Quest, QuestGiver, Player)
  30. end
  31. function Step3Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 3, "I have killed ten beetles.")
  33. CheckProgress(Quest, QuestGiver, Player)
  34. end
  35. function CheckProgress(Quest, QuestGiver, Player)
  36. if QuestStepIsComplete(Player, 463, 1) and QuestStepIsComplete(Player, 463, 2) and QuestStepIsComplete(Player, 463, 3) then
  37. UpdateQuestTaskGroupDescription(Quest, 1, "I've killed the vermin that Sir Alesso tasked me with.")
  38. AddQuestStepChat(Quest, 4, "I need to speak with Knight-Lieutenant Alesso.", 1, "I've killed a great many vermin that once infested Antonica. I should return to Knight-Lieutenant Alesso.", 11, 120083,121828)
  39. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  40. end
  41. end
  42. function QuestComplete(Quest, QuestGiver, Player)
  43. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  44. UpdateQuestStepDescription(Quest, 4, "I've spoken with Knight-Lieutenant Alesso.")
  45. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Knight-Lieutenant Alesso.")
  46. UpdateQuestDescription(Quest, "I've lowered the vermin population quite a bit out in Antonica. Knight-Lieutenant Alesso was pleased with my efforts and paid me for my service to Qeynos.")
  47. GiveQuestReward(Quest, Player)
  48. end
  49. function Reload(Quest, QuestGiver, Player, Step)
  50. if Step == 1 then
  51. Step1Complete(Quest, QuestGiver, Player)
  52. elseif Step == 2 then
  53. Step2Complete(Quest, QuestGiver, Player)
  54. elseif Step == 3 then
  55. Step3Complete(Quest, QuestGiver, Player)
  56. elseif Step == 4 then
  57. QuestComplete(Quest, QuestGiver, Player)
  58. end
  59. end
  60. function Accepted(Quest, QuestGiver, Player)
  61. FaceTarget(QuestGiver, Player)
  62. Dialog.New(QuestGiver, Player)
  63. Dialog.AddDialog("Rid Antonica of the rats, snakes and beetles that plague Qeynos. Dispatch of no less than ten of each and we shall reward your service.")
  64. Dialog.AddVoiceover("voiceover/english/sir_alesso/qey_north/sir_alesso002.mp3", 2041064542, 2502837283)
  65. Dialog.AddOption("I'll do it for Qeynos.")
  66. Dialog.Start()
  67. end
  68. function Declined(Quest, QuestGiver, Player)
  69. -- Add dialog here for when the quest is declined
  70. end