9
3

mage_training_part_1.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. --[[
  2. Script Name : Quests/Hallmark/mage_training_part_1.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.11.06 07:11:49
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver:
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I must kill five bog slugs in the Peat Bog.", 5, 100, "The Magister has sent me to the bog to kill five (5) bog things", 91, 8290005)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. UpdateQuestZone(Quest,"Peat Bog")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("I know where you can find creatures pulled from the holes. Lazy summoners beckon forth companions, and when they no longer have use for these friends, they disperse of them in the bog. Your homework is to go to the bog and kill some of these displaced creatures. When you are done, return to me and report your findings.")
  21. Dialog.AddVoiceover("voiceover/english/magister_niksel/qey_south/magister_niksel005.mp3", 3296291813, 1082692317)
  22. PlayFlavor(QuestGiver, "", "", "nod", 0, 0, Player)
  23. Dialog.AddOption("Alright. I'll investigate the creatures in the bog.")
  24. Dialog.Start()
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have killed five bog slugs in the Peat Bog.")
  34. UpdateQuestTaskGroupDescription(Quest, 1, "I've killed the bog things and paid attention to what they looked like.")
  35. UpdateQuestZone(Quest,"South Qeynos")
  36. AddQuestStepChat(Quest, 2, "I need to speak with Magister Niksel in South Qeynos.", 1, "I should let Niksel, in South Qeynos, know that the bog things didn't have much of a shape.", 11, 2310376)
  37. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I spoke with Magister Niksel.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "Niksel has let me know what the bog things really were.")
  42. UpdateQuestZone(Quest,"Multiple Zones")
  43. AddQuestStepChat(Quest, 3, "I need to speak with Yanari in Castleview.", 1, "Niksel has now directed me to other students to hear more about sorcery.", 11, 2360047)
  44. AddQuestStepChat(Quest, 4, "I need to find Zipiff Clamorclang.", 1, "Niksel has now directed me to other students to hear more about sorcery.", 11, 2380010 )
  45. AddQuestStepChat(Quest, 5, "I need to speak with Oolimeminoso in Starcrest.", 1, "Niksel has now directed me to other students to hear more about sorcery.", 11, 2340046)
  46. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  47. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  48. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  49. end
  50. function Step3Complete(Quest, QuestGiver, Player)
  51. UpdateQuestStepDescription(Quest, 3, "I have spoken with Yanari.")
  52. QuestCheck(Quest, QuestGiver, Player)
  53. end
  54. function Step4Complete(Quest, QuestGiver, Player)
  55. UpdateQuestStepDescription(Quest, 4, "I have spoken with Zipiff.")
  56. QuestCheck(Quest, QuestGiver, Player)
  57. end
  58. function Step5Complete(Quest, QuestGiver, Player)
  59. UpdateQuestStepDescription(Quest, 5, "I have spoken with Oolimeminoso")
  60. QuestCheck(Quest, QuestGiver, Player)
  61. end
  62. function QuestCheck(Quest, QuestGiver, Player)
  63. if QuestStepIsComplete(Player,5767,3) and QuestStepIsComplete(Player,5767,4) and QuestStepIsComplete(Player,5767,5) then
  64. UpdateQuestTaskGroupDescription(Quest, 3, "I have learned much from Niksel's former students about sorcery.")
  65. UpdateQuestZone(Quest,"South Qeynos")
  66. AddQuestStepChat(Quest, 6, "I need to tell Magister Niksel what I've learned.", 1, "I should give Niksel, in South Qeynos, a summary of what I learned from his students", 11, 2310376)
  67. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  68. end
  69. end
  70. --I need to speak with Magister Niksel in South Qeynos about advancing as a mage.
  71. --I have contacted Magister Niksel about advancing.
  72. --Niksel has agreed to continue my lessons at a later time
  73. --Niksel has now directed me to other students to hear more about sorcery
  74. --I should let Niksel, in South Qeynos, know that the bog things didn't have much of a shape.
  75. --I spoke with Magister Niksel.
  76. --Niksel has let me know what the bog things really were.
  77. --I need to speak with Magister Niksel outside the mage tower in South Qeynos.
  78. --I should give Niksel, in South Qeynos, a summary of what I learned from his students
  79. function QuestComplete(Quest, QuestGiver, Player)
  80. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  81. UpdateQuestStepDescription(Quest, 6, "Niksel has agreed to continue my lessons at a later time.")
  82. UpdateQuestTaskGroupDescription(Quest, 6, "Niksel has agreed to continue my lessons at a later time.")
  83. UpdateQuestDescription(Quest, "I've learned what a summoner and a sorcerer studies from Niksel's lessons. He has ended my first lesson so that he can write down the magical theory he came up with. He has offered to teach me more again in the future.")
  84. GiveQuestReward(Quest, Player)
  85. end
  86. function Reload(Quest, QuestGiver, Player, Step)
  87. if Step == 1 then
  88. Step1Complete(Quest, QuestGiver, Player)
  89. elseif Step == 2 then
  90. Step2Complete(Quest, QuestGiver, Player)
  91. elseif Step == 3 then
  92. Step3Complete(Quest, QuestGiver, Player)
  93. elseif Step == 4 then
  94. Step4Complete(Quest, QuestGiver, Player)
  95. elseif Step == 5 then
  96. Step5Complete(Quest, QuestGiver, Player)
  97. elseif Step == 6 then
  98. QuestComplete(Quest, QuestGiver, Player)
  99. end
  100. end