TheYarpsnarls.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. --[[
  2. Script Name : TheYarpsnarls.lua
  3. Script Purpose : Handles the quest, "The Yarpsnarls"
  4. Script Author : jakejp
  5. Script Date : 6/8/2018
  6. Script Notes :
  7. Zone : Butcherblock Mountains
  8. Quest Giver : Argro Durthor
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local TheYarpsnarls = 280
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "Kill several Yarpsnarl lookouts.", 4, 100, "I need to kill the Yarpsnarl's east of Argro's position.", 611, 1080251, 1080425, 1081124, 1081150)
  15. AddQuestStepKill(Quest, 2, "Kill several Yarpsnarl ravagers.", 4, 100, "I need to kill the Yarpsnarl's east of Argro's position.", 611, 1080248, 1080372, 1081122, 1081146)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. end
  19. function CheckProgress(Quest, QuestGiver, Player)
  20. if QuestStepIsComplete(Player, TheYarpsnarls, 1) and QuestStepIsComplete(Player, TheYarpsnarls, 2) then
  21. HandInQuest(Quest, QuestGiver, Player)
  22. end
  23. end
  24. function Step1Complete(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have killed the Yarpsnarl lookouts.")
  26. CheckProgress(Quest, QuestGiver, Player)
  27. end
  28. function Step2Complete(Quest, QuestGiver, Player)
  29. UpdateQuestStepDescription(Quest, 2, "I have killed the Yarpsnarl ravagers.")
  30. CheckProgress(Quest, QuestGiver, Player)
  31. end
  32. function HandInQuest(Quest, QuestGiver, Player)
  33. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the Yarpsnarl kobolds.")
  34. AddQuestStepChat(Quest, 3, "I need to speak with Argro.", 1, "I need to return to Argro now that I've slain the kobolds.", 11, 1081147)
  35. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  36. end
  37. function QuestComplete(Quest, QuestGiver, Player)
  38. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  39. UpdateQuestStepDescription(Quest, 3, "I have spoken with Argro.")
  40. UpdateQuestTaskGroupDescription(Quest, 2, "I have returned to Argro.")
  41. UpdateQuestDescription(Quest, "I have slain the kobolds for Argro. He was thankful for my help.")
  42. GiveQuestReward(Quest, Player)
  43. end
  44. function Reload(Quest, QuestGiver, Player, Step)
  45. if Step == 1 then
  46. Step1Complete(Quest, QuestGiver, Player)
  47. elseif Step == 2 then
  48. Step2Complete(Quest, QuestGiver, Player)
  49. elseif Step == 3 then
  50. QuestComplete(Quest, QuestGiver, Player)
  51. end
  52. end
  53. function Accepted(Quest, QuestGiver, Player)
  54. -- Add dialog here for when the quest is accepted
  55. end
  56. function Declined(Quest, QuestGiver, Player)
  57. -- Add dialog here for when the quest is declined
  58. end