9
3

CaptainVarlos.lua 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. --[[
  2. Script Name : SpawnScripts/OutpostOverlord/CaptainVarlos.lua
  3. Script Author : Zcoretri
  4. Script Date : 2015.07.27
  5. Script Purpose : Captain Varlos dialog
  6. Modified Date : 2020.04.03
  7. Modified by : premierio015
  8. Notes : Added Animations & Gives a Spell "Call to Home"
  9. --]]
  10. function spawn(NPC)
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function hailed(NPC, Spawn)
  16. FaceTarget(NPC, Spawn)
  17. conversation = CreateConversation()
  18. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_027.mp3", "", "hello", 2285948102, 2994720481, Spawn)
  19. AddConversationOption(conversation, "Yes. Take me to Freeport.", "AreYouSure")
  20. AddConversationOption(conversation, "Who are you?", "WhoAreYou")
  21. AddConversationOption(conversation, "No, I'd like to explore more.")
  22. StartConversation(conversation, NPC, Spawn, "So, ya' ready ta go ashore matey?")
  23. end
  24. function WhoAreYou(NPC, Spawn)
  25. conversation = CreateConversation()
  26. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_003.mp3", "", "bow", 2565389482, 560555759, Spawn)
  27. AddConversationOption(conversation, "I think I'm ready to leave now.", "AreYouSure")
  28. AddConversationOption(conversation, "I'd like to explore more. Goodbye.")
  29. StartConversation(conversation, NPC, Spawn, "I am Captain Draik Varlos, and this 'ere fine ship is the Far Journey. I can give ya' a ride to Freeport when yer ready to leave the island.")
  30. end
  31. function AreYouSure(NPC, Spawn)
  32. conversation = CreateConversation()
  33. PlayFlavor(NPC, "voiceover/english/captain_varlos/tutorial_island02_fvo_hail3.mp3", "", "", 1155995604, 1406357895, Spawn)
  34. AddConversationOption(conversation, "I'm ready for the challenges ahead. Take me to Freeport.", "AreYouSure2")
  35. AddConversationOption(conversation, "On second thought, maybe I should wait a bit.")
  36. StartConversation(conversation, NPC, Spawn, "Ya' best be sure ta' explore the whole island, ya' hear! Norrath can be a dangerous place ya' know?")
  37. end
  38. function AreYouSure2(NPC, Spawn)
  39. conversation = CreateConversation()
  40. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_013.mp3", "", "smile", 3880459741, 170861362, Spawn)
  41. AddConversationOption(conversation, "Thanks for the ride!", "AreYouSure3")
  42. AddConversationOption(conversation, "Wait! I've changed my mind. Let me off.")
  43. StartConversation(conversation, NPC, Spawn, "Yar! That's what we be needin'. Ok then, off to Freeport!")
  44. end
  45. function AreYouSure3(NPC, Spawn)
  46. conversation = CreateConversation()
  47. PlayFlavor(NPC, "voiceover/english/captain_varlos/boat_06p_tutorial02/varlos_0_028.mp3", "", "", 1009737776, 2173458794, Spawn)
  48. AddConversationOption(conversation, "To Freeport!", "LeaveIsland")
  49. AddConversationOption(conversation, "Oh, nevermind! I'll stay!")
  50. StartConversation(conversation, NPC, Spawn, "Don't ya' mind, we get paid ta' do that.")
  51. end
  52. function LeaveIsland(NPC, Spawn)
  53. Race = GetRace(Spawn)
  54. Bind(Spawn, 559, -232.03, -56.06, 172.57, 360.0)
  55. -- Human / Kerra
  56. if Race == 9 or Race == 11 then
  57. AddSpellBookEntry(Spawn, 8057, 1)
  58. ZoneRef = GetZone("Freeport")
  59. Zone(ZoneRef,Spawn)
  60. -- Ratonga / Gnome
  61. elseif Race == 5 or Race == 13 then
  62. AddSpellBookEntry(Spawn, 8057, 1)
  63. ZoneRef = GetZone("Freeport")
  64. Zone(ZoneRef,Spawn)
  65. -- Half Elf
  66. elseif Race == 6 then
  67. AddSpellBookEntry(Spawn, 8057, 1)
  68. ZoneRef = GetZone("Freeport")
  69. Zone(ZoneRef,Spawn)
  70. -- Orge / Troll
  71. elseif Race == 12 or Race == 14 then
  72. AddSpellBookEntry(Spawn, 8057, 1)
  73. ZoneRef = GetZone("Freeport")
  74. Zone(ZoneRef,Spawn)
  75. -- Dark Elf / Iksar
  76. elseif Race == 1 or Race == 10 then
  77. AddSpellBookEntry(Spawn, 8057, 1)
  78. ZoneRef = GetZone("Freeport")
  79. Zone(ZoneRef,Spawn)
  80. -- Erudite / Freeblood
  81. elseif Race == 3 or Race == 19 then
  82. AddSpellBookEntry(Spawn, 8057, 1)
  83. ZoneRef = GetZone("Freeport")
  84. Zone(ZoneRef,Spawn)
  85. -- Barbarian and Aerakyn
  86. elseif Race == 0 or Race == 20 then
  87. AddSpellBookEntry(Spawn, 8057, 1)
  88. ZoneRef = GetZone("Freeport")
  89. Zone(ZoneRef,Spawn)
  90. -- Arasai or Sarnak
  91. elseif Race == 17 or Race == 18 then
  92. AddSpellBookEntry(Spawn, 8057, 1)
  93. ZoneRef = GetZone("Freeport")
  94. Zone(ZoneRef,Spawn)
  95. -- Unknown
  96. else
  97. PlayFlavor(NPC, "", "Sorry, I cannot deal with someone of your race. Try visiting the boat on the other island!", "", 0, 0, Spawn)
  98. ZoneRef = GetZone("Qeynos")
  99. Zone(ZoneRef,Spawn)
  100. end
  101. end