IanCathlan.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/IanCathlan.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.11
  5. Script Purpose : Ian Cathlan Scout/Plate Fighter Armor Quests.
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local FIGHTER = 1
  10. local WARRIOR =2
  11. local GUARDIAN= 3
  12. local BERSERKER = 4
  13. local BRAWLER = 5
  14. local MONK = 6
  15. local BRUISER= 7
  16. local CRUSADER = 8
  17. local SHADOWKNIGHT = 9
  18. local PALADIN = 10
  19. local PRIEST = 11
  20. local CLERIC = 12
  21. local TEMPLAR = 13
  22. local INQUISITOR = 14
  23. local DRUID = 15
  24. local WARDEN = 16
  25. local FURY = 17
  26. local SHAMAN = 18
  27. local MYSTIC = 19
  28. local DEFILER = 20
  29. local MAGE = 21
  30. local SORCERER = 22
  31. local WIZARD = 23
  32. local WARLOCK = 24
  33. local ENCHANTER = 25
  34. local ILLUSIONIST = 26
  35. local COERCER = 27
  36. local SUMMONER = 28
  37. local CONJUROR = 29
  38. local NECROMANCER = 30
  39. local SCOUT = 31
  40. local ROGUE = 32
  41. local SWASHBUCKLER = 33
  42. local BRIGAND = 34
  43. local BARD = 35
  44. local TROUBADOR = 36
  45. local DIRGE = 37
  46. local PREDATOR = 38
  47. local RANGER = 39
  48. local ASSASSIN = 40
  49. local ANIMALIST = 41
  50. local BEASTLORD = 42
  51. local SHAPER = 43
  52. local CHANNELER = 44
  53. local armor1 = 5588
  54. local armor2 = 5589
  55. local armor3 = 5590
  56. local armor4 = 5591
  57. local armor5 = 5592
  58. local armor6 = 5593
  59. function spawn(NPC)
  60. ProvidesQuest(NPC,armor1)
  61. ProvidesQuest(NPC,armor2)
  62. ProvidesQuest(NPC,armor3)
  63. ProvidesQuest(NPC,armor4)
  64. ProvidesQuest(NPC,armor5)
  65. ProvidesQuest(NPC,armor6)
  66. end
  67. function hailed(NPC, Spawn)
  68. if GetFactionAmount(Spawn,11)<0 then --QEYNOS FACTION CHECK
  69. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan017.mp3","I'm sorry. I don't know who ye are. If ye'd be so kind as ta leave me to my business, I'd appreciate it. Good day ta ye.","noway", 3568187069, 1024390098, Spawn)
  70. else
  71. if GetLevel(Spawn)>=20 then --LEVEL CHECK
  72. if GetClass(Spawn)== GUARDIAN or GetClass(Spawn)== BERSERKER or GetClass(Spawn)== SHADOWKNIGHT or GetClass(Spawn)== PALADIN or GetClass(Spawn)== TEMPLAR or GetClass(Spawn)== INQUISITOR or GetClass(Spawn)==SWASHBUCKLER or GetClass(Spawn)==BRIGAND or GetClass(Spawn)==TROUBADOR or GetClass(Spawn)==DIRGE or GetClass(Spawn)==RANGER or GetClass(Spawn)==ASSASSIN then
  73. FaceTarget(NPC, Spawn)
  74. if not HasQuest(Spawn,armor1) and not HasCompletedQuest(Spawn,armor1) then
  75. Dialog1(NPC,Spawn) -- INITIAL HAIL
  76. elseif HasQuest(Spawn,armor1) and GetQuestStep(Spawn,armor1)~=3 then --INBETWEEN QUESTS (no ready to turn in)
  77. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan005.mp3","Did you find anything else? I'm afraid my leads have come up dry as well. Do you mind looking for these one more time?","ponder", 4113276061, 3432810128, Spawn)
  78. elseif GetQuestStep(Spawn,armor1)==3 or GetQuestStep(Spawn,armor2)==4 or GetQuestStep(Spawn,armor3)==4 or GetQuestStep(Spawn,armor4)==4 or GetQuestStep(Spawn,armor5)==5 then
  79. Dialog2(NPC,Spawn) -- DEFAULT QUEST TURN-IN AQ1-5
  80. elseif GetQuestStep(Spawn,armor6)==4 then
  81. Dialog4(NPC,Spawn) -- AQ6 TURN-IN
  82. elseif HasCompletedQuest(Spawn,armor1) and not HasQuest(Spawn,armor2) then
  83. Dialog3(NPC,Spawn)
  84. elseif HasQuest(Spawn,armor2) and GetQuestStep(Spawn,armor2)~=4 then
  85. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan005.mp3","Did you find anything else? I'm afraid my leads have come up dry as well. Do you mind looking for these one more time?","ponder", 4113276061, 3432810128, Spawn)
  86. elseif HasCompletedQuest(Spawn,armor2) and not HasQuest(Spawn,armor3) then
  87. Dialog3(NPC,Spawn)
  88. elseif HasQuest(Spawn,armor3) and GetQuestStep(Spawn,armor3)~=4 then
  89. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan005.mp3","Did you find anything else? I'm afraid my leads have come up dry as well. Do you mind looking for these one more time?","ponder", 4113276061, 3432810128, Spawn)
  90. elseif HasCompletedQuest(Spawn,armor3) and not HasQuest(Spawn,armor4) then
  91. Dialog3(NPC,Spawn)
  92. elseif HasQuest(Spawn,armor4) and GetQuestStep(Spawn,armor4)~=4 then
  93. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan005.mp3","Did you find anything else? I'm afraid my leads have come up dry as well. Do you mind looking for these one more time?","ponder", 4113276061, 3432810128, Spawn)
  94. elseif HasCompletedQuest(Spawn,armor4) and not HasQuest(Spawn,armor5) then
  95. Dialog3(NPC,Spawn)
  96. elseif HasQuest(Spawn,armor5) and GetQuestStep(Spawn,armor5)~=5 then
  97. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan005.mp3","Did you find anything else? I'm afraid my leads have come up dry as well. Do you mind looking for these one more time?","ponder", 4113276061, 3432810128, Spawn)
  98. elseif HasCompletedQuest(Spawn,armor5) and not HasQuest(Spawn,armor6) then
  99. Dialog3(NPC,Spawn)
  100. elseif HasQuest(Spawn,armor6) and GetQuestStep(Spawn,armor6)~=4 then
  101. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan005.mp3","Did you find anything else? I'm afraid my leads have come up dry as well. Do you mind looking for these one more time?","ponder", 4113276061, 3432810128, Spawn)
  102. elseif HasCompletedQuest(Spawn,armor6) then --FINISHED RESPONSE
  103. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan016.mp3","Hail to ye as well. Ahh, it's you! Good ta see ya again. We finally got everything that was missing. Thanks again for your help! I don't know how I'd have done it without you!","hello", 652508257, 2879341192, Spawn)
  104. end
  105. else
  106. FaceTarget(NPC, Spawn) --NOT RIGHT CLASS
  107. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan017.mp3","I'm sorry. I don't know who ye are. If ye'd be so kind as ta leave me to my business, I'd appreciate it. Good day ta ye.","glare", 3568187069, 1024390098, Spawn)
  108. end
  109. else
  110. FaceTarget(NPC, Spawn) --NOT RIGHT LEVEL
  111. PlayFlavor(NPC,"voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan017.mp3","I'm sorry. I don't know who ye are. If ye'd be so kind as ta leave me to my business, I'd appreciate it. Good day ta ye.","glare", 3568187069, 1024390098, Spawn)
  112. end
  113. end
  114. end
  115. --AQ1
  116. function Dialog1(NPC, Spawn)
  117. FaceTarget(NPC, Spawn)
  118. Dialog.New(NPC, Spawn)
  119. PlayFlavor(NPC,"","","hello", 0, 0, Spawn)
  120. Dialog.AddDialog( "An' hail ta ye as well. Can ol' Ian help ya with somethin', or are ya just bein' friendly?")
  121. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan001.mp3", 92203188, 488394336)
  122. Dialog.AddOption( "You wouldn't happen to know where I can get some good armor, would you?", "Option1")
  123. Dialog.AddOption("I was just being friendly. Good day to you.")
  124. Dialog.Start()
  125. end
  126. function Option1(NPC, Spawn)
  127. FaceTarget(NPC, Spawn)
  128. Dialog.New(NPC, Spawn)
  129. Dialog.AddDialog( "I might tell ya, if you help me out. In return, I'll give you some old armor that I can have refitted for you.")
  130. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan002.mp3", 2339127532, 3093029338)
  131. Dialog.AddOption( "Maybe ... what do you want me to do?", "Option2")
  132. Dialog.AddOption("No, I'm not interested right now.")
  133. Dialog.Start()
  134. end
  135. function Option2(NPC, Spawn)
  136. FaceTarget(NPC, Spawn)
  137. Dialog.New(NPC, Spawn)
  138. Dialog.AddDialog( "My family has a history of losing things. I was hoping you could help me look for a few items; some are very sentimental.")
  139. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan003.mp3", 3468227424, 330618102)
  140. Dialog.AddOption( "I can help you look. Where should I start?", "Option3")
  141. Dialog.AddOption("Find someone else for this, I'm not interested.")
  142. Dialog.Start()
  143. end
  144. function Option3(NPC, Spawn)
  145. FaceTarget(NPC, Spawn)
  146. OfferQuest(NPC,Spawn,armor1)
  147. end
  148. function Dialog2(NPC, Spawn) -- Primary turn-in response.
  149. FaceTarget(NPC, Spawn)
  150. Dialog.New(NPC, Spawn)
  151. Dialog.AddDialog( "What did you find? Did you get them all?")
  152. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan006.mp3", 417646018, 2611075369)
  153. Dialog.AddOption( "I found everything on the list.", "Option4")
  154. Dialog.AddOption("I'm not sure. I'll get back to you.")
  155. Dialog.Start()
  156. end
  157. function Option4(NPC, Spawn)
  158. FaceTarget(NPC, Spawn)
  159. Dialog.New(NPC, Spawn)
  160. Dialog.AddDialog( "Excellent. Yes, these are perfect! You did well. Here's the armor I promised.")
  161. PlayFlavor(NPC,"","","happy", 0, 0, Spawn)
  162. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan009.mp3", 3393697155, 3282809696)
  163. Dialog.AddOption("Thank you, Ian.")
  164. Dialog.Start()
  165. if GetQuestStep(Spawn,armor1)==3 then
  166. QuestStepIsComplete(NPC,Spawn,armor1,3)
  167. elseif GetQuestStep(Spawn,armor2)==4 then
  168. QuestStepIsComplete(NPC,Spawn,armor2,4)
  169. elseif GetQuestStep(Spawn,armor3)==4 then
  170. QuestStepIsComplete(NPC,Spawn,armor3,4)
  171. elseif GetQuestStep(Spawn,armor4)==4 then
  172. QuestStepIsComplete(NPC,Spawn,armor4,4)
  173. elseif GetQuestStep(Spawn,armor5)==5 then
  174. QuestStepIsComplete(NPC,Spawn,armor5,5)
  175. end
  176. end
  177. --AQ2-6
  178. function Dialog3(NPC, Spawn)
  179. FaceTarget(NPC, Spawn)
  180. Dialog.New(NPC, Spawn)
  181. Dialog.AddDialog( "Judging from where you found the last stuff, I know where we should look next. Will you help me track down some more things?")
  182. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan010.mp3", 2484308007, 1400019031)
  183. if HasCompletedQuest(Spawn,armor1) and not HasQuest(Spawn,armor2) then
  184. Dialog.AddOption( "I have the time. Where should I go next?", "Option5")
  185. end
  186. if HasCompletedQuest(Spawn,armor2) and not HasQuest(Spawn,armor3) then
  187. Dialog.AddOption( "I'm not sure how you figure these things out but where do you suggest?", "Option6")
  188. end
  189. if HasCompletedQuest(Spawn,armor3) and not HasQuest(Spawn,armor4) then
  190. Dialog.AddOption( "How did you... nevermind... where next?", "Option7")
  191. end
  192. if HasCompletedQuest(Spawn,armor4) and not HasQuest(Spawn,armor5) then
  193. Dialog.AddOption( "I'm not even going to ask how you know that. Where to?", "Option8")
  194. end
  195. if HasCompletedQuest(Spawn,armor5) and not HasQuest(Spawn,armor6) then
  196. Dialog.AddOption( "You're a diviner aren't you? What's the next stop?", "Option9")
  197. end
  198. Dialog.AddOption("I'm not sure. I'll get back to you.")
  199. Dialog.Start()
  200. end
  201. function Option5(NPC, Spawn)
  202. FaceTarget(NPC, Spawn)
  203. OfferQuest(NPC,Spawn,armor2)
  204. end
  205. function Option6(NPC, Spawn)
  206. FaceTarget(NPC, Spawn)
  207. OfferQuest(NPC,Spawn,armor3)
  208. end
  209. function Option7(NPC, Spawn)
  210. FaceTarget(NPC, Spawn)
  211. OfferQuest(NPC,Spawn,armor4)
  212. end
  213. function Option8(NPC, Spawn)
  214. FaceTarget(NPC, Spawn)
  215. OfferQuest(NPC,Spawn,armor5)
  216. end
  217. function Option9(NPC, Spawn)
  218. FaceTarget(NPC, Spawn)
  219. OfferQuest(NPC,Spawn,armor6)
  220. end
  221. function Dialog4(NPC, Spawn) --AQ6 turnin
  222. FaceTarget(NPC, Spawn)
  223. Dialog.New(NPC, Spawn)
  224. Dialog.AddDialog( "Hrmm ... I see. At least most of it is still in good shape ... except for these...")
  225. Dialog.AddVoiceover("voiceover/english/optional3/ian_cathlan/qey_harbor/quests/ian_cathlan/iancathlan008.mp3", 412980948, 3391212572) --Addee VO
  226. Dialog.AddOption( "Those were like that when I found them.")
  227. QuestStepIsComplete(NPC,Spawn,armor6,4)
  228. Dialog.Start()
  229. end