9
3

Kianoa.lua 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. --[[
  2. Script Name : SpawnScripts/WillowWood/Kianoa.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.20 06:07:13
  5. Script Purpose :
  6. :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. local CalloutTimer = false
  10. function spawn(NPC)
  11. ProvidesQuest(NPC,5761)
  12. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  13. end
  14. function InRange(NPC, Spawn) --Quest Callout
  15. if GetFactionAmount(Spawn,11)<0 then
  16. PlayFlavor(NPC, "", "", "glare", 0, 0, Spawn)
  17. FaceTarget(NPC, Spawn)
  18. elseif GetRace(Spawn)== 7 or GetRace(Spawn)== 5 then
  19. if not HasQuest(Spawn,5760) and not HasCompletedQuest(Spawn, 5760)then
  20. Talk(NPC,Spawn)
  21. elseif CalloutTimer == false then
  22. CalloutTimer = true
  23. AddTimer(NPC,90000,"ResetCallout",1,Spawn)
  24. Talk(NPC,Spawn)
  25. end
  26. elseif CalloutTimer == false then
  27. CalloutTimer = true
  28. AddTimer(NPC,90000,"ResetCallout",1,Spawn)
  29. Talk(NPC,Spawn)
  30. end
  31. end
  32. function ResetCallout(NPC,Spawn)
  33. CalloutTimer = false
  34. end
  35. function hailed(NPC, Spawn)
  36. if GetRace(Spawn)== 15 or GetRace(Spawn)== 6 or GetRace(Spawn)== 16 then
  37. if not HasQuest(Spawn,5761) and not HasCompletedQuest(Spawn, 5761)then
  38. FaceTarget(NPC, Spawn)
  39. Dialog.New(NPC, Spawn)
  40. Dialog.AddDialog("Have no fear. Your troubles are over. You stand within the harmonious city of Qeynos, and you stand among those who call you friend.")
  41. Dialog.AddVoiceover("voiceover/english/steward_kianoa/qey_village05/steward_kianoa001.mp3", 763946476, 363644920)
  42. PlayFlavor(NPC,"","","nod",0,0,Spawn)
  43. Dialog.AddOption("Thank you for the welcome.","Dialog1")
  44. Dialog.AddOption("I'll have to continue this conversation a bit later.")
  45. Dialog.Start()
  46. else
  47. Talk(NPC,Spawn)
  48. end
  49. else
  50. Talk(NPC,Spawn)
  51. end
  52. end
  53. function Talk(NPC,Spawn)
  54. FaceTarget(NPC, Spawn)
  55. local choice = MakeRandomInt(1,2)
  56. if choice == 1 then
  57. PlayFlavor(NPC,"voiceover/english/steward_kianoa/qey_village05/qst_steward_kianoa_callout1_f727a316.mp3","May the winds of fortune be a cool breeze on your cheek.","nod",809106503,4269106476,Spawn)
  58. elseif choice == 2 then
  59. PlayFlavor(NPC,"voiceover/english/steward_kianoa/qey_village05/qst_steward_kianoa_hail1_9a0c4d73.mp3","May the winds of fortune be a cool breeze on your cheek. Farewell, friend.","hello",3463982245,3183275654,Spawn)
  60. end
  61. end
  62. function respawn(NPC)
  63. spawn(NPC)
  64. end
  65. function Dialog1(NPC, Spawn)
  66. FaceTarget(NPC, Spawn)
  67. Dialog.New(NPC, Spawn)
  68. Dialog.AddDialog("Just as winter frost gives way to summer sun, so shall the night bring the dawn of a new day. I welcome you to a new life among fellow adventurers and journey folk. Home is what you make it, and this is where we call home. Your house awaits your travel-weary body.")
  69. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  70. Dialog.AddVoiceover("voiceover/english/steward_kianoa/qey_village05/steward_kianoa002.mp3", 234701968, 1897463213)
  71. Dialog.AddOption("I agree. I now need to seek a place to rest at night.", "Dialog2")
  72. Dialog.Start()
  73. end
  74. function Dialog2(NPC, Spawn)
  75. FaceTarget(NPC, Spawn)
  76. Dialog.New(NPC, Spawn)
  77. Dialog.AddDialog("Gaze into the sky and find your lucky star for it shines down upon you. Our Gracious Queen, who watches over the city, has given you a home. You shall live among us in the Willow Wood.")
  78. Dialog.AddVoiceover("voiceover/english/steward_kianoa/qey_village05/steward_kianoa003.mp3", 825302588, 3639191813)
  79. PlayFlavor(NPC,"","","agree",0,0,Spawn)
  80. Dialog.AddOption("I must offer her my thanks. You said this is Willow Wood? Where is Qeynos?", "QuestStart")
  81. Dialog.Start()
  82. end
  83. function QuestStart(NPC,Spawn)
  84. FaceTarget(NPC, Spawn)
  85. OfferQuest(NPC,Spawn,5761)
  86. end