TheForestKeeper.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/TheForestKeeper.lua
  3. Script Purpose : The Forest Keeper
  4. Script Author : John Adams
  5. Script Date : 2008.12.12
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local GhostsAndGoblins = 184
  9. function spawn(NPC)
  10. end
  11. function respawn(NPC)
  12. spawn(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. conversation = CreateConversation()
  17. if HasCompletedQuest(Spawn, GhostsAndGoblins) then
  18. MustRemainStrong(NPC, Spawn, 0)
  19. elseif HasQuest(Spawn, GhostsAndGoblins) then
  20. if GetQuestStep(Spawn, GhostsAndGoblins) == 1 then
  21. MustRemainStrong(NPC, Spawn, 1)
  22. elseif GetQuestStep(Spawn, GhostsAndGoblins) == 2 then
  23. MustRemainStrong(NPC, Spawn, 0)
  24. elseif GetQuestStep(Spawn, GhostsAndGoblins) == 3 then
  25. MustRemainStrong(NPC, Spawn, 2)
  26. else
  27. MustRemainStrong(NPC, Spawn, 0)
  28. end
  29. end
  30. end
  31. function MustRemainStrong(NPC, Spawn, Choice)
  32. FaceTarget(NPC, Spawn)
  33. conversation = CreateConversation()
  34. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/the_forest_keeper/tutorial_island02_revamp/quests/forest_keeper/forest_keeper001.mp3", "", "", 404349798, 0, Spawn)
  35. if Choice == 1 then
  36. AddConversationOption(conversation, "Are you the Forest Keeper that Deianeira spoke of?", "dlg_1_1")
  37. elseif Choice == 2 then
  38. AddConversationOption(conversation, "I've released many of the ghosts but there is no end to them!", "ReleasedGhosts")
  39. end
  40. AddConversationOption(conversation, "Good luck with that!")
  41. StartConversation(conversation, NPC, Spawn, "I must remain strong and vigilant against this! I will not give in to the corruption!")
  42. end
  43. function dlg_1_1(NPC, Spawn)
  44. FaceTarget(NPC, Spawn)
  45. conversation = CreateConversation()
  46. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/the_forest_keeper/tutorial_island02_revamp/quests/forest_keeper/forest_keeper002.mp3", "", "", 1673079737, 0, Spawn)
  47. AddConversationOption(conversation, "Can we do anything to stop it?", "dlg_1_2")
  48. StartConversation(conversation, NPC, Spawn, "Eh? Who's that? Oh, that betrayer! She should go back to Freeport! Yes, I was once a Forest Keeper, maintaining this wood. But look around you! The other treants have succumbed to the evil that pervades this island. They've become ghosts, trapped between this life and their rebirth.")
  49. end
  50. function dlg_1_2(NPC, Spawn)
  51. SetStepComplete(Spawn, GhostsAndGoblins, 1)
  52. FaceTarget(NPC, Spawn)
  53. conversation = CreateConversation()
  54. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/the_forest_keeper/tutorial_island02_revamp/quests/forest_keeper/forest_keeper003.mp3", "", "", 3694344031, 0, Spawn)
  55. AddConversationOption(conversation, "I will set them free.")
  56. StartConversation(conversation, NPC, Spawn, "Trapped in those ghostly forms, they are contributing to the decay of the Forest. I've been able to stave off the taint myself, but with so many of my brethren gone, it gets more and more difficult. They must be set free, so that they can be reborn into the earth. Without rebirth, there will be no living saplings!")
  57. end
  58. function ReleasedGhosts(NPC, Spawn)
  59. SetStepComplete(Spawn, GhostsAndGoblins, 3)
  60. FaceTarget(NPC, Spawn)
  61. conversation = CreateConversation()
  62. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/the_forest_keeper/tutorial_island02_revamp/quests/forest_keeper/forest_keeper004.mp3", "", "", 375881043, 0, Spawn)
  63. AddConversationOption(conversation, "I'll do what I can. Stay strong!")
  64. StartConversation(conversation, NPC, Spawn, "Alas, the decay runs too deep. You must learn what horrors those naughty goblins have released! There are still a few of them that are as yet untainted at the Last Stand, northeasterly of here. Speak to the soothsayer there; he may have ideas. We were friends in the old days.")
  65. end