9
3

scavenger_rats.lua 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. function Init(Quest)
  12. 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, 1980003, 1980017)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  14. UpdateQuestZone(Quest,"Peat Bog")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(NPC, Player)
  18. conversation = CreateConversation()
  19. AddConversationOption(conversation, "Farewell Salinia.")
  20. StartConversation(conversation, QuestGiver, Player, "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(NPC, "", "", "thank", 0,0 , Player)
  22. end
  23. function Declined(Quest, QuestGiver, Player)
  24. -- Add dialog here for when the quest is declined
  25. end
  26. function Deleted(Quest, QuestGiver, Player)
  27. -- Remove any quest specific items here when the quest is deleted
  28. end
  29. function Step1Complete(Quest, QuestGiver, Player)
  30. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  31. UpdateQuestStepDescription(Quest, 1, "I have killed all eight of the scavengers in the Bog.")
  32. UpdateQuestTaskGroupDescription(Quest, 1, "I killed eight scavenger rats.")
  33. UpdateQuestZone(Quest,"Willow Wood")
  34. AddQuestStepChat(Quest, 2, "I need to return to Salinia Brooklily.", 1, "I need to return to Salinia Brooklily in The Willow Wood.", 93, 2370043)
  35. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  36. end
  37. function QuestComplete(Quest, QuestGiver, Player)
  38. UpdateQuestStepDescription(Quest, 2, "I told Salinia about the scavengers I exterminated.")
  39. UpdateQuestTaskGroupDescription(Quest, 2, "I returned to Salinia Brooklily.")
  40. UpdateQuestDescription(Quest, "I've slain eight scavenger rats in the Peat Bog. I hope that will help with the overpopulation of the rats there.")
  41. GiveQuestReward(Quest, Player)
  42. end
  43. function Reload(Quest, QuestGiver, Player, Step)
  44. if Step == 1 then
  45. Step1Complete(Quest, QuestGiver, Player)
  46. end
  47. if Step == 2 then
  48. QuestComplete(Quest, QuestGiver, Player)
  49. end
  50. end