9
3

ClericMaraVaen.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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)
  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", "", "nod", 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", "", "chuckle", 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", "", "nod", 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. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen004.mp3", "", "beckon", 873884307, 3834280576, Spawn)
  98. AddConversationOption(conversation, "I'll keep trying.")
  99. StartConversation(conversation, NPC, Spawn, "Keep trying, I believe we can save more scouts if you get them close to me.")
  100. end
  101. function GreatGame(NPC, Spawn)
  102. FaceTarget(NPC, Spawn)
  103. conversation = CreateConversation()
  104. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen005.mp3", "", "", 1882665589, 1902293914, Spawn)
  105. AddConversationOption(conversation, "Bring it on!", "dlg_21_1")
  106. AddConversationOption(conversation, "I'll be right back.")
  107. StartConversation(conversation, NPC, Spawn, "That was a great game of cat and mouse you pulled there! Nice job, but now for the hard part.")
  108. end
  109. function dlg_21_1(NPC, Spawn)
  110. SetStepComplete(Spawn, JoiningTheForwardRanks, 3)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen006.mp3", "", "nod", 3734054586, 4057468106, Spawn)
  114. AddConversationOption(conversation, "I have a feeling I know where this is going.", "dlg_21_2")
  115. 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.")
  116. end
  117. function dlg_21_2(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. conversation = CreateConversation()
  120. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen007.mp3", "", "", 519840211, 2908756618, Spawn)
  121. AddConversationOption(conversation, "Consider it done.")
  122. 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.")
  123. end
  124. function ClearMorak(NPC, Spawn)
  125. FaceTarget(NPC, Spawn)
  126. conversation = CreateConversation()
  127. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen008.mp3", "", "", 307447635, 3375690454, Spawn)
  128. AddConversationOption(conversation, "I'm on my way.")
  129. StartConversation(conversation, NPC, Spawn, "The Morak need to be cleared so our scouts can push forward.")
  130. end
  131. function QuestComplete(NPC, Spawn)
  132. SetStepComplete(Spawn, JoiningTheForwardRanks, 5)
  133. FaceTarget(NPC, Spawn)
  134. conversation = CreateConversation()
  135. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen009.mp3", "", "thanks", 72596140, 1372143516, Spawn)
  136. AddConversationOption(conversation, "Is there anything else I can do?", "AnythingElse")
  137. AddConversationOption(conversation, "You're welcome.")
  138. 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) .. ".")
  139. end
  140. ------------------------------------------------------------------------------------------------------------------
  141. -- QUEST 5
  142. ------------------------------------------------------------------------------------------------------------------
  143. function AnythingElse(NPC, Spawn)
  144. FaceTarget(NPC, Spawn)
  145. conversation = CreateConversation()
  146. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen012.mp3", "", "nod", 2525989430, 544085949, Spawn)
  147. AddConversationOption(conversation, "So should I travel there?", "TravelThere")
  148. AddConversationOption(conversation, "I'll deal with this later.")
  149. 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.")
  150. end
  151. function TravelThere(NPC, Spawn)
  152. FaceTarget(NPC, Spawn)
  153. conversation = CreateConversation()
  154. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen013.mp3", "", "", 2720199838, 3131530763, Spawn)
  155. AddConversationOption(conversation, "On my way", "OfferQuest5")
  156. AddConversationOption(conversation, "I can't right now.")
  157. 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.")
  158. end
  159. function ThanksForHelp(Spawn, NPC, onNextQuest)
  160. FaceTarget(NPC, Spawn)
  161. conversation = CreateConversation()
  162. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen010.mp3", "", "thanks", 1827963300, 3132811539, Spawn)
  163. if onNextQuest == false then
  164. AddConversationOption(conversation, "Is there anything else I can do?", "AnythingElse")
  165. end
  166. AddConversationOption(conversation, "And also with you.")
  167. StartConversation(conversation, NPC, Spawn, "Thank you for your help. Peace be with you.")
  168. end
  169. function OfferQuest5(NPC, Spawn)
  170. OfferQuest(NPC, Spawn, TheSourceOfEvil)
  171. end
  172. --[[ raw_conversations
  173. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1011.mp3", "", "", 0, 0)
  174. --]]
  175. --[[
  176. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen003.mp3", "", "", 929576879, 4035132590, Spawn)
  177. AddConversationOption(conversation, "I'll do my best.", "dlg_20_3")
  178. 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.")
  179. function dlg_21_1(NPC, Spawn)
  180. FaceTarget(NPC, Spawn)
  181. conversation = CreateConversation()
  182. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen006.mp3", "", "", 3734054586, 4057468106, Spawn)
  183. AddConversationOption(conversation, "I have a feeling I know where this is going.", "dlg_21_2")
  184. 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.")
  185. end
  186. function dlg_21_2(NPC, Spawn)
  187. FaceTarget(NPC, Spawn)
  188. conversation = CreateConversation()
  189. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/cleric_mara_vaen/tutorial_island02_revamp/quests/citizenship/clericmaravaen/clericmaravaen007.mp3", "", "", 519840211, 2908756618, Spawn)
  190. AddConversationOption(conversation, "Consider it done.", "dlg_21_3")
  191. 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.")
  192. end
  193. --]]