qeynosian_civil_service.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. function Init(Quest)
  13. SetQuestFeatherColor(Quest, 3)
  14. SetQuestRepeatable(Quest)
  15. 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)
  16. 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)
  17. 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)
  18. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  19. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  20. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  21. end
  22. function Step1Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 1, "I've killed ten rats.")
  24. CheckProgress(Quest, QuestGiver, Player)
  25. end
  26. function Step2Complete(Quest, QuestGiver, Player)
  27. UpdateQuestStepDescription(Quest, 2, "I have killed ten snakes.")
  28. CheckProgress(Quest, QuestGiver, Player)
  29. end
  30. function Step3Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 3, "I have killed ten beetles.")
  32. CheckProgress(Quest, QuestGiver, Player)
  33. end
  34. function CheckProgress(Quest, QuestGiver, Player)
  35. if QuestStepIsComplete(Player, 463, 1) and QuestStepIsComplete(Player, 463, 2) and QuestStepIsComplete(Player, 463, 3) then
  36. UpdateQuestTaskGroupDescription(Quest, 1, "I've killed the vermin that Sir Alesso tasked me with.")
  37. 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)
  38. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  39. end
  40. end
  41. function QuestComplete(Quest, QuestGiver, Player)
  42. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  43. UpdateQuestStepDescription(Quest, 4, "I've spoken with Knight-Lieutenant Alesso.")
  44. UpdateQuestTaskGroupDescription(Quest, 2, "I've spoken with Knight-Lieutenant Alesso.")
  45. 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.")
  46. GiveQuestReward(Quest, Player)
  47. end
  48. function Reload(Quest, QuestGiver, Player, Step)
  49. if Step == 1 then
  50. Step1Complete(Quest, QuestGiver, Player)
  51. elseif Step == 2 then
  52. Step2Complete(Quest, QuestGiver, Player)
  53. elseif Step == 3 then
  54. Step3Complete(Quest, QuestGiver, Player)
  55. elseif Step == 4 then
  56. QuestComplete(Quest, QuestGiver, Player)
  57. end
  58. end
  59. function Accepted(Quest, QuestGiver, Player)
  60. FaceTarget(QuestGiver, Player)
  61. conversation = CreateConversation()
  62. PlayFlavor(QuestGiver, "voiceover/english/sir_alesso/qey_north/sir_alesso002.mp3", "", "", 2041064542, 2502837283, Player)
  63. AddConversationOption(conversation, "I'll do it for Qeynos.")
  64. StartConversation(conversation, QuestGiver, Player, "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.")
  65. end
  66. function Declined(Quest, QuestGiver, Player)
  67. -- Add dialog here for when the quest is declined
  68. end