9
3

CaptainElgrondethsDilemma.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. --[[
  2. Script Name : Quests/Nettleville/CaptainElgrondethsDilemma.lua
  3. Script Purpose : Handles the quest, "Captain Elgrondeth's Dilemma"
  4. Script Author : Jabantiz
  5. Script Date : 6/12/2018
  6. Script Notes :
  7. Zone : Nettleville
  8. Quest Giver : Knight-Captain Elgrondeth (2330030)
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. require "SpawnScripts/Generic/DialogModule"
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I must kill ten sonic shriekers in Antonica.", 10, 100, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 611, 120297, 121406)
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. UpdateQuestZone(Quest,"Antonica")
  17. end
  18. function Accepted(Quest, QuestGiver, Player)
  19. FaceTarget(QuestGiver, Player)
  20. Dialog.New(QuestGiver, Player)
  21. PlayFlavor(QuestGiver, "", "", "nod", 0, 0, Player, 0)
  22. Dialog.AddDialog("Let me write down in your journal a description of the beasts and where you can find them. There. According to the reports, a new type of vermin called sonic shriekers infests Antonica. Return to me after you exterminate some of the pests, and perhaps I'll have another task for you.")
  23. Dialog.AddVoiceover("voiceover/english/knight-captain_elgrondeth/qey_village01/captainelgrondeth003.mp3", 3138428654, 3549139096)
  24. Dialog.AddOption("Alright. I'll return once I've dealt with the shriekers.")
  25. Dialog.Start()
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. end
  31. function Step1Complete(Quest, QuestGiver, Player)
  32. UpdateQuestStepDescription(Quest, 1, "I have killed ten sonic shriekers.")
  33. UpdateQuestZone(Quest,"Nettleville")
  34. AddQuestStepChat(Quest, 2, "I need to speak to Captain Elgrondeth in Nettleville.", 1, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 0, 2330030)
  35. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  36. end
  37. function Step2Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I spoke to Captain Elgrondeth in Nettleville.")
  39. UpdateQuestZone(Quest,"Antonica")
  40. AddQuestStepKill(Quest, 3, "I must kill five young brown bears roaming Antonica.", 5, 100, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 611, 120011, 121191)
  41. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  42. end
  43. function Step3Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 3, "I have killed five young brown bears.")
  45. UpdateQuestZone(Quest,"Nettleville")
  46. AddQuestStepChat(Quest, 4, "I need to speak to Captain Elgrondeth in Nettleville.", 1, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 0, 2330030)
  47. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  48. end
  49. function Step4Complete(Quest, QuestGiver, Player)
  50. UpdateQuestStepDescription(Quest, 4, "I spoke to Captain Elgrondeth in Nettleville.")
  51. UpdateQuestZone(Quest,"Antonica")
  52. AddQuestStepKill(Quest, 5, "I must hunt down and slay ten timber wolves in Antonica.", 5, 100, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 611, 120008, 121188)
  53. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  54. end
  55. function Step5Complete(Quest, QuestGiver, Player)
  56. UpdateQuestStepDescription(Quest, 5, "I have killed ten timber wolves.")
  57. UpdateQuestZone(Quest,"Nettleville")
  58. AddQuestStepChat(Quest, 6, "I need to speak to Captain Elgrondeth in Nettleville.", 1, "I must seek out and slay the sonic shriekers, young brown bears and timber wolves in Antonica as required by Captain Elgrondeth.", 0, 2330030)
  59. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  60. end
  61. function QuestComplete(Quest, QuestGiver, Player)
  62. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  63. UpdateQuestStepDescription(Quest, 6, "I spoke to Captain Elgrondeth in Nettleville.")
  64. UpdateQuestTaskGroupDescription(Quest, 1, "I have sought out and slain the creatures required by the Captain.")
  65. UpdateQuestDescription(Quest, "I have accomplished all the tasks laid out before me by Captain Elgrondeth. He was impressed by my abilities. ")
  66. GiveQuestReward(Quest, Player)
  67. end
  68. function Reload(Quest, QuestGiver, Player, Step)
  69. if step == 1 then
  70. Step1Complete(Quest, QuestGiver, Player)
  71. elseif step == 2 then
  72. Step2Complete(Quest, QuestGiver, Player)
  73. elseif step == 3 then
  74. Step3Complete(Quest, QuestGiver, Player)
  75. elseif step == 4 then
  76. Step4Complete(Quest, QuestGiver, Player)
  77. elseif step == 5 then
  78. Step5Complete(Quest, QuestGiver, Player)
  79. elseif step == 6 then
  80. QuestComplete(Quest, QuestGiver, Player)
  81. end
  82. end