9
3

RottingScum.lua 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. --[[
  2. Script Name : Quests/Darklight/RottingScum.lua
  3. Script Purpose : Handles the quest, "Rotting Scum"
  4. Script Author : Cynnar
  5. Script Date : 8/30/2015
  6. Script Notes : Quest ID 138
  7. Zone : Darklight Wood
  8. Quest Giver : Ginwyss d'Arkenett (ID 340064)
  9. Preceded by : Thexian Taint (ID 135)
  10. Followed by : Picking Up Slack (ID 139)
  11. --]]
  12. local RottingScum = 138
  13. function Init(Quest)
  14. AddQuestStepKill(Quest, 1, "I need to kill seven fallen rangers.", 7, 100, "Ginwyss D'Arkenett wants the zombies southwest of T'Vatar Post slain.", 611, 340060)
  15. AddQuestStepKill(Quest, 2, "I need to kill seven stout cadavers.", 7, 100, "Ginwyss D'Arkenett wants the zombies southwest of T'Vatar Post slain.", 611, 340059)
  16. AddQuestStepCompleteAction(Quest, 1, "FallenRangers")
  17. AddQuestStepCompleteAction(Quest, 2, "StoutCadavers")
  18. end
  19. function FallenRangers(Quest, QuestGiver, Player)
  20. UpdateQuestStepDescription(Quest, 1, "I have slain the fallen rangers")
  21. CheckProgress(Quest, QuestGiver, Player)
  22. end
  23. function StoutCadavers(Quest, QuestGiver, Player)
  24. UpdateQuestStepDescription(Quest, 2, "I have slain the stout cadavers")
  25. CheckProgress(Quest, QuestGiver, Player)
  26. end
  27. function CheckProgress(Quest, QuestGiver, Player)
  28. if QuestStepIsComplete(Player, RottingScum, 1) and QuestStepIsComplete(Player, RottingScum, 2) then
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the zombies..")
  30. ZombiesComplete(Quest, QuestGiver, Player)
  31. end
  32. end
  33. function ZombiesComplete(Quest, QuestGiver, Player)
  34. SetCompleteFlag(Quest)
  35. AddQuestStepChat(Quest, 3, "Return to Ginwyss D'Arkenett", 1, "Ginwyss D'Arkenett wants the zombies southwest of T'Vatar Post slain.", 11, 340064)
  36. AddQuestStepCompleteAction(Quest, 3, "QuestComplete")
  37. end
  38. function QuestComplete(Quest, QuestGiver, Player)
  39. UpdateQuestDescription(Quest, "I have slain the zombies for Ginwyss D'Arkenett.")
  40. GiveQuestReward(Quest, Player)
  41. end
  42. function Reload(Quest, QuestGiver, Player, Step)
  43. if QuestStepIsComplete(Player, RottingScum, 1) then
  44. FallenRangers(Quest, QuestGiver, Player)
  45. end
  46. if QuestStepIsComplete(Player, RottingScum, 2) then
  47. StoutCadavers(Quest, QuestGiver, Player)
  48. end
  49. if Step == 3 then
  50. QuestComplete(Quest, QuestGiver, Player)
  51. end
  52. end
  53. function Accepted(Quest, QuestGiver, Player)
  54. FaceTarget(QuestGiver, Player)
  55. conversation = CreateConversation()
  56. PlayFlavor(QuestGiver, "ginwyss_d_arkenett/darklight_wood/tvatar_post/ginwyss_revamp/ginwyss008.mp3", "", "", 2741628345, 486208170, Player)
  57. Say(QuestGiver, "Return to me after you've " .. '"killed" ' .. "them.")
  58. -- StartConversation(conversation, QuestGiver, Player, "Return to me after you've /"killed/" them.")
  59. end
  60. function Declined(Quest, QuestGiver, Player)
  61. -- Add dialog here for when the quest is declined
  62. end