ClericMaraVaen.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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. --Temp Fix for Cleric.
  11. function spawn(NPC)
  12. SetLuaBrain(NPC)
  13. SetBrainTick(NPC, 500)
  14. Think(NPC, Spawn)
  15. ProvidesQuest(NPC, TheSourceOfEvil)
  16. SetTempVariable(NPC, "ResetTimer", "1")
  17. AddTimer(NPC, 10000, "TimerClear") --Temp Fix for Cleric. Allows reset after 10 seconds.
  18. end
  19. function respawn(NPC)
  20. spawn(NPC)
  21. end
  22. function TimerClear(NPC)
  23. SetTempVariable(NPC, "ResetTimer", nil)
  24. end
  25. -- Brain override
  26. function Think(NPC)
  27. local mostHated = GetMostHated(NPC)
  28. if mostHated ~= nil then
  29. aggro(NPC, mostHated)
  30. --Attack(NPC, mostHated)
  31. end
  32. end
  33. -- Should only cast on lost scouts (ghost version)
  34. function aggro(NPC, Spawn)
  35. --[[ Say(NPC, "In aggro()") --]]
  36. if GetTempVariable(NPC, "CASTING") ~= "True" then
  37. --[[ Say(NPC, "Casting spell") --]]
  38. SetTempVariable(NPC, "CASTING", "True")
  39. CastSpell(Spawn, 130027, 1, NPC)
  40. AddTimer(NPC, 1610, "FinishedCasting")
  41. end
  42. end
  43. -- Timer callback to allow casting again
  44. function FinishedCasting(NPC)
  45. SetTempVariable(NPC, "CASTING", "False")
  46. end
  47. function hailed(NPC, Spawn)
  48. FaceTarget(NPC, Spawn)
  49. conversation = CreateConversation()
  50. if HasCompletedQuest(Spawn, JoiningTheForwardRanks) then
  51. if HasCompletedQuest(Spawn, TheSourceOfEvil) then
  52. ThanksForHelp(Spawn, NPC, true)
  53. elseif HasQuest(Spawn, TheSourceOfEvil) then
  54. ThanksForHelp(Spawn, NPC, true)
  55. else
  56. ThanksForHelp(Spawn, NPC, false)
  57. end
  58. elseif HasQuest(Spawn, JoiningTheForwardRanks) then
  59. if GetQuestStep(Spawn, JoiningTheForwardRanks) == 1 then
  60. DoNotFret(NPC, Spawn)
  61. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 2 then
  62. KeepTrying(NPC, Spawn)
  63. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 3 then
  64. GreatGame(NPC, Spawn)
  65. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 4 then
  66. ClearMorak(NPC, Spawn)
  67. elseif GetQuestStep(Spawn, JoiningTheForwardRanks) == 5 then
  68. QuestComplete(NPC, Spawn)
  69. end
  70. else
  71. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen011.mp3", "", "", 1665452069, 4059457198, Spawn)
  72. AddConversationOption(conversation, "Okay.")
  73. 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.")
  74. end
  75. end
  76. function ClericReset(NPC)
  77. PlayFlavor(NPC, "", "Hold on! Getting ready!", "", 0, 0, Spawn)
  78. Despawn(NPC)
  79. SpawnByLocationID(GetZone(NPC), 1584884)
  80. end
  81. function DoNotFret(NPC, Spawn)
  82. FaceTarget(NPC, Spawn)
  83. conversation = CreateConversation()
  84. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen001.mp3", "", "nod", 2971501331, 3435878603, Spawn)
  85. AddConversationOption(conversation, "I guess you know me?", "dlg_20_1")
  86. AddConversationOption(conversation, "Nice to meet you, too.")
  87. StartConversation(conversation, NPC, Spawn, "Do not fret, " .. GetName(Spawn) .. ". The hand of Qeynos reaches far and wide to help those in need.")
  88. end
  89. function dlg_20_1(NPC, Spawn)
  90. FaceTarget(NPC, Spawn)
  91. conversation = CreateConversation()
  92. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen002.mp3", "", "chuckle", 2633924079, 3010054159, Spawn)
  93. AddConversationOption(conversation, "I'm ready.", "dlg_20_2")
  94. AddConversationOption(conversation, "I don't think I'm ready.")
  95. 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.")
  96. end
  97. function dlg_20_2(NPC, Spawn)
  98. SetStepComplete(Spawn, JoiningTheForwardRanks, 1)
  99. FaceTarget(NPC, Spawn)
  100. conversation = CreateConversation()
  101. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen003.mp3", "", "nod", 929576879, 4035132590, Spawn)
  102. AddConversationOption(conversation, "I'll do my best.")
  103. 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.")
  104. end
  105. function KeepTrying(NPC, Spawn)
  106. FaceTarget(NPC, Spawn)
  107. conversation = CreateConversation()
  108. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen004.mp3", "", "beckon", 873884307, 3834280576, Spawn)
  109. if GetTempVariable(NPC, "ResetTimer") ~= nil then --Temp Fix for Cleric.
  110. AddConversationOption(conversation, "Get ready!","ClericReset")
  111. end
  112. AddConversationOption(conversation, "I'll keep trying.")
  113. StartConversation(conversation, NPC, Spawn, "Keep trying, I believe we can save more scouts if you get them close to me.")
  114. end
  115. function GreatGame(NPC, Spawn)
  116. FaceTarget(NPC, Spawn)
  117. conversation = CreateConversation()
  118. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen005.mp3", "", "", 1882665589, 1902293914, Spawn)
  119. AddConversationOption(conversation, "Bring it on!", "dlg_21_1")
  120. AddConversationOption(conversation, "I'll be right back.")
  121. StartConversation(conversation, NPC, Spawn, "That was a great game of cat and mouse you pulled there! Nice job, but now for the hard part.")
  122. end
  123. function dlg_21_1(NPC, Spawn)
  124. SetStepComplete(Spawn, JoiningTheForwardRanks, 3)
  125. FaceTarget(NPC, Spawn)
  126. conversation = CreateConversation()
  127. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen006.mp3", "", "nod", 3734054586, 4057468106, Spawn)
  128. AddConversationOption(conversation, "I have a feeling I know where this is going.", "dlg_21_2")
  129. 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.")
  130. end
  131. function dlg_21_2(NPC, Spawn)
  132. FaceTarget(NPC, Spawn)
  133. conversation = CreateConversation()
  134. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen007.mp3", "", "", 519840211, 2908756618, Spawn)
  135. AddConversationOption(conversation, "Consider it done.")
  136. 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.")
  137. end
  138. function ClearMorak(NPC, Spawn)
  139. FaceTarget(NPC, Spawn)
  140. conversation = CreateConversation()
  141. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen008.mp3", "", "", 307447635, 3375690454, Spawn)
  142. AddConversationOption(conversation, "I'm on my way.")
  143. StartConversation(conversation, NPC, Spawn, "The Morak need to be cleared so our scouts can push forward.")
  144. end
  145. function QuestComplete(NPC, Spawn)
  146. SetStepComplete(Spawn, JoiningTheForwardRanks, 5)
  147. FaceTarget(NPC, Spawn)
  148. conversation = CreateConversation()
  149. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen009.mp3", "", "thanks", 72596140, 1372143516, Spawn)
  150. AddConversationOption(conversation, "Is there anything else I can do?", "AnythingElse")
  151. AddConversationOption(conversation, "You're welcome.")
  152. 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) .. ".")
  153. end
  154. ------------------------------------------------------------------------------------------------------------------
  155. -- QUEST 5
  156. ------------------------------------------------------------------------------------------------------------------
  157. function AnythingElse(NPC, Spawn)
  158. FaceTarget(NPC, Spawn)
  159. conversation = CreateConversation()
  160. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen012.mp3", "", "nod", 2525989430, 544085949, Spawn)
  161. AddConversationOption(conversation, "So should I travel there?", "TravelThere")
  162. AddConversationOption(conversation, "I'll deal with this later.")
  163. 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.")
  164. end
  165. function TravelThere(NPC, Spawn)
  166. FaceTarget(NPC, Spawn)
  167. conversation = CreateConversation()
  168. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen013.mp3", "", "", 2720199838, 3131530763, Spawn)
  169. AddConversationOption(conversation, "On my way", "OfferQuest5")
  170. AddConversationOption(conversation, "I can't right now.")
  171. 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.")
  172. end
  173. function ThanksForHelp(Spawn, NPC, onNextQuest)
  174. FaceTarget(NPC, Spawn)
  175. conversation = CreateConversation()
  176. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen010.mp3", "", "thanks", 1827963300, 3132811539, Spawn)
  177. if onNextQuest == false then
  178. AddConversationOption(conversation, "Is there anything else I can do?", "AnythingElse")
  179. end
  180. AddConversationOption(conversation, "And also with you.")
  181. StartConversation(conversation, NPC, Spawn, "Thank you for your help. Peace be with you.")
  182. end
  183. function OfferQuest5(NPC, Spawn)
  184. OfferQuest(NPC, Spawn, TheSourceOfEvil)
  185. end
  186. --[[ raw_conversations
  187. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1011.mp3", "", "", 0, 0)
  188. --]]
  189. --[[
  190. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen003.mp3", "", "", 929576879, 4035132590, Spawn)
  191. AddConversationOption(conversation, "I'll do my best.", "dlg_20_3")
  192. 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.")
  193. function dlg_21_1(NPC, Spawn)
  194. FaceTarget(NPC, Spawn)
  195. conversation = CreateConversation()
  196. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen006.mp3", "", "", 3734054586, 4057468106, Spawn)
  197. AddConversationOption(conversation, "I have a feeling I know where this is going.", "dlg_21_2")
  198. 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.")
  199. end
  200. function dlg_21_2(NPC, Spawn)
  201. FaceTarget(NPC, Spawn)
  202. conversation = CreateConversation()
  203. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen007.mp3", "", "", 519840211, 2908756618, Spawn)
  204. AddConversationOption(conversation, "Consider it done.", "dlg_21_3")
  205. 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.")
  206. end
  207. --]]