judgement_of_the_dryads.lua 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. --[[
  2. Script Name : Quests/Oakmyst/judgement_of_the_dryads.lua
  3. Script Purpose : Handles the quest, "Judgement of the Dryads"
  4. Script Author : Scatman
  5. Script Date : 2009.10.08
  6. Zone : Oakmyst Forest
  7. Quest Giver: Scholar Neola
  8. Preceded by: Feed the Sapling (feed_the_sapling.lua)
  9. Followed by: Destroy the Corruption (destroy_the_corruption.lua)
  10. --]]
  11. function Init(Quest)
  12. AddQuestStepKill(Quest, 1, "Slay five Sunshimmer Sprites.", 5, 100, "I must hunt down and slay five Sunshimmer Sprites in Oakmyst Forest.", 611, 1950034, 1950036, 1950054, 1950031)
  13. AddQuestStepCompleteAction(Quest, 1, "Step1_Complete_KillSprites")
  14. end
  15. function Accepted(Quest, QuestGiver, Player)
  16. FaceTarget(QuestGiver, Player)
  17. conversation = CreateConversation()
  18. PlayFlavor(QuestGiver, "voiceover/english/judge_eunomia/qey_adv01_oakmyst/judgeeunomia002.mp3", "", "", 2678200574, 3115032598, Player)
  19. AddConversationOption(conversation, "I shall do my best to lower their numbers.")
  20. StartConversation(conversation, QuestGiver, Player, "They're corrupted fayfolke--bright with beauty but twisted and corrupted to the core. They're called the sunshimmer sprites. You must destroy them.")
  21. end
  22. function Declined(Quest, QuestGiver, Player)
  23. end
  24. function Step1_Complete_KillSprites(Quest, QuestGiver, Player)
  25. UpdateQuestStepDescription(Quest, 1, "I have slain five Sunshimmer Sprites.")
  26. UpdateQuestTaskGroupDescription(Quest, 1, "I have slain five Sunshimmer Sprites in Oakmyst Forest.")
  27. AddQuestStepChat(Quest, 2, "Speak to Judge Eunomia.", 1, "I must speak to Judge Eunomia in Oakmyst Forest.", 0, 1950049)
  28. AddQuestStepCompleteAction(Quest, 2, "QuestComplete")
  29. end
  30. function QuestComplete(Quest, QuestGiver, Player)
  31. UpdateQuestStepDescription(Quest, 2, "I spoke to Judge Eunomia.")
  32. UpdateQuestTaskGroupDescription(Quest, 2, "I spoke to Judge Eunomia in Oakmyst Forest.")
  33. UpdateQuestDescription(Quest, "I have served Judge Eunomia and the dryads of Oakmyst by lowering the population of the Sunshimmer Sprites, a corrupted form of fairies that began to infest the forest.")
  34. GiveQuestReward(Quest, Player)
  35. end
  36. function Reload(Quest, QuestGiver, Player, Step)
  37. if Step == 1 then
  38. Step1_Complete_KillSprites(Quest, QuestGiver, Player)
  39. elseif Step == 2 then
  40. QuestComplete(Quest, QuestGiver, Player)
  41. end
  42. end