troll_patrol_.lua 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --[[
  2. Script Name : troll_patrol.lua
  3. Script Purpose : Handles the quest, "Troll Patrol"
  4. Script Author : torsten
  5. Script Date : 13.07.2022
  6. Script Notes :
  7. Zone : Big Bend
  8. Quest Giver : Braz Gutpounder
  9. Preceded by : Trollish Delights
  10. Followed by : Gnomore Gnomesteaks
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepLocation(Quest, 1, "Hang a right leaving the docks, and pass under the first clothesline.", 20, "Perform Braz Gutpounder's patrol around Big Bend.", 11, -37, 0, 36, 134)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. end
  16. function Step1Complete(Quest, QuestGiver, Player)
  17. UpdateQuestStepDescription(Quest, 1, "The patrol continues...")
  18. UpdateQuestTaskGroupDescription(Quest, 1, "I need to patrol around Big Bend.")
  19. AddQuestStepLocation(Quest, 2, "Continue north along the east Big Bend.", 20, "Continue north along the east Big Bend.", 11, -48, 4, -4.5, 134)
  20. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  21. end
  22. function Step2Complete(Quest, QuestGiver, Player)
  23. UpdateQuestStepDescription(Quest, 2, "The patrol continues...")
  24. UpdateQuestTaskGroupDescription(Quest, 2, "I need to patrol around Big Bend.")
  25. AddQuestStepLocation(Quest, 3, "Continue on to the intersection near the entrance to South Freeport.", 20, "Continue on to the intersection near the entrance to South Freeport.", 11, -4, 3, -30, 134)
  26. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  27. end
  28. function Step3Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 3, "The patrol continues...")
  30. UpdateQuestTaskGroupDescription(Quest, 3, "I need to patrol around Big Bend.")
  31. AddQuestStepLocation(Quest, 4, "Head to The Torch of Oggok.", 20, "Head to The Torch of Oggok in the center of The Big Bend.", 11, 11, 0, 9, 134)
  32. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  33. end
  34. function Step4Complete(Quest, QuestGiver, Player)
  35. UpdateQuestStepDescription(Quest, 4, "I have completed the patrol.")
  36. UpdateQuestTaskGroupDescription(Quest, 4, "I needed to patrol around Big Bend.")
  37. local zone = GetZone(Player)
  38. local Bushy = GetSpawnByLocationID(zone, 133773786, false)
  39. local SpawnBushy = SpawnByLocationID(zone, 133773786,false)
  40. AddQuestStepKill(Quest, 5, "Kill Bushy Swashbottom!", 1, 100, "I should kill that halfling.", 91, 1340056)
  41. AddQuestStepCompleteAction(Quest, 5, "Step5Complete")
  42. end
  43. function Step5Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 5, "I have killed Bushy Swashbottom.")
  45. UpdateQuestTaskGroupDescription(Quest, 5, "I had to kill Bushy Swashbottom.")
  46. AddQuestStepChat(Quest, 6, "Return to Braz Gutpounder.", 1, "I should return to Braz Gutpounder.", 11, 1340039)
  47. AddQuestStepCompleteAction(Quest, 6, "QuestComplete")
  48. end
  49. function QuestComplete(Quest, QuestGiver, Player)
  50. UpdateQuestDescription(Quest, "Aside from that filthy, foul and disruptive little halfling, the whole patrol was quiet. Only one dead. I suppose it's a good day.")
  51. GiveQuestReward(Quest, Player)
  52. end
  53. function Accepted(Quest, QuestGiver, Player)
  54. -- Add dialog here for when the quest is accepted
  55. end
  56. function Declined(Quest, QuestGiver, Player)
  57. -- Add dialog here for when the quest is declined
  58. end
  59. function Deleted(Quest, QuestGiver, Player)
  60. -- Remove any quest specific items here when the quest is deleted
  61. end
  62. function Reload(Quest, QuestGiver, Player, Step)
  63. if Step == 1 then
  64. Step1Complete(Quest, QuestGiver, Player)
  65. elseif Step == 2 then
  66. Step2Complete(Quest, QuestGiver, Player)
  67. elseif Step == 3 then
  68. Step3Complete(Quest, QuestGiver, Player)
  69. elseif Step == 4 then
  70. Step4Complete(Quest, QuestGiver, Player)
  71. elseif Step == 5 then
  72. Step5Complete(Quest, QuestGiver, Player)
  73. elseif Step == 6 then
  74. QuestComplete(Quest, QuestGiver, Player)
  75. end
  76. end