mage_training_part_1.lua 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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. if GetQuestStep(Player,5877)==1 then
  26. SetStepComplete(Player,5877,1)
  27. end
  28. end
  29. function Declined(Quest, QuestGiver, Player)
  30. -- Add dialog here for when the quest is declined
  31. end
  32. function Deleted(Quest, QuestGiver, Player)
  33. -- Remove any quest specific items here when the quest is deleted
  34. end
  35. function Step1Complete(Quest, QuestGiver, Player)
  36. UpdateQuestStepDescription(Quest, 1, "I have killed five bog slugs in the Peat Bog.")
  37. UpdateQuestTaskGroupDescription(Quest, 1, "I've killed the bog things and paid attention to what they looked like.")
  38. UpdateQuestZone(Quest,"South Qeynos")
  39. 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)
  40. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  41. end
  42. function Step2Complete(Quest, QuestGiver, Player)
  43. UpdateQuestStepDescription(Quest, 2, "I spoke with Magister Niksel.")
  44. UpdateQuestTaskGroupDescription(Quest, 2, "Niksel has let me know what the bog things really were.")
  45. UpdateQuestZone(Quest,"Multiple Zones")
  46. 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)
  47. 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 )
  48. 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)
  49. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  50. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  51. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  52. end
  53. function Step3Complete(Quest, QuestGiver, Player)
  54. UpdateQuestStepDescription(Quest, 3, "I have spoken with Yanari.")
  55. QuestCheck(Quest, QuestGiver, Player)
  56. end
  57. function Step4Complete(Quest, QuestGiver, Player)
  58. UpdateQuestStepDescription(Quest, 4, "I have spoken with Zipiff.")
  59. QuestCheck(Quest, QuestGiver, Player)
  60. end
  61. function Step5Complete(Quest, QuestGiver, Player)
  62. UpdateQuestStepDescription(Quest, 5, "I have spoken with Oolimeminoso")
  63. QuestCheck(Quest, QuestGiver, Player)
  64. end
  65. function QuestCheck(Quest, QuestGiver, Player)
  66. if QuestStepIsComplete(Player,5767,3) and QuestStepIsComplete(Player,5767,4) and QuestStepIsComplete(Player,5767,5) then
  67. UpdateQuestTaskGroupDescription(Quest, 3, "I have learned much from Niksel's former students about sorcery.")
  68. UpdateQuestZone(Quest,"South Qeynos")
  69. 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)
  70. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  71. end
  72. end
  73. --I need to speak with Magister Niksel in South Qeynos about advancing as a mage.
  74. --I have contacted Magister Niksel about advancing.
  75. --Niksel has agreed to continue my lessons at a later time
  76. --Niksel has now directed me to other students to hear more about sorcery
  77. --I should let Niksel, in South Qeynos, know that the bog things didn't have much of a shape.
  78. --I spoke with Magister Niksel.
  79. --Niksel has let me know what the bog things really were.
  80. --I need to speak with Magister Niksel outside the mage tower in South Qeynos.
  81. --I should give Niksel, in South Qeynos, a summary of what I learned from his students
  82. function QuestComplete(Quest, QuestGiver, Player)
  83. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  84. UpdateQuestStepDescription(Quest, 6, "Niksel has agreed to continue my lessons at a later time.")
  85. UpdateQuestTaskGroupDescription(Quest, 6, "Niksel has agreed to continue my lessons at a later time.")
  86. 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.")
  87. GiveQuestReward(Quest, Player)
  88. end
  89. function Reload(Quest, QuestGiver, Player, Step)
  90. if Step == 1 then
  91. Step1Complete(Quest, QuestGiver, Player)
  92. elseif Step == 2 then
  93. Step2Complete(Quest, QuestGiver, Player)
  94. elseif Step == 3 then
  95. Step3Complete(Quest, QuestGiver, Player)
  96. elseif Step == 4 then
  97. Step4Complete(Quest, QuestGiver, Player)
  98. elseif Step == 5 then
  99. Step5Complete(Quest, QuestGiver, Player)
  100. elseif Step == 6 then
  101. QuestComplete(Quest, QuestGiver, Player)
  102. end
  103. end