CaptainVarlos.lua 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. --[[
  2. Script Name : SpawnScripts/FarJourneyFreeport/CaptainVarlos.lua
  3. Script Author : Cynnar
  4. Script Date : 2019.09.28 03:09:56
  5. Script Notes :
  6. Script Purpose :
  7. --]]
  8. get_attention_animation = true
  9. needs_selection_help = true
  10. finished_hailed = false
  11. finished_where_am_I = false
  12. finished_who_are_you = false
  13. finished_how_did_I_get_here = false
  14. finished_where_are_we_headed = false
  15. finished_high_winds_1 = false
  16. finished_high_winds_2 = false
  17. finished_high_winds_3 = false
  18. seen_quest_praise = false
  19. function GenerateStateDefines(player)
  20. local bLegacy = (GetClientVersion(player) <= 526)
  21. if bLegacy then
  22. VSTATE_WAVE = 883
  23. VSTATE_HELLO = 318
  24. VSTATE_DOUBLETAKE = 250
  25. VSTATE_CROUCH_ENTER = 219
  26. VSTATE_CROUCH_EXIT = 220
  27. VSTATE_SQUEAL = 631
  28. VSTATE_POINT = 429
  29. VSTATE_COMBAT_TURN_LEFT = 210
  30. VSTATE_OUCH = 403
  31. VSTATE_CRINGE = 218
  32. VSTATE_SALUTE = 520
  33. VSTATE_SQUARE = 630
  34. else
  35. VSTATE_WAVE = 13287
  36. VSTATE_HELLO = 11682
  37. VSTATE_DOUBLETAKE = 11415
  38. VSTATE_CROUCH_ENTER = 219
  39. VSTATE_CROUCH_EXIT = 220
  40. VSTATE_SQUEAL = 12979
  41. VSTATE_POINT = 12028
  42. VSTATE_COMBAT_TURN_LEFT = 11210
  43. VSTATE_OUCH = 11911
  44. VSTATE_CRINGE = 11256
  45. VSTATE_SALUTE = 12167
  46. VSTATE_SQUARE = 12978
  47. end
  48. end
  49. require "SpawnScripts/Generic/DialogModule"
  50. function spawn(NPC)
  51. end
  52. function get_attention_init(NPC, player)
  53. InstructionWindow(player, -1.0, "Captain Varlos looks like he is trying to get your attention.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_027_30c39009.mp3", 2146230300, 3258594756, "captain_attention", "", "continue")
  54. AddTimer(NPC, 100, "get_attention", 1, player)
  55. end
  56. function get_attention(NPC, player)
  57. FaceTarget(NPC, player)
  58. GenerateStateDefines(player)
  59. SendStateCommand(NPC, VSTATE_WAVE)
  60. AddTimer(NPC, math.random(2000, 3000), "stop_get_attention", 1, player)
  61. end
  62. function stop_get_attention(NPC, player)
  63. SendStateCommand(NPC, 0)
  64. if get_attention_animation and HasQuest(player, 524) and GetQuestStep(player, 524) == 7 then
  65. AddTimer(NPC, 500, "get_attention", 1, player)
  66. end
  67. end
  68. function hailed(NPC, player)
  69. FaceTarget(NPC, player)
  70. GenerateStateDefines(player)
  71. SendStateCommand(GetSpawn(NPC, 270000), VSTATE_HELLO)
  72. SendStateCommand(GetSpawn(NPC, 270000), 0)
  73. if not HasQuest(player, 524) and not HasCompletedQuest(player, 524) then
  74. InstructionWindowClose(player)
  75. needs_selection_help = true
  76. finished_hailed = false
  77. finished_where_am_I = false
  78. finished_who_are_you = false
  79. finished_how_did_I_get_here = false
  80. finished_where_are_we_headed = false
  81. finished_high_winds_1 = false
  82. finished_high_winds_2 = false
  83. finished_high_winds_3 = false
  84. Dialog.New(NPC, player)
  85. Dialog.AddDialog("Ahoy! 'Tis good to see you awake. Ya seem a little squiffy, least ya' cheated death!")
  86. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_001.mp3", 1930075150, 2666442405)
  87. Dialog.AddEmote("hello")
  88. Dialog.AddOption("Where am I?", "where_am_I")
  89. Dialog.Start()
  90. AddTimer(NPC, 8000, "hailed_instructions", 1, player)
  91. elseif HasQuest(player, 524) and GetQuestStep(player, 524) == 7 then
  92. SetTutorialStep(player, 32)
  93. Dialog.New(NPC, player)
  94. Dialog.AddDialog("Avast ye! We need to talk.")
  95. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_011.mp3", 570868734, 3287597835)
  96. Dialog.AddOption("What is it?", "quest_step_7a")
  97. Dialog.Start()
  98. get_attention_animation = false
  99. elseif HasQuest(player, 524) and GetQuestStep(player, 524) == 10 then
  100. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_023.mp3", "You still need to kill that landlubber of a goblin! Get to it mate!", "", 3269557913, 3104212801)
  101. elseif HasQuest(player, 524) and GetQuestStep(player, 524) == 9 then
  102. SetTutorialStep(player, 51)
  103. Dialog.New(NPC, player)
  104. Dialog.AddDialog("Ya' made quick work of them vermin.")
  105. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_016.mp3", 1130776869, 4119313971)
  106. Dialog.AddOption("Thanks.", "quest_step_9")
  107. Dialog.Start()
  108. elseif HasCompletedQuest(player, 524) and not seen_quest_praise then
  109. seen_quest_praise = true
  110. Dialog.New(NPC, player)
  111. Dialog.AddDialog("Arr! Ya saved the Far Journey and me crew! Seems ya' proved ta' be quite a hero. Well, with the help of that young lass there, ya' do.")
  112. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_024.mp3", 998172564, 1159207795)
  113. -- Todo: Add missing gesture/emote
  114. Dialog.AddOption("It was nothing.", "quest_completed")
  115. Dialog.Start()
  116. elseif HasCompletedQuest(player, 524) then
  117. Dialog.New(NPC, player)
  118. Dialog.AddDialog("So, ya' ready ta go ashore matey?")
  119. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_027.mp3", 2285948102, 2994720481)
  120. Dialog.AddOption("Yes. Send me to the Isle of Refuge!", "ready_to_go_ashore")
  121. Dialog.AddOption("No. I would like some more time.", "conversation8_2")
  122. Dialog.Start()
  123. end
  124. end
  125. function quest_completed(NPC, player)
  126. Dialog.New(NPC, player)
  127. Dialog.AddDialog("There be the Island of Refuge, get ready ta' drop anchor. Just let me know when ya' want ta' go ashore.")
  128. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_025.mp3", 3643967618, 2645907420)
  129. Dialog.AddOption("Ok.", "drop_anchor")
  130. Dialog.Start()
  131. end
  132. function drop_anchor(NPC, player)
  133. Dialog.New(NPC, player)
  134. Dialog.AddDialog("Ingrid! Swing the lead and prepare to drop anchor!")
  135. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_026.mp3", 3011518245, 3851752713)
  136. Dialog.AddOption("[Continue]", "hailed")
  137. Dialog.Start()
  138. end
  139. function ready_to_go_ashore(NPC, player)
  140. Dialog.New(NPC, player)
  141. Dialog.AddDialog("Don't ya' mind, we get paid ta' do that.")
  142. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_028.mp3", 1009737776, 2173458794)
  143. Dialog.AddOption("Good point.", "zone_to_isle")
  144. Dialog.Start()
  145. end
  146. function zone_to_isle(NPC, player)
  147. serverType = GetRuleFlagInt32("R_World", "StartingZoneRuleFlag")
  148. -- if no server type is set (default of 0 wildcard) or odd number means bit 1 is set
  149. if serverType == 0 or (serverType % 2) == 1 then
  150. -- DoF alignment, 0 = evil (Outpost of Overlord), 1 = good (Queens Colony)
  151. alignment = GetAlignment(player)
  152. if alignment == 0 then
  153. Zone(GetZone(278), player) -- outpost of overlord
  154. else
  155. Zone(GetZone(253), player) -- queens colony
  156. end
  157. -- even value serverType > 0 (return 0) means isle of refuge (bit 2) is set
  158. else
  159. Zone(GetZone(325), player) -- isle of refuge
  160. end
  161. end
  162. function quest_step_9(NPC, player)
  163. AddTimer(GetSpawn(NPC, 270013), 100, "attack")
  164. AddTimer(NPC, 1000, "quest_step_9b", 1, player)
  165. end
  166. function quest_step_9b(NPC, player)
  167. FaceTarget(NPC, GetSpawn(NPC, 270013))
  168. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_017.mp3", "Wait. Tis that a... No, it cain' be!", "", 1253231512, 1752159147)
  169. AddTimer(NPC, 5000, "quest_step_9c", 1, player)
  170. GenerateStateDefines(player)
  171. SendStateCommand(GetSpawn(NPC, 270005), VSTATE_DOUBLETAKE)
  172. end
  173. function quest_step_9c(NPC, player)
  174. Drake = GetSpawn(NPC, 270013)
  175. Anikra = GetSpawn(NPC, 270006)
  176. Valik = GetSpawn(NPC, 270005)
  177. Geredo = GetSpawn(NPC, 270004)
  178. FaceTarget(Anikra, Drake)
  179. FaceTarget(Valik, Drake)
  180. FaceTarget(Geredo, Drake)
  181. GenerateStateDefines(player)
  182. SendStateCommand(Anikra, VSTATE_POINT)
  183. SendStateCommand(Valik, VSTATE_POINT)
  184. SendStateCommand(Geredo, VSTATE_POINT)
  185. SendStateCommand(GetSpawn(NPC, 270001), VSTATE_CROUCH_ENTER)
  186. SendStateCommand(GetSpawn(NPC, 270007), VSTATE_SQUEAL)
  187. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_018.mp3", "Quick! Ingrid, secure th'loot! Thar be a Drakota off the bow! Quick now! Secure those chests!", "", 3607547478, 39534308)
  188. AddTimer(NPC, 9000, "quest_step_9d", 1, player)
  189. end
  190. function quest_step_9d(NPC, player)
  191. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_019.mp3", "Everyone down! Watch it!", "", 2065401462, 2542613809)
  192. GenerateStateDefines(player)
  193. SendStateCommand(GetSpawn(NPC, 270007), VSTATE_CROUCH_ENTER)
  194. SendStateCommand(GetSpawn(NPC, 270001), VSTATE_CROUCH_EXIT)
  195. SendStateCommand(GetSpawn(NPC, 270004), VSTATE_COMBAT_TURN_LEFT)
  196. SendStateCommand(GetSpawn(NPC, 270006), VSTATE_OUCH)
  197. SendStateCommand(GetSpawn(NPC, 270005), VSTATE_CRINGE)
  198. SendStateCommand(GetSpawn(NPC, 270002), VSTATE_CRINGE)
  199. AddTimer(NPC, 3500, "quest_step_9e", 1, player)
  200. i=1
  201. spawns = GetSpawnListBySpawnID(player, 270011)
  202. repeat
  203. cage = GetSpawnFromList(spawns, i-1)
  204. if cage then
  205. Despawn(cage)
  206. end
  207. i = i + 1
  208. until cage == Nil
  209. end
  210. function quest_step_9e(NPC, player)
  211. PerformCameraShake(player, 0.699999988079071)
  212. PerformCameraShake(player, 0.5)
  213. PerformCameraShake(player, 0.30000001192092896)
  214. PerformCameraShake(player, 0.10000000149011612)
  215. AddTimer(NPC, 3500, "quest_step_9f", 1, player)
  216. end
  217. function quest_step_9f(NPC, player)
  218. AddTimer(NPC, 3500, "quest_step_9g", 1, player)
  219. end
  220. function quest_step_9g(NPC, player)
  221. AddTimer(NPC, 3000, "quest_step_9h", 1, player)
  222. end
  223. function quest_step_9h(NPC, player)
  224. GenerateStateDefines(player)
  225. SendStateCommand(GetSpawn(NPC, 270001), 0)
  226. SendStateCommand(GetSpawn(NPC, 270004), 0)
  227. SendStateCommand(GetSpawn(NPC, 270006), 0)
  228. SendStateCommand(GetSpawn(NPC, 270005), 0)
  229. SendStateCommand(GetSpawn(NPC, 270002), 0)
  230. SendStateCommand(GetSpawn(NPC, 270007), VSTATE_CROUCH_EXIT)
  231. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_020.mp3", "Blimey! That was close! It has been near two months since the last reported sightings of one of them.", "", 814285897, 1688547621)
  232. AddTimer(NPC, 6000, "quest_step_9i", 1, player)
  233. end
  234. function quest_step_9i(NPC, player)
  235. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_021.mp3", "That damnable goblin has escaped. An' look, me beautiful ship is on fire!", "", 1401094820, 2183903275)
  236. AddTimer(NPC, 6000, "quest_step_9j", 1, player)
  237. end
  238. function quest_step_9j(NPC, player)
  239. SetStepComplete(player, 524, 9)
  240. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_022.mp3", "Ye must put an end to 'is life, afore he tears me ship apart!", "", 2385052787, 1324494518)
  241. end
  242. function quest_step_7a(NPC, player)
  243. Dialog.New(NPC, player)
  244. Dialog.AddDialog("Well, 'tis a bit of a problem. Ya' see, there be rats on board. The vermin keep eating the supplies and I need ya' to go feed them to the deep, afore they eat anything else.")
  245. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_012.mp3", 705765462, 3202743441)
  246. Dialog.AddOption("So you want me to kill them?", "quest_step_7b")
  247. Dialog.Start()
  248. end
  249. function quest_step_7b(NPC, player)
  250. Dialog.New(NPC, player)
  251. Dialog.AddDialog("Yar! That's what we be needin'.")
  252. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_013.mp3", 3880459741, 170861362)
  253. Dialog.AddOption("How do you expect me to kill them?", "quest_step_7c")
  254. Dialog.Start()
  255. end
  256. function quest_step_7c(NPC, player)
  257. Dialog.New(NPC, player)
  258. Dialog.AddDialog("Wit this 'ere club. It is nice and splintered, sure ta' cause them some pain.")
  259. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_014.mp3", 2083163804, 202693960)
  260. Dialog.AddOption("Aye, aye, Captain!", "")
  261. Dialog.Start()
  262. SetStepComplete(player, 524, 7)
  263. end
  264. function hailed_instructions(NPC, player)
  265. if needs_selection_help then
  266. InstructionWindowGoal(player,0)
  267. InstructionWindowClose(player)
  268. InstructionWindow(player, -1.0, "To respond to the Captain and other characters you will meet, left click on the response text.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_006_7521b625.mp3", 3936228257, 1877316160, "tutorial_stage_8", "Left click on one of the response options.", "server")
  269. needs_selection_help = false
  270. end
  271. end
  272. function where_am_I(NPC, player)
  273. finished_hailed = true
  274. --[[Say(NPC, "Testing function call")
  275. drake = GetSpawn(player, 270013)
  276. SendStateCommand(drake,65")
  277. Say(drake, "attacking")
  278. AddTimer(drake, 40000, "drake_rain")
  279. --]]
  280. if needs_selection_help then
  281. needs_selection_help = false
  282. else
  283. InstructionWindowGoal(player, 0)
  284. InstructionWindowClose(player)
  285. end
  286. if not finished_where_am_I then
  287. FaceTarget(NPC, player)
  288. Dialog.New(NPC, player)
  289. Dialog.AddDialog("Me apologies.")
  290. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_002.mp3", 2054400186, 1976167819)
  291. Dialog.AddEmote("bow")
  292. Dialog.AddOption("Who are you?", "who_are_you")
  293. Dialog.Start()
  294. end
  295. end
  296. function who_are_you(NPC, player)
  297. if not finished_who_are_you then
  298. finished_where_am_I = true
  299. FaceTarget(NPC, player)
  300. Dialog.New(NPC, player)
  301. Dialog.AddDialog("I am Captain Draik Varlos, and this 'ere fine ship is the Far Journey.")
  302. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_003.mp3", 2565389482, 560555759)
  303. Dialog.AddOption("How did I get here?", "how_did_I_get_here")
  304. Dialog.Start()
  305. end
  306. end
  307. function how_did_I_get_here(NPC, player)
  308. finished_who_are_you = true
  309. if not finished_how_did_I_get_here then
  310. FaceTarget(NPC, player)
  311. Dialog.New(NPC, player)
  312. Dialog.AddDialog("Me hearties pulled ya' from the sea, you an those other bilge rats. Do ya' remember?")
  313. Dialog.AddVoiceover("voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_004.mp3", 29296168, 2709023783)
  314. Dialog.AddOption("Vaguely. Where are we headed?", "where_are_we_headed")
  315. Dialog.Start()
  316. end
  317. end
  318. function where_are_we_headed(NPC, player)
  319. finished_how_did_I_get_here = true
  320. if not finished_where_are_we_headed then
  321. FaceTarget(NPC, player)
  322. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_005.mp3", "We are heading to the Island of Refuge.", "", 1602680439, 2810422278)
  323. AddTimer(NPC, 500, "shake_camera_medium", 1, player)
  324. AddTimer(NPC, 1500, "shake_camera_low", 1, player)
  325. AddTimer(NPC, 2500, "shake_camera_low", 1, player)
  326. AddTimer(NPC, 3000, "high_winds_1", 1, player)
  327. end
  328. end
  329. function shake_camera_low(NPC, player)
  330. PerformCameraShake(player, 0.10000000149011612)
  331. end
  332. function shake_camera_medium(NPC, player)
  333. PerformCameraShake(player, 0.20000000298023224)
  334. end
  335. function shake_camera_high(NPC, player)
  336. PerformCameraShake(player, 0.699999988079071)
  337. end
  338. function high_winds_1(NPC, player)
  339. finished_where_are_we_headed = true
  340. if finished_high_winds_1 == false then
  341. FaceTarget(NPC, GetSpawn(NPC, 270001))
  342. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_006.mp3", "Ingrid! Quit gawking at the shorty and fix that yard-arm!", "", 2753489262, 3183736171)
  343. SendStateCommand(GetSpawn(NPC, 270001), 0)
  344. --This should be improved w/ MovementLoop to remove delay when walking
  345. MoveToLocation(GetSpawn(NPC, 270001), -1.86, -2.03, -8.17, 8, "", true)
  346. MoveToLocation(GetSpawn(NPC, 270001), -2.31, 1.21, -15.09, 8, "", true)
  347. MoveToLocation(GetSpawn(NPC, 270001), 1.24, 1.21, -14.47, 8, "", true)
  348. MoveToLocation(GetSpawn(NPC, 270001), 1.40, 1.18, -11.82, 8, "", false)
  349. AddTimer(NPC, 4500, "high_winds_2", 1, player)
  350. end
  351. end
  352. function high_winds_2(NPC, player)
  353. finished_high_winds_1 = true
  354. if not finished_high_winds_2 then
  355. FaceTarget(GetSpawn(NPC, 270001), NPC)
  356. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_007.mp3", "Don't want the ship to come apart in these high winds, do ya'?!", "scold", 517097409, 4194681002)
  357. SendStateCommand(GetSpawn(NPC, 270001), 0)
  358. AddTimer(NPC, 4000, "high_winds_3", 1, player)
  359. end
  360. end
  361. function high_winds_3(NPC, player)
  362. finished_high_winds_2 = true
  363. if not finished_high_winds_3 then
  364. PlayFlavor(GetSpawn(NPC, 270001), "voiceover/english/ingrid/boat_06p_tutorial02/020_deckhand_ingrid_010_1637e047.mp3", "Aye, aye, Captain!", "salute", 1250282628, 237171958)
  365. GenerateStateDefines(player)
  366. SendStateCommand(GetSpawn(NPC, 270001), VSTATE_SALUTE)
  367. AddTimer(NPC, 2500, "high_winds_4", 1, player)
  368. end
  369. end
  370. function high_winds_4(NPC, player)
  371. finished_high_winds_3 = true
  372. --This should be improved w/ MovementLoop to remove delay when walking
  373. MoveToLocation(GetSpawn(NPC, 270001), 1.40, 1.18, -11.82, 8, "", true)
  374. MoveToLocation(GetSpawn(NPC, 270001), 1.24, 1.21, -14.47, 8, "", true)
  375. MoveToLocation(GetSpawn(NPC, 270001), -2.31, 1.21, -15.09, 8, "", true)
  376. MoveToLocation(GetSpawn(NPC, 270001), -1.86, -2.03, -8.17, 8, "", true)
  377. MoveToLocation(GetSpawn(NPC, 270001), 2.48, -2.07, -3.26, 8, "", false)
  378. FaceTarget(NPC, player)
  379. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02_fvo_008.mp3", "Ya think she'd never seen a gnome afore.", "", 2447879193, 4289147535)
  380. GenerateStateDefines(player)
  381. SendStateCommand(GetSpawn(NPC, 270001), VSTATE_SQUARE)
  382. AddTimer(NPC, 500, "shake_camera_medium", 1, player)
  383. AddTimer(NPC, 3500, "shake_camera_high", 1, player)
  384. AddTimer(NPC, 5500, "shake_camera_medium", 1, player)
  385. AddTimer(NPC, 9500, "shake_camera_low", 1, player)
  386. AddTimer(NPC, 5000, "offer_quest", 1, player)
  387. end
  388. function offer_quest(NPC, player)
  389. if HasQuest(player, 524) == false then
  390. OfferQuest(NPC, player, 524)
  391. AddTimer(NPC, 7000, "Accepted_Tutorial_Instructions", 1, player)
  392. end
  393. end
  394. function Accepted_Tutorial_Instructions(NPC, player)
  395. InstructionWindowClose(player)
  396. ShowWindow(player, "Journals.JournalsQuest", 0)
  397. InstructionWindow(player, -1.0, "The Captain has given you a quest. Left click on the quest journal button to open your quest journal.", "voiceover/english/narrator/boat_06p_tutorial02/narrator_007_59f6d83b.mp3", 1470829818, 519016852, "tutorial_stage_9", "Open your quest journal. (click on the journal button)", "open JournalsQuest")
  398. ShowWindow(player, "MainHUD.StartMenu", 1)
  399. FlashWindow(player, "MainHUD.StartMenu.quest_journal", 20.0)
  400. SetTutorialStep(player, 8)
  401. end
  402. function respawn(NPC)
  403. end