destroy_the_corruption.lua 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. --[[
  2. Script Name : Quests/Oakmyst/destroy_the_corruption.lua
  3. Script Purpose : Handles the quest, "Destroy the Corruption"
  4. Script Author : Scatman
  5. Script Date : 2009.05.09
  6. Zone : Oakmyst Forest
  7. Quest Giver: Scholar Neola
  8. Preceded by: Judgement of the Dryads (judgement_of_the_dryads.lua)
  9. Followed by: None
  10. --]]
  11. require "SpawnScripts/Generic/DialogModule"
  12. function Init(Quest)
  13. AddQuestStepKill(Quest, 1, "Find and defeat Rotweed.", 1, 100, "I must slay Rotweed. This being can be found in the Teardrop Cave in Oakmyst Forest.", 611, 1950029,8300027)
  14. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KilledRotweed")
  15. end
  16. function Accepted(Quest, QuestGiver, Player)
  17. FaceTarget(QuestGiver, Player)
  18. Dialog.New(QuestGiver, Player)
  19. Dialog.AddDialog("The evil calls itself Rotweed and lurks in the darkness of Teardrop Cave. It buries itself in the cave walls and exudes corruption upon this woodland. ")
  20. Dialog.AddVoiceover("voiceover/english/empress_anassa/qey_adv01_oakmyst/empressanassa002.mp3", 3988531876, 1061259431)
  21. Dialog.AddOption("What is Rotweed?", "WhatIsRotweed")
  22. Dialog.AddOption("I will battle this Rotweed and return victorious. ")
  23. Dialog.Start()
  24. end
  25. function Declined(Quest, QuestGiver, Player)
  26. end
  27. function Step1_Complete_KilledRotweed(Quest, QuestGiver, Player)
  28. UpdateQuestStepDescription(Quest, 1, "I have found and defeated Rotweed.")
  29. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain the many creatures that made up Rotweed the plant fiend.")
  30. AddQuestStepChat(Quest, 2, "Speak to Empress Anassa.", 1, "I must return to speak to Empress Anassa in Oakmyst Forest.", 0, 1950050,8300021)
  31. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  32. end
  33. function QuestComplete(Quest, QuestGiver, Player)
  34. UpdateQuestStepDescription(Quest, 2, "I have spoken to Empress Anassa.")
  35. UpdateQuestStepDescription(Quest, 2, "I have returned and spoken to Empress Anassa.")
  36. UpdateQuestDescription(Quest, "I encountered and defeated the twisted plant fiend Rotweed. Empress Anassa of the Oakmyst dryads was very appreciative.")
  37. GiveQuestReward(Quest, Player)
  38. end
  39. function Reload(Quest, QuestGiver, Player, Step)
  40. if Step == 1 then
  41. Step1_Complete_KilledRotweed(Quest, QuestGiver, Player)
  42. elseif Step == 2 then
  43. QuestComplete(Quest, QuestGiver, Player)
  44. end
  45. end