HelainConyers.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/HelainConyers.lua
  3. Script Purpose : Helain Conyers <Human Mentor>
  4. Script Author : Scatman
  5. Script Date : 2009.08.10
  6. Script Notes :
  7. --]]
  8. local HUMAN = 9
  9. local QUEST_1 = 295
  10. local QUEST_2 = 296
  11. local QUEST_3 = 297
  12. local QUEST_4 = 298
  13. function spawn(NPC)
  14. ProvidesQuest(NPC, QUEST_1)
  15. ProvidesQuest(NPC, QUEST_2)
  16. ProvidesQuest(NPC, QUEST_3)
  17. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  18. end
  19. function InRange(NPC, Spawn)
  20. if GetFactionAmount(Spawn,11)<0 then
  21. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  22. FaceTarget(NPC, Spawn)
  23. else
  24. if GetRace(Spawn)==9 then
  25. FaceTarget(NPC, Spawn)
  26. choice = math.random(1,2)
  27. if choice ==1 then
  28. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  29. else
  30. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  31. end
  32. end
  33. end
  34. end
  35. function hailed(NPC, Spawn)
  36. FaceTarget(NPC, Spawn)
  37. conversation = CreateConversation()
  38. if HasCompletedQuest(Spawn, QUEST_1) then
  39. if HasCompletedQuest(Spawn, QUEST_2) then
  40. if HasCompletedQuest(Spawn, QUEST_3) then
  41. if HasCompletedQuest(Spawn, QUEST_4) then
  42. FoundPathToPeace(NPC, Spawn, conversation)
  43. else
  44. HaveYouFoundWork(NPC, Spawn, conversation)
  45. end
  46. elseif HasQuest(Spawn, QUEST_3) then
  47. OnQuest3(NPC, Spawn, conversation)
  48. else
  49. ANaturalHere(NPC, Spawn, conversation)
  50. end
  51. elseif HasQuest(Spawn, QUEST_2) then
  52. OnQuest2(NPC, Spawn, conversation)
  53. else
  54. LookAtAllTheBooks(NPC, Spawn, conversation)
  55. end
  56. elseif HasQuest(Spawn, QUEST_1) then
  57. OnQuest1(NPC, Spawn, conversation)
  58. else
  59. if GetRace(Spawn) == HUMAN then
  60. HelloTraveler(NPC, Spawn, conversation)
  61. else
  62. NotHuman(NPC, Spawn, conversation)
  63. end
  64. end
  65. end
  66. function NotHuman(NPC, Spawn, conversation)
  67. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers027.mp3", "", "hello", 3089860217, 2120414759, Spawn)
  68. AddConversationOption(conversation, "Thanks for the tip.")
  69. StartConversation(conversation, NPC, Spawn, "Hello, traveler! If it is peace you seek, the teachings of Quellious the Tranquil can show you the way.")
  70. end
  71. --------------------------------------------------------------------------------------------------------------------------
  72. -- QUEST 1
  73. --------------------------------------------------------------------------------------------------------------------------
  74. function HelloTraveler(NPC, Spawn, conversation)
  75. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers027.mp3", "", "hello", 3089860217, 2120414759, Spawn)
  76. AddConversationOption(conversation, "No, I suppose you can't.", "dlg_0_1")
  77. AddConversationOption(conversation, "Thanks for the tip.")
  78. StartConversation(conversation, NPC, Spawn, "Hello, traveler! If it is peace you seek, the teachings of Quellious the Tranquil can show you the way.")
  79. end
  80. function dlg_0_1(NPC, Spawn)
  81. FaceTarget(NPC, Spawn)
  82. conversation = CreateConversation()
  83. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers002.mp3", "", "", 2562313108, 1727059508, Spawn)
  84. AddConversationOption(conversation, "The only thing that is safe to assume about a human is that we strive to survive.", "dlg_0_2")
  85. AddConversationOption(conversation, "Well, you know what happens when you assume. Good day.")
  86. StartConversation(conversation, NPC, Spawn, "Why, it used to be that you could know certain things about a person's faith by their race, but just look at us humans. Some are agnostic while others praise the likes of Erollisi Marr, Tunare, or even Bristlebane, just to name a few. ")
  87. end
  88. function dlg_0_2(NPC, Spawn)
  89. FaceTarget(NPC, Spawn)
  90. conversation = CreateConversation()
  91. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers003.mp3", "", "agree", 2892663311, 3066293848, Spawn)
  92. AddConversationOption(conversation, "You obviously are a person of faith.", "dlg_0_3")
  93. AddConversationOption(conversation, "We may not be the oldest of races, but we are tenacious. ")
  94. StartConversation(conversation, NPC, Spawn, "Right you are! And while change is constant and all around us, we adjust and adapt right along with it. Thus our faiths and philosophies are very diverse.")
  95. end
  96. function dlg_0_3(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. conversation = CreateConversation()
  99. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers004.mp3", "", "nod", 4064224894, 855111154, Spawn)
  100. AddConversationOption(conversation, "No doubt, especially in these times of turmoil and conflict.", "dlg_0_4")
  101. StartConversation(conversation, NPC, Spawn, "Oh, yes! I follow Quellious, the Tranquil child-goddess. I've been seeking inner peace for many years now. It has helped me so much! I look around and see so many others that would benefit from such personal peace.")
  102. end
  103. function dlg_0_4(NPC, Spawn)
  104. FaceTarget(NPC, Spawn)
  105. conversation = CreateConversation()
  106. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers005.mp3", "", "", 862333499, 1544985177, Spawn)
  107. AddConversationOption(conversation, "You find knowledge to be necessary for personal peace?", "dlg_0_5")
  108. AddConversationOption(conversation, "Perhaps, a conversation we can have another day. I was curious if you had work for me?", "OfferQuest1")
  109. StartConversation(conversation, NPC, Spawn, "So true. Some peace and knowledge would go far.")
  110. end
  111. function dlg_0_5(NPC, Spawn)
  112. FaceTarget(NPC, Spawn)
  113. conversation = CreateConversation()
  114. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers006.mp3", "", "agree", 1674826360, 1009450237, Spawn)
  115. AddConversationOption(conversation, "Interesting. I still think that many wage war for the sake of war, or to gain power.", "dlg_0_6")
  116. StartConversation(conversation, NPC, Spawn, "I do! Knowledge of other cultures and philosophies is very important. Why, if everyone fully understood themselves and their neighbors, there would be no conflict or war. No need for it!")
  117. end
  118. function dlg_0_6(NPC, Spawn)
  119. FaceTarget(NPC, Spawn)
  120. conversation = CreateConversation()
  121. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers007.mp3", "", "", 2276149336, 1155210883, Spawn)
  122. AddConversationOption(conversation, "Hmm. Some words to think about. ", "dlg_0_7")
  123. StartConversation(conversation, NPC, Spawn, "But see, if those people had peace, they would not seek power.")
  124. end
  125. function dlg_0_7(NPC, Spawn)
  126. FaceTarget(NPC, Spawn)
  127. conversation = CreateConversation()
  128. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers008.mp3", "", "", 2766152393, 2773509836, Spawn)
  129. AddConversationOption(conversation, "Wouldn't mind at all.", "OfferQuest1")
  130. StartConversation(conversation, NPC, Spawn, "Ya know, I am glad to have found another to talk to about these kinds of things. Would you mind helping me?")
  131. end
  132. function OfferQuest1(NPC, Spawn)
  133. FaceTarget(NPC, Spawn)
  134. OfferQuest(NPC, Spawn, QUEST_1)
  135. end
  136. function OnQuest1(NPC, Spawn, conversation)
  137. if GetQuestStep(Spawn, QUEST_1) == 2 then
  138. SetStepComplete(Spawn, QUEST_1, 2)
  139. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers010.mp3", "", "", 4087382660, 558784349, Spawn)
  140. AddConversationOption(conversation, "You're welcome.", "LookAtAllTheBooks")
  141. StartConversation(conversation, NPC, Spawn, "Oh, gracious! I did not expect so many at once. Thank you!")
  142. else
  143. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers025.mp3", "", "", 1625074590, 2007128908, Spawn)
  144. AddConversationOption(conversation, "I am sorry. I have not yet done what you asked. I will be back shortly!")
  145. StartConversation(conversation, NPC, Spawn, "Hello again! I did not expect you back so soon.")
  146. end
  147. end
  148. --------------------------------------------------------------------------------------------------------------------------
  149. -- QUEST 2
  150. --------------------------------------------------------------------------------------------------------------------------
  151. function LookAtAllTheBooks(NPC, Spawn, conversation)
  152. if conversation == nil then
  153. FaceTarget(NPC, Spawn)
  154. conversation = CreateConversation()
  155. end
  156. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers011.mp3", "", "", 1566451168, 2959134489, Spawn)
  157. AddConversationOption(conversation, "'Humans, Barbarians, and Erudites.' ", "dlg_7_2")
  158. AddConversationOption(conversation, "'Age of Blood, Age of Glory.'", "dlg_7_3")
  159. StartConversation(conversation, NPC, Spawn, "Oh, look at all these books you brought me. What is the title of that one, near you?")
  160. end
  161. function dlg_7_2(NPC, Spawn)
  162. FaceTarget(NPC, Spawn)
  163. conversation = CreateConversation()
  164. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers012.mp3", "", "", 3119581167, 1698005795, Spawn)
  165. AddConversationOption(conversation, "Perhaps some insight can be gained.", "dlg_7_3")
  166. StartConversation(conversation, NPC, Spawn, "That should be a good read. We are often thought of to have evolved from the barbarian race, you know? And well, the Erudites are a more intellectual subset of us. It is interesting, and can offer a bit more of an understanding of them and ourselves, when you put it in perspective like that.")
  167. end
  168. function dlg_7_3(NPC, Spawn)
  169. FaceTarget(NPC, Spawn)
  170. conversation = CreateConversation()
  171. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers013.mp3", "", "", 3228480005, 2535926237, Spawn)
  172. AddConversationOption(conversation, "Height of human power?", "dlg_7_4")
  173. StartConversation(conversation, NPC, Spawn, "Ah, look at this one! It is about the Age of Blood. A violent age, thought to be the height of human power, when the Combine Empire ruled over most of Norrath. If I recall right, the empire eventually splintered due to internal conflicts. Relics of the Combine Empire could be found across Norrath for ages.")
  174. end
  175. function dlg_7_4(NPC, Spawn)
  176. FaceTarget(NPC, Spawn)
  177. conversation = CreateConversation()
  178. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers031.mp3", "", "", 3917036825, 1372729086, Spawn)
  179. AddConversationOption(conversation, "Quite the testament to the humans who built Qeynos.", "dlg_7_5")
  180. StartConversation(conversation, NPC, Spawn, "That is not to say, that as a race, our time has come and gone. Why, just look at this city as an example. Qeynos has survived thousands of years, through wars, sieges, disease, famine, betrayals, and cataclysms, we have endured!")
  181. end
  182. function dlg_7_5(NPC, Spawn)
  183. FaceTarget(NPC, Spawn)
  184. conversation = CreateConversation()
  185. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers034.mp3", "", "", 3381534468, 2598998174, Spawn)
  186. AddConversationOption(conversation, "And humans still rule it.", "dlg_7_6")
  187. StartConversation(conversation, NPC, Spawn, "I should say so! We should be proud of them, and of ourselves for continuing the work. Our city, like us, has survived by adapting. Thus, it still stands and is open to all that seek its protection.")
  188. end
  189. function dlg_7_6(NPC, Spawn)
  190. FaceTarget(NPC, Spawn)
  191. conversation = CreateConversation()
  192. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers032.mp3", "", "", 2855759340, 2852857359, Spawn)
  193. AddConversationOption(conversation, "Yeah. Uh oh!", "dlg_7_7")
  194. StartConversation(conversation, NPC, Spawn, "Of course. Queen Antonia Bayle is someone who understands the ways of peace and knowledge. She's to be admired by all! Listen to me prattling on... Is that another book I see?")
  195. end
  196. function dlg_7_7(NPC, Spawn)
  197. FaceTarget(NPC, Spawn)
  198. conversation = CreateConversation()
  199. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers014.mp3", "", "ponder", 2665081235, 3868863075, Spawn)
  200. AddConversationOption(conversation, "It was, and Andret told me to be careful, but it is now missing some of its pages. ", "dlg_7_8")
  201. StartConversation(conversation, NPC, Spawn, "What's wrong? Uh, that book looks ragged. Don't worry, I'll bet its spine was broken when you got it.")
  202. end
  203. function dlg_7_8(NPC, Spawn)
  204. FaceTarget(NPC, Spawn)
  205. conversation = CreateConversation()
  206. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers015.mp3", "", "wince", 4075505082, 3317310532, Spawn)
  207. AddConversationOption(conversation, "I will go look for the pages. I dropped them, so I will find them. ", "OfferQuest2")
  208. StartConversation(conversation, NPC, Spawn, "Oh, dear. You're right. We are missing six pages from the book 'Followers of Brell Serilis.' That would have been a great read, too. Oh, that's too bad.")
  209. end
  210. function OfferQuest2(NPC, Spawn)
  211. FaceTarget(NPC, Spawn)
  212. OfferQuest(NPC, Spawn, QUEST_2)
  213. end
  214. function OnQuest2(NPC, Spawn, conversation)
  215. if GetQuestStep(Spawn, QUEST_2) == 2 then
  216. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers017.mp3", "", "", 2087241060, 3147700165, Spawn)
  217. AddConversationOption(conversation, "I did! Though they are a little more smudged with dirt now.", "dlg_10_1")
  218. StartConversation(conversation, NPC, Spawn, "Did you find all the pages?")
  219. else
  220. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers025.mp3", "", "", 1625074590, 2007128908, Spawn)
  221. AddConversationOption(conversation, "I am sorry. I have not yet done what you asked. I will be back shortly!")
  222. StartConversation(conversation, NPC, Spawn, "Hello again! I did not expect you back so soon.")
  223. end
  224. end
  225. function dlg_10_1(NPC, Spawn)
  226. SetStepComplete(Spawn, QUEST_2, 2)
  227. FaceTarget(NPC, Spawn)
  228. conversation = CreateConversation()
  229. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers018.mp3", "", "", 4089087839, 2292542610, Spawn)
  230. AddConversationOption(conversation, "I guess it is rather fitting.", "ANaturalHere")
  231. StartConversation(conversation, NPC, Spawn, "Oh well, I'm sure the Duke of Below doesn't mind being a bit soiled.")
  232. end
  233. --------------------------------------------------------------------------------------------------------------------------
  234. -- QUEST 3
  235. --------------------------------------------------------------------------------------------------------------------------
  236. function ANaturalHere(NPC, Spawn, conversation)
  237. if conversation == nil then
  238. FaceTarget(NPC, Spawn)
  239. conversation = CreateConversation()
  240. end
  241. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers020.mp3", "", "nod", 2357657431, 1390308351, Spawn)
  242. AddConversationOption(conversation, "Thanks. I just try to do what's right.", "dlg_10_3")
  243. AddConversationOption(conversation, "Would you happen to have any other work for me?", "OfferQuest3")
  244. StartConversation(conversation, NPC, Spawn, "You know, you are a natural here in Qeynos. So willing to learn and help your fellow citizens.")
  245. end
  246. function dlg_10_3(NPC, Spawn)
  247. FaceTarget(NPC, Spawn)
  248. conversation = CreateConversation()
  249. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers021.mp3", "", "orate", 2715980640, 3245538913, Spawn)
  250. AddConversationOption(conversation, "You refer to Lucan and Freeport when you speak of ruling with fear. ", "dlg_10_4")
  251. StartConversation(conversation, NPC, Spawn, "That will do you well in these troubled times, no matter your faith. Qeynos is a collective people who are all driven by the same desire to better the world rather than being ruled by fear.")
  252. end
  253. function dlg_10_4(NPC, Spawn)
  254. FaceTarget(NPC, Spawn)
  255. conversation = CreateConversation()
  256. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers022.mp3", "", "", 1835163421, 380513186, Spawn)
  257. AddConversationOption(conversation, "I hope so. Would you happen to have any other work for me?", "OfferQuest3")
  258. StartConversation(conversation, NPC, Spawn, "I do. We strive to live as free individuals here in Qeynos. Everyone is doing their best to serve Queen Antonia and our community. You have already shown yourself to fit in nicely!")
  259. end
  260. function OfferQuest3(NPC, Spawn)
  261. FaceTarget(NPC, Spawn)
  262. OfferQuest(NPC, Spawn, QUEST_3)
  263. end
  264. function OnQuest3(NPC, Spawn, conversation)
  265. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers024.mp3", "", "", 1790327288, 1244496180, Spawn)
  266. AddConversationOption(conversation, "I have not asked all of them, but so far, no.")
  267. StartConversation(conversation, NPC, Spawn, "Did my friends have some work for you?")
  268. end
  269. function HaveYouFoundWork(NPC, Spawn, conversation)
  270. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers028.mp3", "", "", 1128584230, 3587308240, Spawn)
  271. AddConversationOption(conversation, "Laudine sent me to Johfrit Gythell. He has some work for me.")
  272. StartConversation(conversation, NPC, Spawn, "Have you found work, friend? ")
  273. end
  274. function FoundPathToPeace(NPC, Spawn, conversation)
  275. PlayFlavor(NPC, "voiceover/english/tutorial_revamp/helain_conyers/qey_village01/helainconyers026.mp3", "", "", 2566936431, 637185107, Spawn)
  276. AddConversationOption(conversation, "I have found my path. Let's hope it leads to peace.")
  277. StartConversation(conversation, NPC, Spawn, "Have you found your path to peace, friend?")
  278. end