EmissaryMillia.lua 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. --[[
  2. Script Name : SpawnScripts/NorthFreeport/EmissaryMillia.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.06 05:10:10
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Quest1 = 5910
  10. local Bard = 5911
  11. local Predator = 5912
  12. local Rogue = 5913
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, Quest1)
  15. ProvidesQuest(NPC, Bard)
  16. ProvidesQuest(NPC, Predator)
  17. ProvidesQuest(NPC, Rogue)
  18. end
  19. function hailed(NPC, Spawn)
  20. local int = MakeRandomInt(1,3)
  21. FaceTarget(NPC, Spawn)
  22. Dialog.New(NPC, Spawn)
  23. Dialog.AddDialog("Are you certain you wish to speak to me? One of the Overlord's eyes? If you're not careful, you may find your coin pouch a bit lighter... in the name of the Overlord, of course.")
  24. Dialog.AddVoiceover("voiceover/english/voice_emotes/greetings/greetings_"..int.."_1043.mp3", 0, 0)
  25. PlayFlavor(NPC,"","","sniff",0,0,Spawn)
  26. if GetClass(Spawn)== 31 and GetLevel(Spawn)>=7 and not HasQuest(Spawn,Quest1) and not HasCompletedQuest(Spawn,Quest1) then
  27. Dialog.AddOption("I'd like to add to my repertoire of tricks. Maybe you're the one who could show me?","Dialog1")
  28. end
  29. if HasQuest(Spawn,Quest1) and GetQuestStep(Spawn,Quest1)==2 then
  30. Dialog.AddOption("I've cleared out some of the rust monsters. The sticky situation has been dealt with.","Dialog2")
  31. end
  32. if HasQuest(Spawn,Quest1) and GetQuestStep(Spawn,Quest1)==5 then
  33. Dialog.AddOption("The other bartender wasn't paying attention to his money. Here's a gold coin I swiped right from underneath his nose... I got this for you as proof.","Dialog3")
  34. end
  35. if HasQuest(Spawn,Quest1) and GetQuestStep(Spawn,Quest1)==7 then
  36. Dialog.AddOption("I was more than willing to slay the Darkblades on your behalf.","Dialog4")
  37. end
  38. if HasCompletedQuest(Spawn,Quest1) and not HasQuest(Spawn,Bard) and not HasQuest(Spawn,Rogue) and not HasQuest(Spawn,Predator) and GetClass(Spawn)==31 and GetLevel(Spawn) >= 9 then
  39. Dialog.AddOption("I think I understand what you're saying. Sooo... what should I do now??","Decide")
  40. end
  41. if HasQuest(Spawn,Rogue) and GetQuestStep(Spawn,Rogue)==2 then
  42. Dialog.AddOption("I managed to grab the lieutenant's orders out from under the watchful eye of the Qeynos guard. I'm sure they'll be put through some rigorous training after this to help them keep a sharper eye out in the future, but that's not my concern now!","RogueDone")
  43. end
  44. --[[ if not HasCompletedQuest(Spawn, Rogue) and not HasCompletedQuest(Spawn, Predator) and not HasCompletedQuest(Spawn, Bard) then
  45. Dialog.AddOption("I've got more important things to do than watch people. Good day.")
  46. else
  47. Dialog.AddOption("Never a dull moment with you, Counselor. Good to see you again.","RogueDone2")
  48. end]]--
  49. Dialog.AddOption("My coins are my business! I'm out of here.")
  50. Dialog.Start()
  51. end
  52. function Dialog1(NPC,Spawn)
  53. FaceTarget(NPC, Spawn)
  54. Dialog.New(NPC, Spawn)
  55. Dialog.AddDialog("Shifty eyes, spry fingers... yes... Yes!... Perhaps?... You... that ODER! Bleh!! Did you just come off a boat?! I've been looking to add some new skilled blood into the mix, but you still have sea water coming out of your ears! Do you think you can stomach some scouting tricks?")
  56. PlayFlavor(NPC, "", "", "stinky", 0, 0, Spawn)
  57. Dialog.AddOption("I bet I could run circles around you! Give me a challenge!","Quest1Offer")
  58. Dialog.AddOption("I'm still pouring water out of my shoes! Perhaps another time.")
  59. Dialog.Start()
  60. end
  61. function Quest1Offer(NPC,Spawn)
  62. FaceTarget(NPC, Spawn)
  63. OfferQuest(NPC,Spawn,Quest1)
  64. end
  65. function respawn(NPC)
  66. spawn(NPC)
  67. end
  68. function Dialog2(NPC,Spawn)
  69. FaceTarget(NPC, Spawn)
  70. Dialog.New(NPC, Spawn)
  71. Dialog.AddDialog("Anyone can defeat a mighty adversary in battle, but being remembered for it is an entirely different matter. A bard regales others with tales of the past through their melodies and stories. The bard who writes the past is the same one who guides the future. And don't forget all the attention you get, too! That's my favorite part!")
  72. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  73. Dialog.AddOption("That sounds easy! I'll wrap this up quick.","Dialog2a")
  74. Dialog.Start()
  75. end
  76. function Dialog2a(NPC,Spawn)
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. Dialog.AddDialog("Famous last words. You're young so I'm gonna give ya a break. A rogue is somethin' everyone needs. We are the ones who pick the locks, opening vast treasure chests or hallways that would otherwise go unexplored. Thieves are rogues that concentrate on their physical prowess. They can backstab or wield weapons effectively, and can sneak around things others might find impassable. Bards are rogues as well, but they concentrate on performing inspirational poems and songs to inspire themselves, and cause their enemies to despair.")
  80. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  81. Dialog.AddOption("Writting a song? What must I do?","Dialog2b")
  82. Dialog.Start()
  83. end
  84. function Dialog2b(NPC,Spawn)
  85. FaceTarget(NPC, Spawn)
  86. Dialog.New(NPC, Spawn)
  87. Dialog.AddDialog("I want you to go to a few of the taverns around the city and charm the patrons with your beautiful voice. Heheheee... You do have one, don't you? Go visit these two taverns and convince the bartenders that you're the life of the party. I don't care how you embarrass yourself -- sing a ballad, dance a jig -- just make them think you're an idiot. And if you don't, then no more tricks from me, got it?")
  88. PlayFlavor(NPC, "", "", "giggle", 0, 0, Spawn)
  89. Dialog.AddOption("Of course! I'll bring the tavern down.","Leg")
  90. Dialog.AddOption("I suppose I can improvise.","Leg")
  91. Dialog.AddOption("Uhh... wish me luck?","Leg")
  92. Dialog.Start()
  93. end
  94. function Leg(NPC,Spawn)
  95. SetStepComplete(Spawn,Quest1,2)
  96. PlayFlavor(NPC, "", "Break a leg!... Just don't break anyone's I know.", "wink", 0, 0, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. end
  99. function Dialog3(NPC,Spawn)
  100. FaceTarget(NPC, Spawn)
  101. Dialog.New(NPC, Spawn)
  102. Dialog.AddDialog("I'll take your word that you stole this from him. Well, since you pulled off the other tricks, I guess I teach you a few more. Instead of being a freelance rogue or a deceptive bard, you can also ply your trade as a hunter or a predator. After I show you the tricks they use, maybe you decide what kind of scout you wants to be.")
  103. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  104. Dialog.AddOption("What should I know about predators?","Dialog3a")
  105. Dialog.Start()
  106. end
  107. function Dialog3a(NPC,Spawn)
  108. FaceTarget(NPC, Spawn)
  109. Dialog.New(NPC, Spawn)
  110. Dialog.AddDialog("Predators are only happy when they are pursuing their quarry. Once they catch what they're tracking, well, the game's over, so they say. Therefore, a smart predator always finds something else to hunt down. If you've got a big imagination, then being a predator might be for you.")
  111. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  112. Dialog.AddOption("[Continue]","Dialog3b")
  113. Dialog.Start()
  114. end
  115. function Dialog3b(NPC,Spawn)
  116. SetStepComplete(Spawn,Quest1,5)
  117. FaceTarget(NPC, Spawn)
  118. Dialog.New(NPC, Spawn)
  119. Dialog.AddDialog("Predators stay in the shadows; they know that the best way to defeat an enemy is to sneak up on it and slit its throat! You can practice skulking by heading down into the sewer and looking for your competitors - the ones called the Darkblade Scouts. Hunt down some of these creatures and dispose of them before they even see you. ")
  120. Dialog.AddOption("Alright. They won't know what hit them.")
  121. Dialog.Start()
  122. end
  123. function Dialog4(NPC,Spawn)
  124. SetStepComplete(Spawn,Quest1,7)
  125. FaceTarget(NPC, Spawn)
  126. Dialog.New(NPC, Spawn)
  127. Dialog.AddDialog("Yes. yes. The Overlord will certainly be pleased to have a few less annoyances. Hopefully the hunt proved insightful enough to help you decide your next steps... A tavern will only take you so far.")
  128. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  129. Dialog.AddOption("I could go for a drink right about now.","Decide")
  130. Dialog.AddOption("A lie down sounds pretty nice right about now.","Decide")
  131. Dialog.AddOption("Perhaps. I'd rather go make a bit of coin anyway.","Decide")
  132. Dialog.Start()
  133. end
  134. function Decide(NPC,Spawn)
  135. if HasQuest(Spawn,Quest1) and GetQuestStep(Spawn,Quest1) ==7 then
  136. SetStepComplete(Spawn,Quest1,7)
  137. end
  138. FaceTarget(NPC, Spawn)
  139. Dialog.New(NPC, Spawn)
  140. Dialog.AddDialog("I didn't teach you the tricks of the trade just so you could waste my time! Choose a scouting technique and start practicing! Scouts are a silver a dozen around here. Some people with less class might even call them thieves. Is this what you want to be? A common thief? No! No! I think you know what you want to be. Am I right?")
  141. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  142. Dialog.AddOption("Thief is such a vulgar word. I think the term rogue is more to my liking.","Rogue2")
  143. Dialog.AddOption("I feel the bard's art of deception through entertainment is in my future.","Bard1")
  144. Dialog.AddOption("I confess - I enjoyed stalking my prey... a little too much, perhaps. I'm a predator at heart.","Predator1")
  145. Dialog.Start()
  146. end
  147. --ROGUE CLASS
  148. function Rogue1(NPC,Spawn)
  149. FaceTarget(NPC, Spawn)
  150. Dialog.New(NPC, Spawn)
  151. Dialog.AddDialog("One does not choose to be a rogue, but rather life makes that choice for them. Rogues live lives free of the bonds that society places on others. Tricky little fellows, rogues are always around when you need them. Look behind you and you just might find one... So, is this where you will focus your talents?")
  152. PlayFlavor(NPC, "", "", "no", 0, 0, Spawn)
  153. Dialog.AddOption("I'm pretty certain the life of a rogue will be quite... rewarding. Yes, I'm a rogue.","Rogue2")
  154. Dialog.AddOption("I'm not too sure anymore. Do you advise I specialize somewhere else?","Decide")
  155. Dialog.Start()
  156. end
  157. function Rogue2(NPC,Spawn)
  158. FaceTarget(NPC, Spawn)
  159. Dialog.New(NPC, Spawn)
  160. Dialog.AddDialog("Ahh, the life of the rogue! Stealth, cunning and wealth -- if you're successful in your endeavors. Why don't I arrange a test for you? We'll see if you have what it takes to be a thief.")
  161. PlayFlavor(NPC, "", "", "smirk", 0, 0, Spawn)
  162. Dialog.AddOption("Bring it on! I will pass any test you can muster.","RogueOffer")
  163. Dialog.AddOption("I'm not too sure anymore. Do you advise I specialize somewhere else?","Decide")
  164. Dialog.Start()
  165. end
  166. function RogueOffer(NPC,Spawn)
  167. FaceTarget(NPC, Spawn)
  168. OfferQuest(NPC,Spawn,Rogue)
  169. end
  170. function Rogue3(NPC,Spawn)
  171. FaceTarget(NPC, Spawn)
  172. Dialog.New(NPC, Spawn)
  173. Dialog.AddDialog("Grab their mission orders. The lieutenant will have them guarded. Knowing him, he'll keep them behind a locked door guarded by his most brawny men. Return to me when you're done, and I'll verify the orders.")
  174. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  175. Dialog.AddOption("Alright. I'll bring you the documents as quick as I can!")
  176. Dialog.Start()
  177. end
  178. function RogueDone(NPC,Spawn)
  179. FaceTarget(NPC, Spawn)
  180. Dialog.New(NPC, Spawn)
  181. Dialog.AddDialog("Let me make certain that you didn't just forge these ... No you succeeded where others before you have failed. The lieutenant will have to double his efforts. You certainly deserve the title of \"rogue.\"")
  182. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  183. Dialog.AddOption("Thank you Counselor. I will use my new skills wisely.","RogueDone2")
  184. Dialog.Start()
  185. end
  186. function RogueDone2(NPC,Spawn)
  187. FaceTarget(NPC, Spawn)
  188. if HasQuest(Spawn,Rogue) then
  189. SetStepComplete(Spawn,Rogue,2)
  190. end
  191. PlayFlavor(NPC, "", "", "wink", 0, 0, Spawn)
  192. end
  193. --BARD CLASS
  194. function Bard1(NPC,Spawn)
  195. FaceTarget(NPC, Spawn)
  196. Dialog.New(NPC, Spawn)
  197. Dialog.AddDialog("Successful bards have a sharp tongue and a quick wit. I must test you to see if you possess these qualities. A small party of wealthy merchants from the Coalition of Tradesfolke has gathered together...")
  198. PlayFlavor(NPC, "", "", "orate", 0, 0, Spawn)
  199. Dialog.AddOption("A group of wealthy merchants? I enjoy being the center of attention...","BardOffer")
  200. Dialog.AddOption("I'm not too sure anymore. Do you advise I specialize somewhere else?","Decide")
  201. Dialog.Start()
  202. end
  203. function BardOffer(NPC,Spawn)
  204. FaceTarget(NPC, Spawn)
  205. OfferQuest(NPC,Spawn,Bard)
  206. end
  207. --PREDATOR CLASS
  208. function Predator1(NPC,Spawn)
  209. FaceTarget(NPC, Spawn)
  210. Dialog.New(NPC, Spawn)
  211. Dialog.AddDialog("So, a predator? Can you smell your prey far before you see it? If you close your eyes, can you hear the heartbeat of your game and know how many beats are left, yes? Yes ... a stalker's instinct runs in your blood. You are the top of the food chain.")
  212. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  213. Dialog.AddOption("I'm too focused to be anything other than a predator.","PredatorOffer")
  214. Dialog.AddOption("I'm not too sure anymore. Do you advise I specialize somewhere else?","Decide")
  215. Dialog.Start()
  216. end
  217. function PredatorOffer(NPC,Spawn)
  218. FaceTarget(NPC, Spawn)
  219. OfferQuest(NPC,Spawn,Predator)
  220. end