fighter_training_pt_i.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --[[
  2. Script Name : Quests/Hallmark/fighter_training_pt_i.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.12.07 03:12:56
  5. Script Purpose :
  6. Zone : Hallmark
  7. Quest Giver: Master at Arms Dagorel
  8. Preceded by: None
  9. Followed by: Fighter Training, pt II
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I must kill five white spiderlings in the caves.", 5, 100, "I need to travel to the Caves and kill five white spiderlings like a warrior would.", 91, 8260002)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("Och! A bit eager, are we? You're off to a good start then, you are. A warrior takes the bull by the horns! Let's give you a taste, shall we? The Council needs help exterminatin' a massive hatching of Ice Spiders in the caves. Go to the caves and destroy some of the spiders. After you get rid of the critters, head back my way.")
  20. PlayFlavor(QuestGiver, "", "", "wince", 0, 0, Player)
  21. Dialog.AddOption("Right. I'll be back once I've dealt with these spiders.")
  22. Dialog.Start()
  23. if GetQuestStep(Player,5878)==1 then
  24. SetStepComplete(Player,5878,1)
  25. end
  26. end
  27. function Declined(Quest, QuestGiver, Player)
  28. -- Add dialog here for when the quest is declined
  29. end
  30. function Deleted(Quest, QuestGiver, Player)
  31. -- Remove any quest specific items here when the quest is deleted
  32. end
  33. function Step1Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 1, "I have killed five white spiderlings in the caves.")
  35. UpdateQuestTaskGroupDescription(Quest, 1, "I've killed the spiders and made the miner's job a bit easier.")
  36. AddQuestStepChat(Quest, 2, "I need to speak with Dagorel in South Qeynos.", 1, "I should let Master-at-Arms Dagorel know the miners are safe.", 11, 2310377)
  37. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  38. end
  39. function Step2Complete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I've spoken with Dagorel in South Qeynos.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "Dagorel approved of the way I handled the situation.")
  42. AddQuestStepChat(Quest, 3, "I need to speak with Luvile in Starcrest Commune and ask for brawling tips", 1, "Master-at-Arms Dagorel has directed me to a couple of people for tips on brawling", 11, 2340042)
  43. AddQuestStepChat(Quest, 4, "I need to speak with Hargan in Graystone Yard for brawling tips", 1, "Master-at-Arms Dagorel has directed me to a couple of people for tips on brawling", 11, 2350031)
  44. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  45. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  46. end
  47. function Step3Complete(Quest, QuestGiver, Player)
  48. UpdateQuestStepDescription(Quest, 3, "I've received tips from Luvile")
  49. QuestCheck(Quest, QuestGiver, Player)
  50. end
  51. function Step4Complete(Quest, QuestGiver, Player)
  52. UpdateQuestStepDescription(Quest, 4, "I've received tips from Hargan")
  53. QuestCheck(Quest, QuestGiver, Player)
  54. end
  55. function QuestCheck(Quest, QuestGiver, Player)
  56. if QuestStepIsComplete(Player,5787,3) and QuestStepIsComplete(Player,5787,4) then
  57. UpdateQuestTaskGroupDescription(Quest, 3, "I've been given tips on brawling... and a little more, too.")
  58. AddQuestStepChat(Quest, 5, "I need to speak with Dagorel in South Qeynos.", 1, "I should let Dagorel know I've learned my lesson... in more ways than one.", 11, 2310377)
  59. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  60. end
  61. end
  62. function QuestComplete(Quest, QuestGiver, Player)
  63. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  64. UpdateQuestStepDescription(Quest, 5, "I've spoken with Dagorel in South Qeynos.")
  65. UpdateQuestTaskGroupDescription(Quest, 4, "I've been told I did well in learning about brawlers.")
  66. UpdateQuestDescription(Quest, "Dagorel, Master-at-Arms of the Council, has shown me two different ways to focus on fighting. So far I've learned how a warrior and a brawler handle things. Because my brawler tips got out of hand, Dagorel agreed to show me the last way when I've taken time to recover.")
  67. GiveQuestReward(Quest, Player)
  68. end
  69. function Reload(Quest, QuestGiver, Player, Step)
  70. if Step == 1 then
  71. Step1Complete(Quest, QuestGiver, Player)
  72. elseif Step == 2 then
  73. Step2Complete(Quest, QuestGiver, Player)
  74. elseif Step == 3 then
  75. Step3Complete(Quest, QuestGiver, Player)
  76. elseif Step == 4 then
  77. Step4Complete(Quest, QuestGiver, Player)
  78. elseif Step == 5 then
  79. QuestComplete(Quest, QuestGiver, Player)
  80. end
  81. end