9
3

TaneranthalisNedaiveren.lua 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. local Jewel = 5459
  10. function spawn(NPC)
  11. ProvidesQuest(NPC, Jewel)
  12. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function InRange (NPC,Spawn)
  18. if GetFactionAmount(Spawn,11) <0 then
  19. GoodFactionEmotes(NPC, Spawn, faction)
  20. else
  21. if math.random(1, 100) <= 60 then
  22. if not HasQuest (Spawn, Jewel) and not HasCompletedQuest(Spawn, Jewel) then
  23. local Lista = GetSpawn(NPC,2360011)
  24. local choice = math.random(1, 3)
  25. if choice == 1 then
  26. FaceTarget(NPC,Spawn)
  27. PlayFlavor(NPC, "", "", "hello", 0, 0, Spawn)
  28. elseif choice == 2 then
  29. FaceTarget(NPC,Spawn)
  30. 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)
  31. else
  32. FaceTarget(NPC,Spawn)
  33. 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)
  34. end
  35. else
  36. FaceTarget(NPC,Spawn)
  37. PlayFlavor(NPC, "", "", "bow", 0, 0, Spawn)
  38. if Lista ~=nil then
  39. FaceTarget(Lista,Spawn)
  40. end
  41. end
  42. end
  43. end
  44. end
  45. function hailed(NPC, Spawn)
  46. local Lista = GetSpawn(NPC,2360011)
  47. FaceTarget(NPC, Spawn)
  48. if GetFactionAmount(Spawn,11) <0 then
  49. FactionChecking(NPC, Spawn, faction)
  50. else
  51. if Lista ~=nil then
  52. FaceTarget(Lista,Spawn)
  53. end
  54. conversation = CreateConversation()
  55. if GetLevel(Spawn) >=7 then
  56. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren000.mp3", "", "", 1954171614, 860807179, Spawn)
  57. if not HasQuest (Spawn, Jewel) and not HasCompletedQuest(Spawn, Jewel) then
  58. AddConversationOption(conversation, "How old are you?", "Old")
  59. end
  60. if GetQuestStep(Spawn, Jewel)==2 then
  61. AddConversationOption(conversation, "Here is your package you requested.","Delievered")
  62. end
  63. AddConversationOption(conversation, "Castleview is a sight to behold, indeed.","Stop")
  64. AddConversationOption(conversation, "If you say so.","Stop")
  65. StartConversation(conversation, NPC, Spawn, "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.")
  66. else
  67. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/100_park_taneranthalis_multhail1_d1775db6.mp3", "Please move on, traveler. I must attend to important business matters.", "", 3098654696, 1348141498, Spawn)
  68. end
  69. end
  70. end
  71. function Old(NPC, Spawn)
  72. FaceTarget(NPC,Spawn)
  73. conversation = CreateConversation()
  74. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren001.mp3", "", "ponder", 1601004679, 425254120, Spawn)
  75. AddConversationOption(conversation, "Of course, what do you need?", "Need")
  76. AddConversationOption(conversation, "Unfortunately, I'm busy.","Stop")
  77. StartConversation(conversation, NPC, Spawn, "I am older than you'd 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... Hmm, would you do me a favor?")
  78. end
  79. function Need(NPC, Spawn)
  80. FaceTarget(NPC,Spawn)
  81. conversation = CreateConversation()
  82. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren002.mp3", "", "agree", 1622360856, 1471149811, Spawn)
  83. AddConversationOption(conversation, "I will be back with your package.", "Package")
  84. AddConversationOption(conversation, "Unfortunately, I'm busy.","Stop")
  85. StartConversation(conversation, NPC, Spawn, "It's a simple task. I need you to deliver a note to Tara Ironforge at the Jewel Box in North Qeynos. The shop isn't difficult to find. It is outside the Ironforge estate. Look for the Ironforge shops in the southern section of the district. Return with the package Tara gives you.")
  86. end
  87. function Delievered(NPC, Spawn)
  88. FaceTarget(NPC,Spawn)
  89. conversation = CreateConversation()
  90. PlayFlavor(NPC, "voiceover/english/taneranthalis_nedaiveren/qey_village04/qst_taneranthalisnedaiveren003.mp3", "", "thank", 3530480629, 3338631885, Spawn)
  91. AddConversationOption(conversation, "I'm glad to have helped.", "Payment")
  92. StartConversation(conversation, NPC, Spawn, "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.")
  93. end
  94. function Package (NPC, Spawn)
  95. FaceTarget(NPC, Spawn)
  96. OfferQuest(NPC, Spawn, Jewel)
  97. end
  98. function Payment(NPC, Spawn)
  99. SetStepComplete(Spawn, Jewel, 2)
  100. end
  101. function Stop(NPC,Spawn)
  102. PlayFlavor(NPC, "", "", "", 0, 0, Spawn)
  103. end