9
3

TheFrenzyoftheBloodskulls.lua 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. --[[
  2. Script Name : the_frenzy_of_the_bloodskulls.lua
  3. Script Purpose : Handles the quest, "The Frenzy of the Bloodskulls"
  4. Script Author : QuestParser (Replace this)
  5. Script Date : 28.02.2021
  6. Script Notes : Auto generated with QuestParser.
  7. Zone : Commonlands
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "I need to kill 7 Bloodskull warriors.", 7, 100, "I need to kill some Bloodskull orcs and collect some samples of the frenzy root.", 611, 330123, 330250)
  14. AddQuestStepKill(Quest, 2, "I need to kill 3 Bloodskull priests", 3, 100, "I need to kill some Bloodskull orcs and collect some samples of the frenzy root.", 611, 330249)
  15. AddQuestStepHarvest(Quest, 3, "I need to collect five samples of Bloodskull Frenzy Root", 5, 100, "I need to kill some Bloodskull orcs and collect some samples of the frenzy root.", 197, 4403)
  16. AddQuestStepCompleteAction(Quest, 1, "Step1Complete")
  17. AddQuestStepCompleteAction(Quest, 2, "Step2Complete")
  18. AddQuestStepCompleteAction(Quest, 3, "Step3Complete")
  19. end
  20. function Accepted(Quest, QuestGiver, Player)
  21. FaceTarget(QuestGiver, Player)
  22. local conversation = CreateConversation()
  23. AddConversationOption(conversation, "Ok.")
  24. StartConversation(conversation, QuestGiver, Player, "Return to me once this is done, I'll have more work for you.")
  25. end
  26. function Declined(Quest, QuestGiver, Player)
  27. -- Add dialog here for when the quest is declined
  28. end
  29. function Deleted(Quest, QuestGiver, Player)
  30. -- Remove any quest specific items here when the quest is deleted
  31. end
  32. function Step1Complete(Quest, QuestGiver, Player)
  33. UpdateQuestStepDescription(Quest, 1, "I have slain 7 Bloodskull warriors.")
  34. CheckProgress(Quest, QuestGiver, Player)
  35. end
  36. function Step2Complete(Quest, QuestGiver, Player)
  37. UpdateQuestStepDescription(Quest, 2, "I have slain 3 Bloodskull priests.")
  38. CheckProgress(Quest, QuestGiver, Player)
  39. end
  40. function Step3Complete(Quest, QuestGiver, Player)
  41. UpdateQuestStepDescription(Quest, 3, "I have collected five Bloodskull Frenzy Root samples.")
  42. CheckProgress(Quest, QuestGiver, Player)
  43. end
  44. function QuestComplete(Quest, QuestGiver, Player)
  45. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  46. UpdateQuestStepDescription(Quest, 4, "I have spoken with Rainus.")
  47. UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Rainus Canton.")
  48. UpdateQuestDescription(Quest, "I have collected the root samples for Rainus. He was appreciative.")
  49. GiveQuestReward(Quest, Player)
  50. end
  51. function CheckProgress(Quest, QuestGiver, Player)
  52. if QuestStepIsComplete(Player, 402, 1) and QuestStepIsComplete(Player, 402, 2) and QuestStepIsComplete(Player, 402, 3) then
  53. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the orcs and collected the root samples.")
  54. AddQuestStepChat(Quest, 4, "I need to return to Rainus", 1, "Now that I have done as he asked, I should return to Rainus Canton.", 11, 330246)
  55. AddQuestStepCompleteAction(Quest, 4, "QuestComplete")
  56. end
  57. end
  58. function Reload(Quest, QuestGiver, Player, Step)
  59. if Step == 1 then
  60. Step1Complete(Quest, QuestGiver, Player)
  61. elseif Step == 2 then
  62. Step2Complete(Quest, QuestGiver, Player)
  63. elseif Step == 3 then
  64. Step3Complete(Quest, QuestGiver, Player)
  65. elseif Step == 4 then
  66. QuestComplete(Quest, QuestGiver, Player)
  67. end
  68. end