CaptainVarlos.lua 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/CaptainVarlos.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.04 11:09:11
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local Qeynos = 5717
  10. local Freeport = 5758
  11. function spawn(NPC)
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. PlayFlavor(NPC, "voiceover/english/captain_varlos/tutorial_island02_fvo_hail2.mp3", "Keep walking... While you still can!", "hello", 724307296, 1739482284, Spawn, 0)
  16. end
  17. function hailed(NPC, Spawn)
  18. if HasQuest(Spawn, Qeynos) or HasQuest(Spawn, Freeport) then
  19. Dialog1(NPC, Spawn)
  20. else
  21. FaceTarget(NPC, Spawn)
  22. math.randomseed(os.time())
  23. voice = MakeRandomInt(1,3)
  24. if voice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/captain_varlos/tutorial_island02_fvo_hail2.mp3", "Ya' know, me hates doing paperwork! Arrrr!", "grumble", 724307296, 1739482284, Spawn, 0)
  26. elseif voice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/captain_varlos//tutorial_island02_fvo_hail1.mp3", "Stand ye' back, matey... me needs some room.", "glare", 3214674088, 3921408430, Spawn)
  28. else
  29. PlayFlavor(NPC, "voiceover/english/captain_varlos/tutorial_island02_fvo_hail3.mp3", "Ya' best be sure ta' explore the whole island, ya' hear!", "agree", 1155995604, 1406357895, Spawn)
  30. end
  31. end
  32. end
  33. function Dialog1(NPC, Spawn)
  34. FaceTarget(NPC, Spawn)
  35. Dialog.New(NPC, Spawn)
  36. Dialog.AddDialog("Ahoy! Good ta' see ya' here. I was just telling the Duke what happened on the Far Journey.")
  37. Dialog.AddVoiceover("voiceover/english/island_of_refuge/captain_draik_varlos/ior_capnvarlos_001.mp3", 4236315164, 382405206)
  38. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  39. Dialog.AddOption("It was nothing. I was happy to help.", "Dialog2")
  40. Dialog.Start()
  41. end
  42. function Dialog2(NPC, Spawn)
  43. FaceTarget(NPC, Spawn)
  44. Dialog.New(NPC, Spawn)
  45. Dialog.AddDialog("I would love ta' tip an ale back wit' ya', but me gots ta' get this paperwork done. Why don't ya' speak ta' Duke Ferrin, he can explain some things for ya'.")
  46. Dialog.AddVoiceover("voiceover/english/captain_varlos/tutorial_island01/varlos/varlos_ally_firsttalk_02.mp3", 2666783191, 241094847)
  47. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  48. Dialog.AddOption("Ok, I will do that.", "Dialog3")
  49. Dialog.Start()
  50. end
  51. function Dialog3(NPC, Spawn)
  52. FaceTarget(NPC, Spawn)
  53. Dialog.New(NPC, Spawn)
  54. Dialog.AddDialog("Thanks fa' everything, really. Ya' helped save me ship.")
  55. Dialog.AddVoiceover("voiceover/english/island_of_refuge/captain_draik_varlos/ior_capnvarlos_003.mp3", 1693533028, 3782277754)
  56. Dialog.AddOption("Think nothing of it.")
  57. Dialog.Start()
  58. end
  59. function respawn(NPC)
  60. spawn(NPC)
  61. end