AdalinEmerael.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/AdalinEmerael.lua
  3. Script Purpose : Adalin Emerael
  4. Script Author : Scatman
  5. Script Date : 2009.10.02
  6. Script Notes :
  7. --]]
  8. local HIGH_ELF = 8
  9. local HIGH_ELF_MENTOR_QUEST_5 = 69
  10. local QUEST_1 = 294
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, QUEST_1)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. conversation = CreateConversation()
  17. if HasQuest(Spawn, HIGH_ELF_MENTOR_QUEST_5) then
  18. AddConversationOption(conversation, "I come on behalf of Vindain, from Castleview Hamlet.", "WhatNews")
  19. end
  20. if HasCompletedQuest(Spawn, QUEST_1) then
  21. Say(NPC, "Thank you for your help.", Spawn)
  22. elseif HasQuest(Spawn, QUEST_1) then
  23. OnQuest1(NPC, Spawn, conversation)
  24. else
  25. if GetRace(Spawn) == HIGH_ELF then
  26. NotAlwaysSoBusy(NPC, Spawn, conversation)
  27. else
  28. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/adalin_emerael/qey_adv01_oakmyst_revamp/qst_adalin_notonquest_5a7f745c.mp3", "Good day to you.", "", 16696239, 3805917441, Spawn)
  29. end
  30. end
  31. end
  32. function respawn(NPC)
  33. spawn(NPC)
  34. end
  35. ----------------------------------------------------------------------------------------------------------------
  36. -- HIGH_ELF_MENTOR_QUEST_5
  37. ----------------------------------------------------------------------------------------------------------------
  38. function WhatNews(NPC, Spawn)
  39. FaceTarget(NPC, Spawn)
  40. conversation = CreateConversation()
  41. AddConversationOption(conversation, "A corrupted sunshimmer sprite made its way into Castleview Hamlet. Vindain sent me to talk to you because of what that means...", "ThingsAreNotPleasant")
  42. StartConversation(conversation, NPC, Spawn, "And what news does he send?")
  43. end
  44. function ThingsAreNotPleasant(NPC, Spawn)
  45. if HasQuest(Spawn, HIGH_ELF_MENTOR_QUEST_5) then
  46. SetStepComplete(Spawn, HIGH_ELF_MENTOR_QUEST_5, 1)
  47. end
  48. FaceTarget(NPC, Spawn)
  49. conversation = CreateConversation()
  50. if not HasQuest(Spawn, QUEST_1) and not HasCompletedQuest(Spawn, QUEST_1) then
  51. AddConversationOption(conversation, "What is going on?", "Corruption")
  52. end
  53. AddConversationOption(conversation, "So I have heard.")
  54. StartConversation(conversation, NPC, Spawn, "... for Oakmyst. We know. Things are not pleasant here right now.")
  55. end
  56. function Corruption(NPC, Spawn)
  57. FaceTarget(NPC, Spawn)
  58. conversation = CreateConversation()
  59. AddConversationOption(conversation, "What can I do to help?", "ToHelp")
  60. AddConversationOption(conversation, "I will return if I get time.")
  61. StartConversation(conversation, NPC, Spawn, "Corruption, and perhaps more. It is too early, and the information is too scattered, to know anything for certain. We can use all the help we can get at this point.")
  62. end
  63. ----------------------------------------------------------------------------------------------------------------
  64. -- QUEST 1
  65. ----------------------------------------------------------------------------------------------------------------
  66. function NotAlwaysSoBusy(NPC, Spawn, conversation)
  67. AddConversationOption(conversation, "What do you mean?", "WhatDoYouMean")
  68. StartConversation(conversation, NPC, Spawn, "The oakmyst was not always so busy.")
  69. end
  70. function WhatDoYouMean(NPC, Spawn, conversation)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. AddConversationOption(conversation, "Why do you wish that?", "WhyDoYouWishThat")
  74. StartConversation(conversation, NPC, Spawn, "At one point in time, this forest was a lonely place. This is not so true anymore, thought I wish it were.")
  75. end
  76. function WhyDoYouWishThat(NPC, Spawn, conversation)
  77. FaceTarget(NPC, Spawn)
  78. conversation = CreateConversation()
  79. AddConversationOption(conversation, "What can I do to help?", "ToHelp")
  80. AddConversationOption(conversation, "That is most unfortunate. I will return later if I can help.")
  81. StartConversation(conversation, NPC, Spawn, "Corruption has found hold here. The source of this corruption we do not know. All we can do for now is react and hope more information come to light soon enough.")
  82. end
  83. function ToHelp(NPC, Spawn)
  84. FaceTarget(NPC, Spawn)
  85. conversation = CreateConversation()
  86. AddConversationOption(conversation, "A gnoll in Oakmyst?", "AGnollInOakmyst")
  87. StartConversation(conversation, NPC, Spawn, "I am glad to hear you ask. I was in the process of clearing out the corruption in Oakmyst when I was attacked by a gnoll.")
  88. end
  89. function AGnollInOakmyst(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. conversation = CreateConversation()
  92. AddConversationOption(conversation, "What must I do?", "WhatMustIDo")
  93. AddConversationOption(conversation, "Sorry, not today.")
  94. StartConversation(conversation, NPC, Spawn, "Hard to believe, I know. The guards didn't believe me either. It did happen, though. I am no fighter, and if I am attacked again I may not survive. I would ask of you a dangerous favor.")
  95. end
  96. function WhatMustIDo(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. conversation = CreateConversation()
  99. AddConversationOption(conversation, "Where are the trees?", "WhereAreTrees")
  100. StartConversation(conversation, NPC, Spawn, "Cleanse the trees of the Oakmyst. Be careful, gnolls may be lurking nearby. If you do find a gnoll, it is important you bring proof of its existence to a guard. If my words are not proof enough we shall find something that suffices.")
  101. end
  102. function WhereAreTrees(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. conversation = CreateConversation()
  105. AddConversationOption(conversation, "I will, thank you.", "OfferQuest1")
  106. StartConversation(conversation, NPC, Spawn, "There is one just weest of the gates to Castleview Hamlet. Another is just east of the Western Falls west of the first tree. The final tree is east of the entrance to the docks on the western end of the forest. Remember, be wary of gnolls.")
  107. end
  108. function OfferQuest1(NPC, Spawn)
  109. FaceTarget(NPC, Spawn)
  110. OfferQuest(NPC, Spawn, QUEST_1)
  111. end
  112. function OnQuest1(NPC, Spawn, conversation)
  113. if GetQuestStep(Spawn, QUEST_1) <= 4 then
  114. if GetQuestStep(Spawn, QUEST_1) == 4 then
  115. AddConversationOption(conversation, "Yes, they have.", "TreesCleansed")
  116. else
  117. AddConversationOption(conversation, "No, not yet.")
  118. end
  119. StartConversation(conversation, NPC, Spawn, "Have the trees been cleansed?")
  120. else
  121. Say(NPC, "Please, take the proof to Lieutenant Charlin. The Qeynos Guard must be alerted.", Spawn)
  122. end
  123. end
  124. function TreesCleansed(NPC, Spawn)
  125. FaceTarget(NPC, Spawn)
  126. conversation = CreateConversation()
  127. AddConversationOption(conversation, "Yes, I did. I got his paw.", "GotPaw")
  128. StartConversation(conversation, NPC, Spawn, "Good, good. It is a small step for us, but an important one. Did you encounter any gnolls?")
  129. end
  130. function GotPaw(NPC, Spawn)
  131. SetStepComplete(Spawn, QUEST_1, 4)
  132. FaceTarget(NPC, Spawn)
  133. conversation = CreateConversation()
  134. AddConversationOption(conversation, "You're welcome.")
  135. StartConversation(conversation, NPC, Spawn, "Now the Qeynos Guard will have to believe me. Show the paw to Lieutenant Charlin. I'm sure it will interest him greatly. Thank you, " .. GetName(Spawn) .. ", for what you've done. ")
  136. end