9
3

uncover_the_caches.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : uncover_the_caches.lua
  3. Script Purpose : Handles the quest, "Uncover the Caches"
  4. Script Author : Dorbin
  5. Script Date : 2/27/2022
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Forest Ruins
  8. Quest Giver : Acting Lieutenant Germain
  9. Preceded by : Returning to the Disturbance
  10. Followed by : Lure
  11. NOTE: NEEDS activation command from Hidden Tools applied here.
  12. --]]
  13. function Init(Quest)
  14. AddQuestStepSpell(Quest, 1, "I need to destroy the tools hidden around the Forest Ruins.", 8, 100, "Lieutenant Germain has asked that I destroy the hidden gnoll caches that can be found in the Forest Ruins.", 611, "--[[ ID's --]]")
  15. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(NPC, Spawn)
  19. conversation = CreateConversation()
  20. PlayFlavor(NPC, "", "", "ponder", 0, 0)
  21. AddConversationOption(conversation, "You're welcome.", "dlg_16_2")
  22. StartConversation(conversation, NPC, Spawn, "We'll drive these gnolls out yet! Thanks for helping.")
  23. end
  24. function Declined(Quest, QuestGiver, Player)
  25. -- Add dialog here for when the quest is declined
  26. end
  27. function Deleted(Quest, QuestGiver, Player)
  28. -- Remove any quest specific items here when the quest is deleted
  29. end
  30. function Step1Complete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 1, "I have destroyed the hidden tools.")
  32. AddQuestStepChat(Quest, 2, "I need to return to Lieutenant Germain now that I have destroyed the hidden tools.", 1, "Lieutenant Germain has asked that I destroy the hidden gnoll caches that can be found in the Forest Ruins.", 11, 1960005)
  33. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  34. end
  35. function QuestComplete(Quest, QuestGiver, Player)
  36. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  37. UpdateQuestStepDescription(Quest, 2, "I have spoken to Lieutenant Germain.")
  38. UpdateQuestTaskGroupDescription(Quest, 1, "I have destroyed the hidden gnoll caches.")
  39. UpdateQuestDescription(Quest, "I have destroyed the gnoll caches within the Forest Ruins.")
  40. GiveQuestReward(Quest, Player)
  41. end
  42. function Reload(Quest, QuestGiver, Player, Step)
  43. if Step == 1 then
  44. Step1Complete(Quest, QuestGiver, Player)
  45. elseif Step == 2 then
  46. QuestComplete(Quest, QuestGiver, Player)
  47. end
  48. end