ListalaniaVainederian.lua 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. --[[
  2. Script Name : SpawnScripts/Castleview/ListalaniaVainederian.lua
  3. Script Purpose : Listalania Vainederian
  4. Script Author : Dorbin
  5. Script Date : 2022.01.25
  6. Script Notes : Speak Koada'Dal
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. local Reservation = 5452
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, Reservation)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11) <0 then
  19. FactionChecking(NPC, Spawn, faction)
  20. else
  21. if not HasLanguage(Spawn, 9) then
  22. if math.random(1, 100) <= 60 then
  23. local choice = math.random(1,2)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/highelf_base_1/ft/highelf/highelf_base_1_1_garbled_gf_a002225a.mp3", "Castleview is beautiful this time of year.", "royalwave", 3121965781, 2073270812, Spawn, 9)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/highelf_base_1/ft/highelf/highelf_base_1_1_garbled_gf_fde7b8f7.mp3", "The high elves have the best of life here.", "", 595061935, 2035542297, Spawn, 9)
  28. end
  29. end
  30. elseif
  31. not HasCompletedQuest (Spawn, Reservation) and not HasQuest (Spawn, Reservation) then
  32. if math.random(1, 100) <= 70 then
  33. local choice = math.random(1,3)
  34. if choice == 1 then
  35. FaceTarget(NPC,Spawn)
  36. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/100_park_listalania_multhail1_b993e1.mp3", "Sorry friend, I have no time for chatting. I must get to the inn.", "", 2101590645, 2348500153, Spawn)
  37. elseif choice == 2 then
  38. FaceTarget(NPC,Spawn)
  39. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/100_park_listalania_callout_e55949cd.mp3", "Ah ... another beautiful day in Castleview! Good day! What do you need, traveler?", "royalwave", 3712216844, 54205705, Spawn) end
  40. elseif choice ==3 then
  41. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/100_park_listalania_multhail2_86f538b6.mp3", "What a glorious day! Castleview is lovely this time of year, isn't it? Though the beauty of Qeynos herself calls me...", "", 1634717602, 1906674926, Spawn)
  42. FaceTarget(NPC,Spawn)
  43. end
  44. elseif HasCompletedQuest (Spawn, Reservation) and math.random(1, 100) <= 50 then
  45. local choice = math.random(1,2)
  46. if choice == 1 then
  47. FaceTarget(NPC,Spawn)
  48. PlayFlavor(NPC, "", "", "royalwave", 0, 0, Spawn)
  49. else
  50. FaceTarget(NPC,Spawn)
  51. PlayFlavor(NPC, "", "", "curtsey", 0, 0, Spawn)
  52. end
  53. end
  54. end
  55. end
  56. function LeaveRange(NPC, Spawn)
  57. end
  58. function QuestStart(NPC, Spawn, conversation)
  59. FaceTarget(NPC,Spawn)
  60. if not HasQuest (Spawn, Reservation) then
  61. conversation = CreateConversation()
  62. AddConversationOption(conversation, "Have you been in Qeynos long?", "Long")
  63. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/100_park_listalania_multhail2_86f538b6.mp3", "", "", 1634717602, 1906674926, Spawn)
  64. StartConversation(conversation, NPC, Spawn, "What a glorious day! Castleview is lovely this time of year, isn't it? Though the beauty of Qeynos herself calls me..")
  65. elseif HasQuest (Spawn, Reservation) then
  66. conversation = CreateConversation()
  67. if GetQuestStep(Spawn, Reservation) == 2 then
  68. AddConversationOption(conversation, "I've spoken to Valean at the inn and made your reservation.", "ReservationMade")
  69. end
  70. AddConversationOption(conversation, "I'm heading there soon.")
  71. StartConversation(conversation, NPC, Spawn, "Have you made that reservation at the inn for me?")
  72. end
  73. end
  74. function Long(NPC, Spawn)
  75. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian000.mp3", "", "", 3000457446, 1615662591, Spawn)
  76. FaceTarget(NPC,Spawn)
  77. conversation = CreateConversation()
  78. AddConversationOption(conversation, "What do you need?", "Moment")
  79. AddConversationOption(conversation, "Sorry, I'm busy.")
  80. StartConversation(conversation, NPC, Spawn, "I've stayed in the city with my friend Taneran, and once I become I become a full citizen I'd like to move there. Though, Felwithe and Kelethin are lost to us, I hear the druid and ranger's work in the Eldarr Grove is remarkable. Say, could you spare a moment friend?")
  81. end
  82. function Moment(NPC, Spawn)
  83. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian001.mp3", "", "", 2137369666, 3214169291, Spawn)
  84. FaceTarget(NPC,Spawn)
  85. conversation = CreateConversation()
  86. AddConversationOption(conversation, "I'll go speak to Valean about a reservation.", "Valean")
  87. AddConversationOption(conversation, "Sorry, I'm busy.")
  88. StartConversation(conversation, NPC, Spawn, "You see, I invited Taneran for a visit, but my house is too small for both of us. Would you be kind and reserve a room at the inn for me?")
  89. end
  90. function Valean (NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. OfferQuest(NPC, Spawn, Reservation)
  93. end
  94. function ReservationMade(NPC, Spawn)
  95. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian002.mp3", "", "thank", 1021398410, 333389770, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. conversation = CreateConversation()
  98. AddConversationOption(conversation, "It was my pleasure.", "Payment")
  99. AddConversationOption(conversation, "Congratulations on your... ", "Payment1")
  100. StartConversation(conversation, NPC, Spawn, "Lovely! Thank you for taking care of this matter. I just couldn't make poor Taneran sleep on the floor. It would be terrible manners on my part. Please, I insit you take some coins for your kind deed.")
  101. end
  102. function Payment1(NPC, Spawn)
  103. FaceTarget(NPC, Spawn)
  104. conversation = CreateConversation()
  105. PlayFlavor(NPC, "","", "ponder", 0, 0, Spawn)
  106. AddConversationOption(conversation, "Err... nevermind. Take care.", "Payment")
  107. StartConversation(conversation, NPC, Spawn, "My what?")
  108. end
  109. function Payment(NPC, Spawn)
  110. SetStepComplete(Spawn, Reservation, 2)
  111. end
  112. function hailed(NPC, Spawn)
  113. FaceTarget(NPC, Spawn)
  114. if GetFactionAmount(Spawn, 11) <0 then
  115. FactionChecking(NPC, Spawn, faction)
  116. else
  117. local Taner = GetSpawn(NPC,2360012)
  118. FaceTarget(NPC, Spawn)
  119. if Taner ~=nil then
  120. FaceTarget(Taner,Spawn)
  121. end
  122. if not HasLanguage(Spawn, 9) then -- Language Check for KoaDal (9)
  123. local choice = math.random(1,2)
  124. if choice == 1 then
  125. PlayFlavor(NPC, "voiceover/english/highelf_base_1/ft/highelf/highelf_base_1_1_garbled_gf_a002225a.mp3", "Castleview is beautiful this time of year.", "", 3121965781, 2073270812, Spawn, 9)
  126. elseif choice == 2 then
  127. PlayFlavor(NPC, "voiceover/english/highelf_base_1/ft/highelf/highelf_base_1_1_garbled_gf_fde7b8f7.mp3", "The high elves have the best of life here.", "", 595061935, 2035542297, Spawn, 9)
  128. end
  129. else
  130. if not HasCompletedQuest(Spawn, Reservation) then
  131. QuestStart(NPC, Spawn)
  132. elseif HasCompletedQuest (Spawn, Reservation) then
  133. local choice = math.random(1,2)
  134. if choice == 1 then
  135. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian.mp3", "What a glorious day! Castleview is lovely this time of year, isn't it? The beauty of Qeynos herself calls me though...", "", 2220724575, 2462118771, Spawn)
  136. elseif choice == 2 then
  137. FaceTarget(NPC,Spawn)
  138. PlayFlavor(NPC, "voiceover/english/listalania_vainederian/qey_village04/100_park_listalania_callout_e55949cd.mp3", "Ah ... another beautiful day in Castleview! Good day! What do you need, traveler?", "royalwave", 3712216844, 54205705, Spawn) end
  139. end
  140. end
  141. end
  142. end