9
3

HitThemWhereItHurts.lua 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : HitThemWhereitHurts.lua
  3. Script Purpose : Handles the quest, "Hit Them Where it Hurts"
  4. Script Author : Shatou
  5. Script Date : 1/3/2020
  6. Script Notes : Need to add scripts to the forge and mechanical parts to recognize a player with this quest, make them interactable,
  7. update the quest on use, and destroy them from the client view.
  8. Zone : Caves
  9. Quest Giver : Consul Bree
  10. Preceded by : A Lack of Information
  11. Followed by : Elements of a Ritual
  12. --]]
  13. function Init(Quest, Player)
  14. AddQuestStep(Quest, 1, "I need to destroy the forge in the armory.", 1, 100, "Consul Bree has asked for my help in disrupting the gnoll operations here in the Caves. I can help by crippling their ability to craft armor and destroying some of their machine parts.", 12)
  15. for i = 1, 6, 1 do
  16. SummonItem(Player, 6975, 1)
  17. end
  18. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  19. end
  20. function Step1Complete(Quest, QuestGiver, Player)
  21. UpdateQuestStepDescription(Quest, 1, "I have destroyed the forge.")
  22. AddQuestStep(Quest, 2, "I need to destroy some of the mechanical parts stashed in the Caves.", 5, 100, "Consul Bree has asked for my help in disrupting the gnoll operations here in the Caves. I can help by crippling their ability to craft armor and destroying some of their machine parts.", 1042)
  23. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  24. end
  25. function Step2Complete(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 2, "I have destroyed some of the mechanical parts stashed in the Caves.")
  27. UpdateQuestTaskGroupDescription(Quest, 1, "I have done as Consul Bree asked.")
  28. AddQuestStepChat(Quest, 3, "I need to return to Consul Bree.", 1, "Now that I have helped Consul Bree I should return to her.", 11)
  29. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  30. end
  31. function QuestComplete(Quest, QuestGiver, Player)
  32. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  33. UpdateQuestStepDescription(Quest, 3, "I have spoken with Consul Bree.")
  34. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Consul Bree.")
  35. UpdateQuestDescription(Quest, "I have interrupted work in the armory and destroyed a number of machine components for Bree.")
  36. GiveQuestReward(Quest, Player)
  37. end
  38. function Reload(Quest, QuestGiver, Player, Step)
  39. if Step == 1 then
  40. Step1Complete(Quest, QuestGiver, Player)
  41. elseif Step == 2 then
  42. Step2Complete(Quest, QuestGiver, Player)
  43. elseif Step == 3 then
  44. QuestComplete(Quest, QuestGiver, Player)
  45. end
  46. end
  47. function Accepted(Quest, QuestGiver, Player)
  48. -- Add dialog here for when the quest is accepted
  49. end
  50. function Declined(Quest, QuestGiver, Player)
  51. -- Add dialog here for when the quest is declined
  52. end