StoptheProblemattheSource.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. --[[
  2. Script Name : StoptheProblemattheSource.lua
  3. Script Purpose : Handles the quest, "Stop the Problem at the Source"
  4. Script Author : FeaRFx
  5. Script Date : 26/01/2017
  6. Script Notes :
  7. Zone : Darklight Wood
  8. Quest Giver :
  9. Preceded by : None
  10. Followed by : None
  11. --]]
  12. local StopTheProblem = 198
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I need to kill Alerica.", 1, 100, "I need to take out the Sableflame adherents and Alerica.", 11, 340128)
  15. AddQuestStepKill(Quest, 2, "I need to kill Sableflame adherents.", 8, 100, "I need to take out the Sableflame adherents and Alerica.", 611, 340126)
  16. AddQuestStepCompleteAction(Quest, 1, "KillAlerica")
  17. AddQuestStepCompleteAction(Quest, 2, "KillMobs")
  18. end
  19. function CheckProgress(Quest, QuestGiver, Player)
  20. if QuestStepIsComplete(Player, StopTheProblem, 1) and QuestStepComplete(Player, StopTheProblem, 2) then
  21. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain Alerica and the adherents.")
  22. QuestComplete(Quest, QuestGiver, Player)
  23. end
  24. end
  25. function KillAlerica(Quest, QuestGiver, Player)
  26. UpdateQuestStepDescription(Quest, 1, "I have slain Alerica.")
  27. CheckProgress(Quest, QuestGiver, Player)
  28. end
  29. function KillMobs(Quest, QuestGiver, Player)
  30. UpdateQuestStepDescription(Quest, 2, "I have slain the Sableflame adherents.")
  31. CheckProgress(Quest, QuestGiver, Player)
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. -- The following UpdateQuestStepDescription and UpdateTaskGroupDescription are not needed, parser adds them for completion in case stuff needs to be moved around
  35. --UpdateQuestStepDescription(Quest, 3, "I have spoken with Gaussnitra V'Kilana.")
  36. --UpdateQuestTaskGroupDescription(Quest, 2, "I have spoken with Gaussnitra V'Kilana.")
  37. --UpdateQuestDescription(Quest, "I have slain Alerica and the Sableflame adherents.")
  38. SetCompleteFlag(Quest, Player)
  39. GiveQuestReward(Quest, Player)
  40. end
  41. function Reload(Quest, QuestGiver, Player, Step)
  42. if QuestStepIsComplete(Player, StopTheProblem, 1) then
  43. KillAlerica(Quest, QuestGiver, Player)
  44. end
  45. if QuestStepIsComplete(Player, StopTheProblem, 2) then
  46. KillMobs(Quest, QuestGiver, Player)
  47. end
  48. end
  49. function Accepted(Quest, QuestGiver, Player)
  50. -- Add dialog here for when the quest is accepted
  51. end
  52. function Declined(Quest, QuestGiver, Player)
  53. -- Add dialog here for when the quest is declined
  54. end