TheGnollishMenace.lua 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. --[[
  2. Script Name : TheGnollishMenace.lua
  3. Script Purpose : Handles the quest, "The Gnollish Menace"
  4. Script Author : Shatou
  5. Script Date : 1/5/2020
  6. Script Notes :
  7. Zone : Caves
  8. Quest Giver : Lieutenant Delson
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local A_MUDPAW_LOOKOUT = 1970016
  13. local A_DUSTPAW_GUARD = 1970017
  14. local A_DUSTPAW_LOOKOUT = 1970018
  15. local A_DUSTPAW_ARMORER = 1970019
  16. local A_ROCKPAW_SCOUT = 1970020
  17. local A_ROCKPAW_GUARD = 1970021
  18. local A_DUSTPAW_ARMORER_2 = 1970027
  19. local A_MUDPAW_GUARD = 1970028
  20. local A_ROCKPAW_STRIKER = 1970029
  21. local A_ROCKPAW_STONEMASTER = 1970034
  22. local AN_ALABASTER_BEHEMOTH = 1970013
  23. local LIEUTENANT_DELSUN_ID = 1970005
  24. function Init(Quest)
  25. AddQuestStepKill(Quest, 1, "I need to kill thirty gnolls within the Caves.", 30, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 2707, A_MUDPAW_LOOKOUT, A_DUSTPAW_GUARD, A_DUSTPAW_LOOKOUT, A_DUSTPAW_ARMORER, A_ROCKPAW_SCOUT, A_ROCKPAW_GUARD, A_DUSTPAW_ARMORER_2, A_MUDPAW_GUARD, A_ROCKPAW_STRIKER, A_ROCKPAW_STONEMASTER)
  26. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  27. end
  28. function Step1Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 1, "I have killed thirty gnolls.")
  30. AddQuestStepKill(Quest, 2, "I need to kill two Dustpaw armorers.", 2, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 2707, A_DUSTPAW_ARMORER, A_DUSTPAW_ARMORER_2)
  31. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  32. end
  33. function Step2Complete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I have killed two Dustpaw armorers.")
  35. AddQuestStepKill(Quest, 3, "I need to kill five alabaster behemoths.", 5, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 2707, AN_ALABASTER_BEHEMOTH)
  36. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  37. end
  38. function Step3Complete(Quest, QuestGiver, Player)
  39. UpdateQuestStepDescription(Quest, 3, "I have killed five alabaster behemoths.")
  40. AddQuestStepKill(Quest, 4, "I need to kill five Rockpaw guards.", 5, 100, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 2707, A_ROCKPAW_GUARD)
  41. AddQuestStepCompleteAction(Quest, 4, "Step4Complete")
  42. end
  43. function Step4Complete(Quest, QuestGiver, Player)
  44. UpdateQuestStepDescription(Quest, 4, "I have killed five Rockpaw guards.")
  45. AddQuestStepChat(Quest, 5, "I need to return to Lieutenant Delsun.", 1, "Lieutenant Delsun has tasked me with taking out a large portion of the gnolls and their allies here in the Caves.", 11, LIEUTENANT_DELSUN_ID)
  46. AddQuestStepCompleteAction(Quest, 5, "QuestComplete")
  47. end
  48. function QuestComplete(Quest, QuestGiver, Player)
  49. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  50. UpdateQuestStepDescription(Quest, 5, "I have spoken with Lieutenant Delsun.")
  51. UpdateQuestDescription(Quest, "I have done what Lieutenant Delsun asked of me.")
  52. GiveQuestReward(Quest, Player)
  53. end
  54. function Reload(Quest, QuestGiver, Player, Step)
  55. if Step == 1 then
  56. Step1Complete(Quest, QuestGiver, Player)
  57. elseif Step == 2 then
  58. Step2Complete(Quest, QuestGiver, Player)
  59. elseif Step == 3 then
  60. Step3Complete(Quest, QuestGiver, Player)
  61. elseif Step == 4 then
  62. Step4Complete(Quest, QuestGiver, Player)
  63. elseif Step == 5 then
  64. QuestComplete(Quest, QuestGiver, Player)
  65. end
  66. end
  67. function Accepted(Quest, QuestGiver, Player)
  68. -- Add dialog here for when the quest is accepted
  69. end
  70. function Declined(Quest, QuestGiver, Player)
  71. -- Add dialog here for when the quest is declined
  72. end