9
3

scavenger_rats.lua 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. --[[
  2. Script Name : Quests/TheWillowWood/scavenger_rats.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.02.15 06:02:02
  5. Script Purpose :
  6. Zone : TheWillowWood
  7. Quest Giver: Salinia Brooklily
  8. Preceded by: None
  9. Followed by:
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I must kill eight of any type of scavengers in the Peat Bog.", 8, 100, "I need to kill eight scavenger rats in the Peat Bog.", 93, 8290026, 8290021)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  15. UpdateQuestZone(Quest,"Peat Bog")
  16. end
  17. function Accepted(Quest, QuestGiver, Player)
  18. FaceTarget(QuestGiver, Player)
  19. Dialog.New(QuestGiver, Player)
  20. Dialog.AddDialog("Thank you for assisting us. If you slay only a few rats it will make a difference. Good luck on your hunt, adventurer.")
  21. PlayFlavor(QuestGiver, "", "", "thank", 0,0 , Player)
  22. Dialog.AddOption("Farewell Salinia.")
  23. Dialog.Start()
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. -- Add dialog here for when the quest is declined
  27. end
  28. function Deleted(Quest, QuestGiver, Player)
  29. -- Remove any quest specific items here when the quest is deleted
  30. end
  31. function Step1Complete(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, 1, "I have killed all eight of the scavengers in the Bog.")
  34. UpdateQuestTaskGroupDescription(Quest, 1, "I killed eight scavenger rats.")
  35. UpdateQuestZone(Quest,"Willow Wood")
  36. AddQuestStepChat(Quest, 2, "I need to return to Salinia Brooklily.", 1, "I need to return to Salinia Brooklily in The Willow Wood.", 93, 2370043)
  37. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  38. end
  39. function QuestComplete(Quest, QuestGiver, Player)
  40. UpdateQuestStepDescription(Quest, 2, "I told Salinia about the scavengers I exterminated.")
  41. UpdateQuestTaskGroupDescription(Quest, 2, "I returned to Salinia Brooklily.")
  42. UpdateQuestDescription(Quest, "I've slain eight scavenger rats in the Peat Bog. I hope that will help with the overpopulation of the rats there.")
  43. GiveQuestReward(Quest, Player)
  44. end
  45. function Reload(Quest, QuestGiver, Player, Step)
  46. if Step == 1 then
  47. Step1Complete(Quest, QuestGiver, Player)
  48. elseif Step == 2 then
  49. QuestComplete(Quest, QuestGiver, Player)
  50. end
  51. end