TaneranthalisNedaiveren.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --[[
  2. Script Name : SpawnScripts/Castleview/TaneranthalisNedaiveren.lua
  3. Script Purpose : Taneranthalis Nedaiveren
  4. Script Author : Dorbin
  5. Script Date : 2022.01.26
  6. Script Notes :
  7. --]]
  8. require "SpawnScripts/Generic/DialogModule"
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. local Jewel = 5459
  11. function spawn(NPC)
  12. ProvidesQuest(NPC, Jewel)
  13. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange (NPC,Spawn)
  19. if GetFactionAmount(Spawn,11) <0 then
  20. GoodFactionEmotes(NPC, Spawn, faction)
  21. else
  22. if math.random(1, 100) <= 66 then
  23. if not HasQuest (Spawn, Jewel) and not HasCompletedQuest(Spawn, Jewel) then
  24. local Lista = GetSpawn(NPC,2360011)
  25. local choice = MakeRandomInt(1, 3)
  26. if choice == 1 then
  27. FaceTarget(NPC,Spawn)
  28. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/100_park_taneranthalis_callout_b8c9bef.mp3", "Please be at ease. Though we stand outside the great gates of the city proper, you are as safe in Castleview as anywhere in Norrath!", "agree", 4095321012, 2558651917, Spawn)
  29. elseif choice == 2 then
  30. FaceTarget(NPC,Spawn)
  31. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/100_park_taneranthalis_callout_b8c9bef.mp3", "Please be at ease. Though we stand outside the great gates of the city proper, you are as safe in Castleview as anywhere in Norrath!", "agree", 4095321012, 2558651917, Spawn)
  32. else
  33. FaceTarget(NPC,Spawn)
  34. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/100_park_taneranthalis_multhail2_c2e4d5a7.mp3", "It seems like just yesterday I was a small child brought to Qeynos from Felwithe. Though its white towers are but a distant memory, the Koada'dal in Castleview keep the elven spirit alive", "", 2103458666, 2948247370, Spawn)
  35. end
  36. else
  37. FaceTarget(NPC,Spawn)
  38. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  39. if Lista ~=nil then
  40. FaceTarget(Lista,Spawn)
  41. end
  42. end
  43. end
  44. end
  45. end
  46. function hailed(NPC, Spawn)
  47. local Lista = GetSpawn(NPC,2360011)
  48. FaceTarget(NPC, Spawn)
  49. if GetFactionAmount(Spawn,11) <0 then
  50. FactionChecking(NPC, Spawn, faction)
  51. else
  52. if Lista ~=nil then
  53. FaceTarget(Lista,Spawn)
  54. end
  55. FaceTarget(NPC, Spawn)
  56. Dialog.New(NPC, Spawn)
  57. Dialog.AddDialog("It seems like yesterday... I was just a child when I was brought to Qeynos from Felwithe. Though its white towers are but a distant memory, the Koada'Dal here in Castleview keep the elven spirit alive.")
  58. Dialog.AddVoiceover("voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren000.mp3",1954171614, 860807179)
  59. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  60. if not HasQuest (Spawn, Jewel) and not HasCompletedQuest(Spawn, Jewel) and GetLevel(Spawn) >=7 then
  61. Dialog.AddOption("Surely you can't be old enough to remember Felwithe!", "Old")
  62. elseif GetQuestStep(Spawn, Jewel)==2 then
  63. Dialog.AddOption("I've brought back the box from Tara.","Delievered")
  64. end
  65. Dialog.AddOption("Castleview is a sight to behold, indeed.")
  66. Dialog.AddOption("I'm not much one for reminiscing.")
  67. Dialog.Start()
  68. end
  69. end
  70. function Old(NPC, Spawn)
  71. FaceTarget(NPC, Spawn)
  72. Dialog.New(NPC, Spawn)
  73. Dialog.AddDialog("I am older than you think. I've walked the earth for more than three centuries. My age brings to light that I've not chosen a life partner. Of late, Listalania and I are getting closer. Perhaps the time is nigh for me to seek her hand... Hmmmmm, would you do me a favor?")
  74. Dialog.AddVoiceover("voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren001.mp3",1601004679, 425254120)
  75. PlayFlavor(NPC, "", "", "orate", 0,0 , Spawn)
  76. Dialog.AddOption("I believe I can aid you.", "Package")
  77. Dialog.AddOption("Unfortunately, I'm busy.")
  78. Dialog.Start()
  79. end
  80. function Delievered(NPC, Spawn)
  81. SetStepComplete(Spawn, Jewel, 2)
  82. FaceTarget(NPC, Spawn)
  83. Dialog.New(NPC, Spawn)
  84. Dialog.AddDialog("Thank you. I'm not certain when I'll ask Listalania, but now I'm prepared for when that time comes. You've done me a great service. Please accept these coins as a token of my gratitude.")
  85. Dialog.AddVoiceover("voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren003.mp3",3530480629, 3338631885)
  86. PlayFlavor(NPC, "", "", "bow", 0,0 , Spawn)
  87. Dialog.AddOption("I wish you all the best in the future.")
  88. Dialog.Start()
  89. end
  90. function Package (NPC, Spawn)
  91. FaceTarget(NPC, Spawn)
  92. OfferQuest(NPC, Spawn, Jewel)
  93. end