fighter_training_pt_ii.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. --[[
  2. Script Name : Quests/Hallmark/fighter_training_pt_ii.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.07 03:12:36
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver: Master at Arms Dagorel
  8. Preceded by: Fighter Training, pt I
  9. Followed by: Path of the (CLASS)
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepChat(Quest, 1, "I need to speak with Sir Laughlin in North Qeynos", 1, "Dagorel has asked me to inspire three of the guards in Qeynos", 11, 2220024)
  14. AddQuestStepChat(Quest, 2, "I need to speak with Lieutenant Ilgar in South Qeynos.", 1, "Dagorel has asked me to inspire three of the guards in Qeynos", 11,2310017)
  15. AddQuestStepChat(Quest, 3, "I need to speak with Squire Moorford in Qeynos Harbor.", 1, "Dagorel has asked me to inspire three of the guards in Qeynos", 11, 2210118)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. Dialog.New(QuestGiver, Player)
  23. Dialog.AddDialog("I want you to remind a few of the Qeynos guards that we appreciate what they do for the city. Go find some of the boys posted around town, and remind them why they work so hard. I'll stop yappin' your ear off and write some of the guards' names in your journal.")
  24. PlayFlavor(QuestGiver, "", "", "smile", 0, 0, Player)
  25. Dialog.AddOption("Sounds easy enough. I'll let you know once I've met with the other guards.")
  26. Dialog.Start()
  27. if GetQuestStep(Player,5878)==1 then
  28. SetStepComplete(Player,5878,1)
  29. end
  30. end
  31. function Declined(Quest, QuestGiver, Player)
  32. -- Add dialog here for when the quest is declined
  33. end
  34. function Deleted(Quest, QuestGiver, Player)
  35. -- Remove any quest specific items here when the quest is deleted
  36. end
  37. function Step1Complete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 1, "I've spoken with Sir Laughlin")
  39. QuestCheck(Quest, QuestGiver, Player)
  40. end
  41. function Step2Complete(Quest, QuestGiver, Player)
  42. UpdateQuestStepDescription(Quest, 2, "I've spoken with Lieutenant Ilgar.")
  43. QuestCheck(Quest, QuestGiver, Player)
  44. end
  45. function Step3Complete(Quest, QuestGiver, Player)
  46. UpdateQuestStepDescription(Quest, 3, "I've spoken with Squire Moorford.")
  47. QuestCheck(Quest, QuestGiver, Player)
  48. end
  49. function QuestCheck(Quest, QuestGiver, Player)
  50. if QuestStepIsComplete(Player,5788,1) and QuestStepIsComplete(Player,5788,2) and QuestStepIsComplete(Player,5788,3) then
  51. UpdateQuestTaskGroupDescription(Quest, 1, "I've reminded some of the guards why they are fighting for Qeynos")
  52. AddQuestStepChat(Quest, 4, "I need to speak with Dagorel", 1, "I should return to Dagorel and let him know that I spoke with the soldiers", 11, 2310377)
  53. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  54. end
  55. end
  56. function Step4Complete(Quest, QuestGiver, Player)
  57. UpdateQuestStepDescription(Quest, 4, "I've spoken with Dagorel")
  58. UpdateQuestTaskGroupDescription(Quest, 2, "I've let Dagorel know that I spoke with the soldiers")
  59. AddQuestStepKillByRace(Quest, 5, "I must kill one gnoll", 1, 100, "Dagorel has charged me with finding and killing a Darkpaw Gnoll Pup in Antonica", 1220, 298, 120065)
  60. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  61. end
  62. function Step5Complete(Quest, QuestGiver, Player)
  63. UpdateQuestStepDescription(Quest, 5, "I have killed one gnoll")
  64. UpdateQuestTaskGroupDescription(Quest, 3, "I've killed the gnoll pup")
  65. AddQuestStepChat(Quest, 6, "I need to speak with Dagorel", 1, "I should let Dagorel know that the Gnoll Pup is dead", 11, 2310377)
  66. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  67. end
  68. function QuestComplete(Quest, QuestGiver, Player)
  69. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  70. UpdateQuestStepDescription(Quest, 6, "I've spoken with Dagorel")
  71. UpdateQuestTaskGroupDescription(Quest, 4, "Dagorel has agreed with the choice that I've made in life")
  72. UpdateQuestDescription(Quest, "Dagorel, the Master-at-Arms of Qeynos, has shown me different fighting styles. Thanks to his training, I've decided which way to direct my future training. From hereon, I'm no longer just a fighter. In time, people will associate my name with my style of fighting.")
  73. GiveQuestReward(Quest, Player)
  74. end
  75. --
  76. function Reload(Quest, QuestGiver, Player, Step)
  77. if Step == 1 then
  78. Step1Complete(Quest, QuestGiver, Player)
  79. elseif Step == 2 then
  80. Step2Complete(Quest, QuestGiver, Player)
  81. elseif Step == 3 then
  82. Step3Complete(Quest, QuestGiver, Player)
  83. elseif Step == 4 then
  84. Step4Complete(Quest, QuestGiver, Player)
  85. elseif Step == 5 then
  86. Step5Complete(Quest, QuestGiver, Player)
  87. elseif Step == 6 then
  88. QuestComplete(Quest, QuestGiver, Player)
  89. end
  90. end