ListalaniaVainederian.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  11. local Reservation = 5452
  12. function spawn(NPC)
  13. ProvidesQuest(NPC, Reservation)
  14. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange(NPC, Spawn)
  20. if GetFactionAmount(Spawn,11) <0 then
  21. FactionChecking(NPC, Spawn, faction)
  22. else
  23. if not HasLanguage(Spawn, 9) then
  24. if MakeRandomInt(1, 100) <= 66 then
  25. Garbled(NPC, Spawn, Faction)
  26. end
  27. else
  28. if MakeRandomInt(1, 100) <= 70 then
  29. if not HasCompletedQuest (Spawn, Reservation) and not HasQuest (Spawn, Reservation) then
  30. FaceTarget(NPC,Spawn)
  31. 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)
  32. local choice = math.random(1,2)
  33. else
  34. if choice == 1 then
  35. 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...", "curstey", 1634717602, 1906674926, Spawn)
  36. FaceTarget(NPC,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. end
  41. end
  42. end
  43. end
  44. end
  45. function LeaveRange(NPC, Spawn)
  46. end
  47. function QuestStart(NPC, Spawn, conversation)
  48. FaceTarget(NPC, Spawn)
  49. Dialog.New(NPC, Spawn)
  50. Dialog.AddDialog("What a glorious day! Castleview is lovely this time of year, isn't it? The beauty of Qeynos herself calls me though...")
  51. Dialog.AddVoiceover("voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian.mp3", 2220724575, 2462118771)
  52. PlayFlavor(NPC, "", "", "curtsey", 0, 0, Spawn)
  53. if not HasQuest (Spawn, Reservation) and not HasCompletedQuest(Spawn, Reservation) then
  54. Dialog.AddOption("Have you been inside Qeynos?", "Long")
  55. elseif HasQuest (Spawn, Reservation) and GetQuestStep(Spawn, Reservation) == 2 then
  56. Dialog.AddOption("Innkeeper Valean has a room ready for your friend.", "ReservationMade")
  57. end
  58. Dialog.AddOption("I understand your desire. Good day to you.")
  59. Dialog.Start()
  60. end
  61. function Long(NPC, Spawn)
  62. FaceTarget(NPC, Spawn)
  63. Dialog.New(NPC, Spawn)
  64. Dialog.AddDialog("I've stayed in the city with my friend Taneran, and once I become a full citizen, I'd like to move there. Though Felwithe and Kelethin are lost to us, I hear the druid's and ranger's work in the Elddar Grove is truly remarkable. Say, could you spare a moment, friend?")
  65. Dialog.AddVoiceover("voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian000.mp3",3000457446, 1615662591)
  66. PlayFlavor(NPC, "", "", "nod", 0,0 , Spawn)
  67. Dialog.AddOption("I can indeed.", "Valean")
  68. Dialog.AddOption("Sorry, I just stopped by to chat.")
  69. Dialog.Start()
  70. end
  71. function Valean (NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. OfferQuest(NPC, Spawn, Reservation)
  74. end
  75. function ReservationMade(NPC, Spawn)
  76. FaceTarget(NPC, Spawn)
  77. Dialog.New(NPC, Spawn)
  78. Dialog.AddDialog("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 insist you take some coins for your kind deed.")
  79. Dialog.AddVoiceover("voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian002.mp3",1021398410, 333389770)
  80. PlayFlavor(NPC, "", "", "fullcurtsey", 0,0 , Spawn)
  81. Dialog.AddOption("Thank you, milady.", "Payment")
  82. Dialog.AddOption("Congratulations on your... ", "Payment1")
  83. Dialog.Start()
  84. end
  85. function Payment1(NPC, Spawn)
  86. FaceTarget(NPC, Spawn)
  87. conversation = CreateConversation()
  88. PlayFlavor(NPC, "","", "doubletake", 0, 0, Spawn)
  89. AddConversationOption(conversation, "Err... nevermind. Take care.", "Payment")
  90. StartConversation(conversation, NPC, Spawn, "My what?")
  91. end
  92. function Payment(NPC, Spawn)
  93. SetStepComplete(Spawn, Reservation, 2)
  94. end
  95. function hailed(NPC, Spawn)
  96. FaceTarget(NPC, Spawn)
  97. if GetFactionAmount(Spawn, 11) <0 then
  98. FactionChecking(NPC, Spawn, faction)
  99. else
  100. local Taner = GetSpawn(NPC,2360012)
  101. FaceTarget(NPC, Spawn)
  102. if Taner ~=nil then
  103. FaceTarget(Taner,Spawn)
  104. end
  105. if not HasLanguage(Spawn, 9) then -- Language Check for KoaDal (9)
  106. Garbled(NPC, Spawn, Faction)
  107. else
  108. QuestStart(NPC, Spawn)
  109. end
  110. end
  111. end