LiegeAquila.lua 14 KB

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