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