9
3

ListalaniaVainederian.lua 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. SetInfoStructString(NPC, "action_state", "orate")
  16. end
  17. function respawn(NPC)
  18. spawn(NPC)
  19. end
  20. function InRange(NPC, Spawn)
  21. if GetFactionAmount(Spawn,11) <0 then
  22. FactionChecking(NPC, Spawn, faction)
  23. else
  24. if not HasLanguage(Spawn, 9) then
  25. if MakeRandomInt(1, 100) <= 66 then
  26. Garbled(NPC, Spawn, Faction)
  27. end
  28. else
  29. if MakeRandomInt(1, 100) <= 70 then
  30. if not HasCompletedQuest (Spawn, Reservation) and not HasQuest (Spawn, Reservation) then
  31. FaceTarget(NPC,Spawn)
  32. 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)
  33. local choice = math.random(1,2)
  34. else
  35. if choice == 1 then
  36. 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)
  37. FaceTarget(NPC,Spawn)
  38. elseif choice == 2 then
  39. FaceTarget(NPC,Spawn)
  40. 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
  41. end
  42. end
  43. end
  44. end
  45. end
  46. function LeaveRange(NPC, Spawn)
  47. end
  48. function QuestStart(NPC, Spawn, conversation)
  49. FaceTarget(NPC, Spawn)
  50. Dialog.New(NPC, Spawn)
  51. Dialog.AddDialog("What a glorious day! Castleview is lovely this time of year, isn't it? The beauty of Qeynos herself calls me though...")
  52. Dialog.AddVoiceover("voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian.mp3", 2220724575, 2462118771)
  53. PlayFlavor(NPC, "", "", "curtsey", 0, 0, Spawn)
  54. if not HasQuest (Spawn, Reservation) and not HasCompletedQuest(Spawn, Reservation) then
  55. Dialog.AddOption("Have you been inside Qeynos?", "Long")
  56. elseif HasQuest (Spawn, Reservation) and GetQuestStep(Spawn, Reservation) == 2 then
  57. Dialog.AddOption("Innkeeper Valean has a room ready for your friend.", "ReservationMade")
  58. end
  59. Dialog.AddOption("I understand your desire. Good day to you.")
  60. Dialog.Start()
  61. end
  62. function Long(NPC, Spawn)
  63. FaceTarget(NPC, Spawn)
  64. Dialog.New(NPC, Spawn)
  65. 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?")
  66. Dialog.AddVoiceover("voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian000.mp3",3000457446, 1615662591)
  67. PlayFlavor(NPC, "", "", "nod", 0,0 , Spawn)
  68. Dialog.AddOption("I can indeed.", "Valean")
  69. Dialog.AddOption("Sorry, I just stopped by to chat.")
  70. Dialog.Start()
  71. end
  72. function Valean (NPC, Spawn)
  73. FaceTarget(NPC, Spawn)
  74. OfferQuest(NPC, Spawn, Reservation)
  75. end
  76. function ReservationMade(NPC, Spawn)
  77. FaceTarget(NPC, Spawn)
  78. Dialog.New(NPC, Spawn)
  79. 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.")
  80. Dialog.AddVoiceover("voiceover/english/listalania_vainederian/qey_village04/listalaniavainederian002.mp3",1021398410, 333389770)
  81. PlayFlavor(NPC, "", "", "fullcurtsey", 0,0 , Spawn)
  82. Dialog.AddOption("Thank you, milady.", "Payment")
  83. Dialog.AddOption("Congratulations on your... ", "Payment1")
  84. Dialog.Start()
  85. end
  86. function Payment1(NPC, Spawn)
  87. FaceTarget(NPC, Spawn)
  88. conversation = CreateConversation()
  89. PlayFlavor(NPC, "","", "doubletake", 0, 0, Spawn)
  90. AddConversationOption(conversation, "Err... nevermind. Take care.", "Payment")
  91. StartConversation(conversation, NPC, Spawn, "My what?")
  92. end
  93. function Payment(NPC, Spawn)
  94. SetStepComplete(Spawn, Reservation, 2)
  95. end
  96. function hailed(NPC, Spawn)
  97. FaceTarget(NPC, Spawn)
  98. if GetFactionAmount(Spawn, 11) <0 then
  99. FactionChecking(NPC, Spawn, faction)
  100. else
  101. local Taner = GetSpawn(NPC,2360012)
  102. FaceTarget(NPC, Spawn)
  103. if Taner ~=nil then
  104. FaceTarget(Taner,Spawn)
  105. end
  106. if not HasLanguage(Spawn, 9) then -- Language Check for KoaDal (9)
  107. Garbled(NPC, Spawn, Faction)
  108. else
  109. QuestStart(NPC, Spawn)
  110. end
  111. end
  112. end