LiegeAquila.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  1. --[[
  2. Script Name : SpawnScripts/Sprawl/LiegeAquila.lua
  3. Script Purpose : Liege Aquila <Freeport Militia>
  4. Script Author : Scatman
  5. Script Date : 2008.09.29
  6. Script Notes :
  7. --]]
  8. local QUEST_1 = 261 -- repeatable
  9. function spawn(NPC)
  10. ProvidesQuest(NPC, QUEST_1)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. RandomVoiceOver(NPC, Spawn)
  19. if HasCompletedQuest(Spawn, QUEST_1) then
  20. YouveDoneWell(NPC, Spawn, conversation)
  21. elseif HasQuest(Spawn, QUEST_1) then
  22. OnQuest1(NPC, Spawn, conversation)
  23. else
  24. Greetings(NPC, Spawn, conversation)
  25. end
  26. --[[
  27. if convo==5 then
  28. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0, Spawn)
  29. AddConversationOption(conversation, "What duty is that?", "dlg_5_1")
  30. AddConversationOption(conversation, "Sorry, but I have other things I must do.")
  31. StartConversation(conversation, NPC, Spawn, "Greetings, citizen. Are you prepared to do your duty for the Freeport Militia?")
  32. end
  33. if convo==6 then
  34. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  35. AddConversationOption(conversation, "What duty is that?", "dlg_6_1")
  36. AddConversationOption(conversation, "Sorry, but I have other things I must do.")
  37. StartConversation(conversation, NPC, Spawn, "Greetings, citizen. Are you prepared to do your duty for the Freeport Militia?")
  38. end
  39. if convo==10 then
  40. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  41. AddConversationOption(conversation, "I took care of a number of those troublemakers.", "dlg_10_1")
  42. AddConversationOption(conversation, "Not yet, Aquila.")
  43. StartConversation(conversation, NPC, Spawn, "Did you teach the Black Magi who is in charge of Freeport?")
  44. end
  45. if convo==11 then
  46. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0, Spawn)
  47. AddConversationOption(conversation, "I am ready to attack those troublemakers again!", "dlg_11_1")
  48. AddConversationOption(conversation, "I'll take up this cause later.")
  49. StartConversation(conversation, NPC, Spawn, "Your efforts to control the Black Magi have been helpful, but more work remains to be done.")
  50. end
  51. if convo==15 then
  52. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0, Spawn)
  53. end
  54. if convo==16 then
  55. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  56. AddConversationOption(conversation, "I guess I need to kill more Dervish, eh?", "dlg_16_1")
  57. AddConversationOption(conversation, "I think I've had enough.")
  58. StartConversation(conversation, NPC, Spawn, "You've done well for the Freeport Militia so far, but your job isn't over yet, you know.")
  59. end
  60. if convo==20 then
  61. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  62. AddConversationOption(conversation, "I taught those crooks a lesson.", "dlg_20_1")
  63. AddConversationOption(conversation, "Not yet.")
  64. StartConversation(conversation, NPC, Spawn, "So, did you strike some fear into the hearts of the Dervish?")
  65. end
  66. if convo==21 then
  67. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  68. AddConversationOption(conversation, "I guess I need to kill more Dervish, eh?", "dlg_21_1")
  69. AddConversationOption(conversation, "I think I've had enough.")
  70. StartConversation(conversation, NPC, Spawn, "You've done well for the Freeport Militia so far, but your job isn't over yet, you know.")
  71. end
  72. if convo==22 then
  73. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0, Spawn)
  74. AddConversationOption(conversation, "Not yet.", "dlg_22_1")
  75. StartConversation(conversation, NPC, Spawn, "So, did you strike some fear into the hearts of the Dervish?")
  76. end
  77. if convo==31 then
  78. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0, Spawn)
  79. AddConversationOption(conversation, "I taught those crooks a lesson.", "dlg_31_1")
  80. AddConversationOption(conversation, "Not yet.")
  81. StartConversation(conversation, NPC, Spawn, "So, did you strike some fear into the hearts of the Dervish?")
  82. end
  83. --]]
  84. end
  85. function RandomVoiceOver(NPC, Spawn)
  86. local choice = math.random(1, 3)
  87. if choice == 1 then
  88. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_1_1004.mp3", "", "", 0, 0, Spawn)
  89. elseif choice == 2 then
  90. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_2_1004.mp3", "", "", 0, 0, Spawn)
  91. elseif choice == 3 then
  92. PlayFlavor(NPC, "voiceover/english/voice_emotes/greetings/greetings_3_1004.mp3", "", "", 0, 0, Spawn)
  93. end
  94. end
  95. ---------------------------------------------------------------------------------------------------------
  96. -- QUEST 1
  97. ---------------------------------------------------------------------------------------------------------
  98. function Greetings(NPC, Spawn, conversation)
  99. AddConversationOption(conversation, "What duty is that?", "dlg_6_1")
  100. AddConversationOption(conversation, "Sorry, but I have other things I must do.")
  101. StartConversation(conversation, NPC, Spawn, "Greetings, citizen. Are you prepared to do your duty for the Freeport Militia?")
  102. end
  103. function dlg_6_1(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. conversation = CreateConversation()
  106. AddConversationOption(conversation, "What do you mean?", "dlg_6_2")
  107. AddConversationOption(conversation, "I don't have time for this.")
  108. StartConversation(conversation, NPC, Spawn, "The gangs here in the Sprawl are out of control! Clearly it's time that the Militia took control of the situation. The Dreadnaughts aren't doing enough to maintain order.")
  109. end
  110. function dlg_6_2(NPC, Spawn)
  111. FaceTarget(NPC, Spawn)
  112. conversation = CreateConversation()
  113. AddConversationOption(conversation, "I will perform my duty for Freeport.", "dlg_6_3")
  114. AddConversationOption(conversation, "Not really.")
  115. StartConversation(conversation, NPC, Spawn, "The Dreadnaughts are supposed to have the run of this place, but in my opinion things would be better if the Militia came here in force and took over. Are you willing to help us do that?")
  116. end
  117. function dlg_6_3(NPC, Spawn)
  118. FaceTarget(NPC, Spawn)
  119. conversation = CreateConversation()
  120. AddConversationOption(conversation, "I'll do it.", "OfferQuest1")
  121. AddConversationOption(conversation, "Maybe later.")
  122. StartConversation(conversation, NPC, Spawn, "We need to handle some of these Dervish. They've infested the Sprawl from their bandit camps in the Commonlands. We've got to show them who's in charge around here! I think it will take a few sweeps to really strike fear into them.")
  123. end
  124. function OfferQuest1(NPC, Spawn)
  125. FaceTarget(NPC, Spawn)
  126. OfferQuest(NPC, Spawn, QUEST_1)
  127. end
  128. function OnQuest1(NPC, Spawn, conversation)
  129. if GetQuestStep(Spawn, QUEST_1) == 2 then
  130. AddConversationOption(conversation, "I taught those crooks a lesson.", "dlg_15_1")
  131. end
  132. AddConversationOption(conversation, "Not yet.")
  133. StartConversation(conversation, NPC, Spawn, "So, did you strike some fear into the hearts of the Dervish?")
  134. end
  135. function dlg_15_1(NPC, Spawn)
  136. SetStepComplete(Spawn, QUEST_1, 2)
  137. FaceTarget(NPC, Spawn)
  138. conversation = CreateConversation()
  139. AddConversationOption(conversation, "I will return.")
  140. StartConversation(conversation, NPC, Spawn, "Well done. You show some potential as a worthy servant of the Freeport Militia. Return to me when you are ready for another assignment.")
  141. end
  142. ---------------------------------------------------------------------------------------------------------
  143. -- QUEST 2
  144. ---------------------------------------------------------------------------------------------------------
  145. function YouveDoneWell(NPC, Spawn, conversation)
  146. AddConversationOption(conversation, "I'm ready for a new assignment.", "dlg_6_3")
  147. AddConversationOption(conversation, "I think I've had enough.")
  148. StartConversation(conversation, NPC, Spawn, "You've done well for the Freeport Militia so far, but your job isn't over yet, you know.")
  149. end
  150. function dlg_1_1(NPC, Spawn)
  151. FaceTarget(NPC, Spawn)
  152. conversation = CreateConversation()
  153. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  154. AddConversationOption(conversation, "I'll help out.", "dlg_1_2")
  155. AddConversationOption(conversation, "That's not my problem.")
  156. StartConversation(conversation, NPC, Spawn, "It's not only the Dervish causing problems here. The Black Magi, a secretive group of ratonga, are causing havoc in the streets. We can't allow them to dominate the Sprawl!")
  157. end
  158. function dlg_1_2(NPC, Spawn)
  159. FaceTarget(NPC, Spawn)
  160. conversation = CreateConversation()
  161. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  162. AddConversationOption(conversation, "I understand the risks.", "dlg_1_3")
  163. AddConversationOption(conversation, "I'll think about it.")
  164. StartConversation(conversation, NPC, Spawn, "Strike some fear into those rogue ratonga. Be careful, though. At first they won't pester you much, but once they notice you've been attacking their kind, they'll be out for your blood!")
  165. end
  166. function dlg_1_3(NPC, Spawn)
  167. FaceTarget(NPC, Spawn)
  168. conversation = CreateConversation()
  169. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  170. AddConversationOption(conversation, "I will do so.", "dlg_1_4")
  171. StartConversation(conversation, NPC, Spawn, "Excellent. Report back when you've put the Black Magi in their place.")
  172. end
  173. function dlg_10_1(NPC, Spawn)
  174. FaceTarget(NPC, Spawn)
  175. conversation = CreateConversation()
  176. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  177. AddConversationOption(conversation, "Thank you. I'll check back for more work.", "dlg_10_2")
  178. StartConversation(conversation, NPC, Spawn, "Good. Gangs like that must be kept in line for the sake of Freeport. A job well done, citizen. Check back with me to see if I have more assignments for you.")
  179. end
  180. function dlg_11_1(NPC, Spawn)
  181. FaceTarget(NPC, Spawn)
  182. conversation = CreateConversation()
  183. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  184. AddConversationOption(conversation, "I understand the risks.", "dlg_11_2")
  185. AddConversationOption(conversation, "I'll think about it.")
  186. StartConversation(conversation, NPC, Spawn, "Strike some fear into those rogue ratonga. Be careful, though. At first they won't pester you much, but once they notice you've been attacking their kind, they'll be out for your blood!")
  187. end
  188. function dlg_11_2(NPC, Spawn)
  189. FaceTarget(NPC, Spawn)
  190. conversation = CreateConversation()
  191. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  192. AddConversationOption(conversation, "I will do so.", "dlg_11_3")
  193. StartConversation(conversation, NPC, Spawn, "Excellent. Report back when you've put the Black Magi in their place.")
  194. end
  195. function dlg_16_1(NPC, Spawn)
  196. FaceTarget(NPC, Spawn)
  197. conversation = CreateConversation()
  198. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  199. AddConversationOption(conversation, "I'll do it.", "dlg_16_2")
  200. AddConversationOption(conversation, "Maybe later.")
  201. StartConversation(conversation, NPC, Spawn, "We need to handle some of these Dervish. They've infested the Sprawl from their bandit camps in the Commonlands. We've got to show them who's in charge around here! I think it will take a few sweeps to really strike fear into them.")
  202. end
  203. function dlg_16_2(NPC, Spawn)
  204. FaceTarget(NPC, Spawn)
  205. conversation = CreateConversation()
  206. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  207. AddConversationOption(conversation, "I will do so.", "dlg_16_3")
  208. StartConversation(conversation, NPC, Spawn, "Glad to hear it. Defeat them and return to me for your payment.")
  209. end
  210. function dlg_20_1(NPC, Spawn)
  211. FaceTarget(NPC, Spawn)
  212. conversation = CreateConversation()
  213. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  214. AddConversationOption(conversation, "I will return.", "dlg_20_2")
  215. StartConversation(conversation, NPC, Spawn, "Well done. You show some potential as a worthy servant of the Freeport Militia. Return to me when you are ready for another assignment.")
  216. end
  217. function dlg_21_1(NPC, Spawn)
  218. FaceTarget(NPC, Spawn)
  219. conversation = CreateConversation()
  220. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  221. AddConversationOption(conversation, "I'll do it.", "dlg_21_2")
  222. AddConversationOption(conversation, "Maybe later.")
  223. StartConversation(conversation, NPC, Spawn, "We need to handle some of these Dervish. They've infested the Sprawl from their bandit camps in the Commonlands. We've got to show them who's in charge around here! I think it will take a few sweeps to really strike fear into them.")
  224. end
  225. function dlg_21_2(NPC, Spawn)
  226. FaceTarget(NPC, Spawn)
  227. conversation = CreateConversation()
  228. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  229. AddConversationOption(conversation, "I will do so.", "dlg_21_3")
  230. StartConversation(conversation, NPC, Spawn, "Glad to hear it. Defeat them and return to me for your payment.")
  231. end
  232. function dlg_31_1(NPC, Spawn)
  233. FaceTarget(NPC, Spawn)
  234. conversation = CreateConversation()
  235. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  236. AddConversationOption(conversation, "I will return.", "dlg_31_2")
  237. StartConversation(conversation, NPC, Spawn, "Well done. You show some potential as a worthy servant of the Freeport Militia. Return to me when you are ready for another assignment.")
  238. end