9
3

ClericMaraVaen.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. --[[
  2. Script Name : SpawnScripts/QueensColony/ClericMaraVaen.lua
  3. Script Purpose : Cleric Mara'Vaen
  4. Script Author : John Adams
  5. Script Date : 2008.09.20
  6. Script Notes : Auto-Generated Conversation from PacketParser Data
  7. --]]
  8. local JoiningTheForwardRanks = 163
  9. local TheSourceOfEvil = 164
  10. function spawn(NPC)
  11. SetLuaBrain(NPC)
  12. SetBrainTick(NPC, 500)
  13. Think(NPC, Spawn)
  14. ProvidesQuest(NPC, TheSourceOfEvil)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. -- Brain override
  20. function Think(NPC, Spawn)
  21. local mostHated = GetMostHated(NPC)
  22. if mostHated ~= nil then
  23. --[[ Say(NPC, "Has most hated") --]]
  24. aggro(NPC, mostHated)
  25. end
  26. end
  27. -- Should only cast on lost scouts (ghost version)
  28. function aggro(NPC, Spawn)
  29. --[[ Say(NPC, "In aggro()") --]]
  30. if GetTempVariable(NPC, "CASTING") ~= "True" then
  31. --[[ Say(NPC, "Casting spell") --]]
  32. SetTempVariable(NPC, "CASTING", "True")
  33. CastSpell(Spawn, 130027, 1, NPC)
  34. AddTimer(NPC, 1610, "FinishedCasting")
  35. end
  36. end
  37. -- Timer callback to allow casting again
  38. function FinishedCasting(NPC)
  39. SetTempVariable(NPC, "CASTING", "False")
  40. end
  41. function hailed(NPC, Spawn)
  42. FaceTarget(NPC, Spawn)
  43. conversation = CreateConversation()
  44. if HasCompletedQuest(Spawn, JoiningTheForwardRanks) then
  45. if HasCompletedQuest(Spawn, TheSourceOfEvil) then
  46. ThanksForHelp(Spawn, NPC, true)
  47. elseif HasQuest(Spawn, TheSourceOfEvil) then
  48. ThanksForHelp(Spawn, NPC, true)
  49. else
  50. ThanksForHelp(Spawn, NPC, false)
  51. end
  52. elseif HasQuest(Spawn, JoiningTheForwardRanks) then
  53. if GetQuestStep(Spawn, JoiningTheForwardRanks) == 1 then
  54. DoNotFret(NPC, Spawn)
  55. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 2 then
  56. KeepTrying(NPC, Spawn)
  57. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 3 then
  58. GreatGame(NPC, Spawn)
  59. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 4 then
  60. ClearMorak(NPC, Spawn)
  61. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 5 then
  62. QuestComplete(NPC, Spawn)
  63. end
  64. else
  65. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen011.mp3", "", "", 1665452069, 4059457198, Spawn)
  66. AddConversationOption(conversation, "Okay.")
  67. StartConversation(conversation, NPC, Spawn, "I don't have any tasks for you yet. Speak with Murrar Shar outside of Myrrin's Tower. He should have some tasks for you.")
  68. end
  69. end
  70. function DoNotFret(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. conversation = CreateConversation()
  73. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen001.mp3", "", "", 2971501331, 3435878603, Spawn)
  74. AddConversationOption(conversation, "I guess you know me?", "dlg_20_1")
  75. AddConversationOption(conversation, "Nice to meet you, too.")
  76. StartConversation(conversation, NPC, Spawn, "Do not fret, " .. GetName(Spawn) .. ". The hand of Qeynos reaches far and wide to help those in need.")
  77. end
  78. function dlg_20_1(NPC, Spawn)
  79. FaceTarget(NPC, Spawn)
  80. conversation = CreateConversation()
  81. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen002.mp3", "", "", 2633924079, 3010054159, Spawn)
  82. AddConversationOption(conversation, "I'm ready.", "dlg_20_2")
  83. AddConversationOption(conversation, "I don't think I'm ready.")
  84. StartConversation(conversation, NPC, Spawn, "Murrar sent word that you were coming. He said to be nice, hehe! No worries, I mean only the best. In any case, I'll be doing most of the work for this first task, when you're ready.")
  85. end
  86. function dlg_20_2(NPC, Spawn)
  87. SetStepComplete(Spawn, JoiningTheForwardRanks, 1)
  88. FaceTarget(NPC, Spawn)
  89. conversation = CreateConversation()
  90. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen003.mp3", "", "", 929576879, 4035132590, Spawn)
  91. AddConversationOption(conversation, "I'll do my best.")
  92. StartConversation(conversation, NPC, Spawn, "You see those ghostly figures down in the canyon? Those are the souls of our scouts who were lost and consumed by evil. I believe that they may be trapped between our world and the next. I think I can resurrect them, if you can just lure them close to me.")
  93. end
  94. function KeepTrying(NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. conversation = CreateConversation()
  97. AddConversationOption(conversation, "I'll keep trying.")
  98. StartConversation(conversation, NPC, Spawn, "Keep trying, I believe we can save more scouts if you get them close to me.")
  99. end
  100. function GreatGame(NPC, Spawn)
  101. FaceTarget(NPC, Spawn)
  102. conversation = CreateConversation()
  103. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen005.mp3", "", "", 1882665589, 1902293914, Spawn)
  104. AddConversationOption(conversation, "Bring it on!", "dlg_21_1")
  105. AddConversationOption(conversation, "I'll be right back.")
  106. StartConversation(conversation, NPC, Spawn, "That was a great game of cat and mouse you pulled there! Nice job, but now for the hard part.")
  107. end
  108. function dlg_21_1(NPC, Spawn)
  109. SetStepComplete(Spawn, JoiningTheForwardRanks, 3)
  110. FaceTarget(NPC, Spawn)
  111. conversation = CreateConversation()
  112. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen006.mp3", "", "", 3734054586, 4057468106, Spawn)
  113. AddConversationOption(conversation, "I have a feeling I know where this is going.", "dlg_21_2")
  114. StartConversation(conversation, NPC, Spawn, "Long ago there lived a ferocious breed on this island, a species of dire wolf that the Sapswill called 'the Morak.' The Morak were cleansed from the island so it could be a safer place.")
  115. end
  116. function dlg_21_2(NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. conversation = CreateConversation()
  119. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen007.mp3", "", "", 519840211, 2908756618, Spawn)
  120. AddConversationOption(conversation, "Consider it done.")
  121. StartConversation(conversation, NPC, Spawn, "The evil that builds on the island has drawn them from their graves and they hunt again. They are thick through Dead Canyon and we need to clear a path for our scouts to move forward.")
  122. end
  123. function ClearMorak(NPC, Spawn)
  124. FaceTarget(NPC, Spawn)
  125. conversation = CreateConversation()
  126. AddConversationOption(conversation, "I'm on my way.")
  127. StartConversation(conversation, NPC, Spawn, "The Morak need to be cleared so our scouts can push forward.")
  128. end
  129. function QuestComplete(NPC, Spawn)
  130. SetStepComplete(Spawn, JoiningTheForwardRanks, 5)
  131. FaceTarget(NPC, Spawn)
  132. conversation = CreateConversation()
  133. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen009.mp3", "", "", 72596140, 1372143516, Spawn)
  134. AddConversationOption(conversation, "Is there anything else I can do?", "AnythingElse")
  135. AddConversationOption(conversation, "You're welcome.")
  136. StartConversation(conversation, NPC, Spawn, "You did it, I knew you could! Our scouts were able to clear through to the far side of the village. I'll send word back to Murrar. Thank you, " .. GetName(Spawn) .. ".")
  137. end
  138. ------------------------------------------------------------------------------------------------------------------
  139. -- QUEST 5
  140. ------------------------------------------------------------------------------------------------------------------
  141. function AnythingElse(NPC, Spawn)
  142. FaceTarget(NPC, Spawn)
  143. conversation = CreateConversation()
  144. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen012.mp3", "", "", 2525989430, 544085949, Spawn)
  145. AddConversationOption(conversation, "So should I travel there?", "TravelThere")
  146. AddConversationOption(conversation, "I'll deal with this later.")
  147. StartConversation(conversation, NPC, Spawn, "The few scouts that broke through to the Sapswill village report a twist in this evil plot. Apparently the goblins are victims of the evil as well. A few goblins survived some sort of an attack on their village and are being held at a scout camp that has been set up on its outskirts.")
  148. end
  149. function TravelThere(NPC, Spawn)
  150. FaceTarget(NPC, Spawn)
  151. conversation = CreateConversation()
  152. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen013.mp3", "", "", 2720199838, 3131530763, Spawn)
  153. AddConversationOption(conversation, "On my way", "OfferQuest5")
  154. AddConversationOption(conversation, "I can't right now.")
  155. StartConversation(conversation, NPC, Spawn, "Yes, seek out Sorcerer Oofala. He is charged with protecting the camp there and should have more information. The camp is in an alcove on the far east side of the Abandoned Village. You will need to traverse around the Village to get to the camp. Good luck.")
  156. end
  157. function ThanksForHelp(Spawn, NPC, onNextQuest)
  158. FaceTarget(NPC, Spawn)
  159. conversation = CreateConversation()
  160. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen010.mp3", "", "", 1827963300, 3132811539, Spawn)
  161. if onNextQuest == false then
  162. AddConversationOption(conversation, "Is there anything else I can do?", "AnythingElse")
  163. end
  164. AddConversationOption(conversation, "And also with you.")
  165. StartConversation(conversation, NPC, Spawn, "Thank you for your help. Peace be with you.")
  166. end
  167. function OfferQuest5(NPC, Spawn)
  168. OfferQuest(NPC, Spawn, TheSourceOfEvil)
  169. end
  170. --[[ raw_conversations
  171. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1011.mp3", "", "", 0, 0)
  172. --]]
  173. --[[
  174. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen003.mp3", "", "", 929576879, 4035132590, Spawn)
  175. AddConversationOption(conversation, "I'll do my best.", "dlg_20_3")
  176. StartConversation(conversation, NPC, Spawn, "You see those ghostly figures down in the canyon? Those are the souls of our scouts who were lost and consumed by evil. I believe that they may be trapped between our world and the next. I think I can resurrect them, if you can just lure them close to me.")
  177. function dlg_21_1(NPC, Spawn)
  178. FaceTarget(NPC, Spawn)
  179. conversation = CreateConversation()
  180. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen006.mp3", "", "", 3734054586, 4057468106, Spawn)
  181. AddConversationOption(conversation, "I have a feeling I know where this is going.", "dlg_21_2")
  182. StartConversation(conversation, NPC, Spawn, "Long ago there lived a ferocious breed on this island, a species of dire wolf that the Sapswill called 'the Morak.' The Morak were cleansed from the island so it could be a safer place.")
  183. end
  184. function dlg_21_2(NPC, Spawn)
  185. FaceTarget(NPC, Spawn)
  186. conversation = CreateConversation()
  187. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen007.mp3", "", "", 519840211, 2908756618, Spawn)
  188. AddConversationOption(conversation, "Consider it done.", "dlg_21_3")
  189. StartConversation(conversation, NPC, Spawn, "The evil that builds on the island has drawn them from their graves and they hunt again. They are thick through Dead Canyon and we need to clear a path for our scouts to move forward.")
  190. end
  191. --]]