TaneranthalisNedaiveren.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  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. SetInfoStructString(NPC, "action_state", "ponder")
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function InRange (NPC,Spawn)
  20. if GetFactionAmount(Spawn,11) <0 then
  21. GoodFactionEmotes(NPC, Spawn, faction)
  22. else
  23. if math.random(1, 100) <= 66 then
  24. if not HasQuest (Spawn, Jewel) and not HasCompletedQuest(Spawn, Jewel) then
  25. local Lista = GetSpawn(NPC,2360011)
  26. local choice = MakeRandomInt(1, 3)
  27. if choice == 1 then
  28. FaceTarget(NPC,Spawn)
  29. 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)
  30. elseif choice == 2 then
  31. FaceTarget(NPC,Spawn)
  32. 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)
  33. else
  34. FaceTarget(NPC,Spawn)
  35. 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)
  36. end
  37. else
  38. FaceTarget(NPC,Spawn)
  39. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  40. if Lista ~=nil then
  41. FaceTarget(Lista,Spawn)
  42. end
  43. end
  44. end
  45. end
  46. end
  47. function hailed(NPC, Spawn)
  48. local Lista = GetSpawn(NPC,2360011)
  49. FaceTarget(NPC, Spawn)
  50. if GetFactionAmount(Spawn,11) <0 then
  51. FactionChecking(NPC, Spawn, faction)
  52. else
  53. if Lista ~=nil then
  54. FaceTarget(Lista,Spawn)
  55. end
  56. FaceTarget(NPC, Spawn)
  57. Dialog.New(NPC, Spawn)
  58. 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.")
  59. Dialog.AddVoiceover("voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren000.mp3",1954171614, 860807179)
  60. PlayFlavor(NPC, "", "", "nod", 0, 0, Spawn)
  61. if not HasQuest (Spawn, Jewel) and not HasCompletedQuest(Spawn, Jewel) and GetLevel(Spawn) >=7 then
  62. Dialog.AddOption("Surely you can't be old enough to remember Felwithe!", "Old")
  63. elseif GetQuestStep(Spawn, Jewel)==2 then
  64. Dialog.AddOption("I've brought back the box from Tara.","Delievered")
  65. end
  66. Dialog.AddOption("Castleview is a sight to behold, indeed.")
  67. Dialog.AddOption("I'm not much one for reminiscing.")
  68. Dialog.Start()
  69. end
  70. end
  71. function Old(NPC, Spawn)
  72. FaceTarget(NPC, Spawn)
  73. Dialog.New(NPC, Spawn)
  74. 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?")
  75. Dialog.AddVoiceover("voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren001.mp3",1601004679, 425254120)
  76. PlayFlavor(NPC, "", "", "orate", 0,0 , Spawn)
  77. Dialog.AddOption("I believe I can aid you.", "Package")
  78. Dialog.AddOption("Unfortunately, I'm busy.")
  79. Dialog.Start()
  80. end
  81. function Delievered(NPC, Spawn)
  82. SetStepComplete(Spawn, Jewel, 2)
  83. FaceTarget(NPC, Spawn)
  84. Dialog.New(NPC, Spawn)
  85. 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.")
  86. Dialog.AddVoiceover("voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren003.mp3",3530480629, 3338631885)
  87. PlayFlavor(NPC, "", "", "bow", 0,0 , Spawn)
  88. Dialog.AddOption("I wish you all the best in the future.")
  89. Dialog.Start()
  90. end
  91. function Package (NPC, Spawn)
  92. FaceTarget(NPC, Spawn)
  93. OfferQuest(NPC, Spawn, Jewel)
  94. end