9
3

KennethAshburnDayTime.lua 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/KennethAshburnDayTime.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.27 05:06:44
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. if GetFactionAmount(Spawn,11)<0 then
  16. FactionChecking(NPC,Spawn,faction)
  17. else
  18. if GetFactionAmount(Spawn,214)>=20000 then
  19. local choice = MakeRandomInt(1,6)
  20. elseif GetFactionAmount(Spawn,214)>=10000 then
  21. local choice = MakeRandomInt(1,5)
  22. else
  23. local choice = MakeRandomInt(1,4)
  24. if choice == 1 then
  25. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_1a263f4f.mp3", "The Qeynos Guard pledge their lives to protect the city from darkness and chaos.", "", 918343133, 799385310, Spawn, 0)
  26. elseif choice == 2 then
  27. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_35cd2012.mp3", "The Tunarian Alliance would have us battle our foes by nuzzling deer and hiding in the treetops.", "", 2384164425, 1112940264, Spawn, 0)
  28. elseif choice == 3 then
  29. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_92c9c274.mp3", "The Ironforge Exchange attracts those too cowardly and selfish to sacrifice themselves in the defense of Qeynos.", "", 1815005081, 411189458, Spawn, 0)
  30. elseif choice == 4 then
  31. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_9a3054d5.mp3", "Evil must be ground under the full might of good, not greeted with the empathy and naivety of the Celestial Watch.", "", 1796625143, 3832366118, Spawn, 0)
  32. elseif choice == 5 then
  33. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_10_gm_230250f4.mp3", "The Qeynos Guard demands from its recruits adherence to a code of honor and justice.", "", 77474126, 261134203, Spawn, 0)
  34. elseif choice == 6 then
  35. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_20_gm_f3de419f.mp3", "In service to the Qeynos Guard you have performed bravely and without concern for your own safety.", "", 1902356454, 747924750, Spawn, 0)
  36. end
  37. end
  38. end
  39. end
  40. function InRange(NPC,Spawn)
  41. if GetFactionAmount(Spawn,11)<0 then
  42. FactionChecking(NPC,Spawn,faction)
  43. FaceTarget(NPC, Spawn)
  44. else
  45. if math.random(0,100)<=25 then
  46. FaceTarget(NPC, Spawn)
  47. if GetFactionAmount(Spawn,214)>=20000 then
  48. local choice = MakeRandomInt(1,6)
  49. elseif GetFactionAmount(Spawn,214)>=10000 then
  50. local choice = MakeRandomInt(1,5)
  51. else
  52. local choice = MakeRandomInt(1,4)
  53. if choice == 1 then
  54. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_1a263f4f.mp3", "The Qeynos Guard pledge their lives to protect the city from darkness and chaos.", "", 918343133, 799385310, Spawn, 0)
  55. elseif choice == 2 then
  56. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_35cd2012.mp3", "The Tunarian Alliance would have us battle our foes by nuzzling deer and hiding in the treetops.", "", 2384164425, 1112940264, Spawn, 0)
  57. elseif choice == 3 then
  58. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_92c9c274.mp3", "The Ironforge Exchange attracts those too cowardly and selfish to sacrifice themselves in the defense of Qeynos.", "", 1815005081, 411189458, Spawn, 0)
  59. elseif choice == 4 then
  60. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_hail_gm_9a3054d5.mp3", "Evil must be ground under the full might of good, not greeted with the empathy and naivety of the Celestial Watch.", "", 1796625143, 3832366118, Spawn, 0)
  61. elseif choice == 5 then
  62. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_10_gm_230250f4.mp3", "The Qeynos Guard demands from its recruits adherence to a code of honor and justice.", "", 77474126, 261134203, Spawn, 0)
  63. elseif choice == 6 then
  64. PlayFlavor(NPC, "voiceover/english/human_eco_good_qeynosguard/ft/eco/good/human_eco_good_qeynosguard_20_gm_f3de419f.mp3", "In service to the Qeynos Guard you have performed bravely and without concern for your own safety.", "", 1902356454, 747924750, Spawn, 0)
  65. end
  66. end
  67. end
  68. end
  69. end
  70. function waypoints(NPC)
  71. MovementLoopAddLocation(NPC, 676.57, -20.36, 317.02, 2, 5)
  72. MovementLoopAddLocation(NPC, 676.57, -20.36, 317.02, 2, 52,"EcologyEmotes")
  73. MovementLoopAddLocation(NPC, 676.56, -20.37, 318.1, 2, 0)
  74. MovementLoopAddLocation(NPC, 674.78, -20.44, 320.6, 2, 0)
  75. MovementLoopAddLocation(NPC, 675.25, -20.54, 323.9, 2, 0)
  76. MovementLoopAddLocation(NPC, 678.53, -20.42, 332.51, 2, 0)
  77. MovementLoopAddLocation(NPC, 678.39, -20.35, 339.77, 2, 0)
  78. MovementLoopAddLocation(NPC, 676.19, -24.54, 350.38, 2, 0)
  79. MovementLoopAddLocation(NPC, 675.29, -24.71, 354.7, 2, 0)
  80. MovementLoopAddLocation(NPC, 669.2, -24.71, 361.29, 2, 0)
  81. MovementLoopAddLocation(NPC, 665.52, -24.59, 364.12, 2, 0)
  82. MovementLoopAddLocation(NPC, 665.73, -24.57, 364.79, 2, 1)
  83. MovementLoopAddLocation(NPC, 665.73, -24.57, 364.79, 2, 45,"Drink")
  84. MovementLoopAddLocation(NPC, 665.73, -24.57, 364.79, 2, 45,"Drink")
  85. MovementLoopAddLocation(NPC, 665.95, -24.55, 365.46, 2, 0)
  86. MovementLoopAddLocation(NPC, 665.04, -24.6, 363.9, 2, 0)
  87. MovementLoopAddLocation(NPC, 665.59, -24.82, 357.02, 2, 0)
  88. MovementLoopAddLocation(NPC, 670.77, -24.05, 344.67, 2, 0)
  89. MovementLoopAddLocation(NPC, 670.8, -23.14, 341.46, 2, 0)
  90. MovementLoopAddLocation(NPC, 661.23, -22.48, 335.84, 2, 0)
  91. MovementLoopAddLocation(NPC, 649.30, -22.27, 325.81, 2, 1)
  92. MovementLoopAddLocation(NPC, 649.30, -22.27, 325.81, 2, 55,"EcologyEmotes")
  93. MovementLoopAddLocation(NPC, 650.31, -22.29, 328.25, 2, 0)
  94. MovementLoopAddLocation(NPC, 654.48, -22.3, 329.73, 2, 0)
  95. MovementLoopAddLocation(NPC, 664.35, -20.44, 326.54, 2, 0)
  96. MovementLoopAddLocation(NPC, 667.64, -20.43, 318.17, 2, 0)
  97. MovementLoopAddLocation(NPC, 670.65, -20.38, 310.43, 2, 5)
  98. MovementLoopAddLocation(NPC, 670.65, -20.38, 310.43, 2, 55,"EcologyEmotes")
  99. MovementLoopAddLocation(NPC, 671.90, -20.41, 310.66, 2, 0)
  100. MovementLoopAddLocation(NPC, 671.21, -20.42, 313.6, 2, 0)
  101. MovementLoopAddLocation(NPC, 671.76, -20.42, 317.55, 2, 0)
  102. MovementLoopAddLocation(NPC, 674.93, -20.42, 315.75, 2, 0)
  103. end
  104. function Drink(NPC)
  105. PlayAnimation(NPC,11422)
  106. AddTimer(NPC,8000, "Drink2")
  107. end
  108. function Drink2(NPC)
  109. choice = math.random(1,4)
  110. if choice == 1 then
  111. PlayAnimation(NPC,891)
  112. elseif choice == 2 then
  113. PlayAnimation(NPC,11422)
  114. elseif choice == 3 then
  115. PlayFlavor(NPC,"","","flirt",0,0)
  116. else
  117. PlayAnimation(NPC,11668)
  118. end
  119. AddTimer(NPC,6000, "Drink3")
  120. end
  121. function Drink3(NPC)
  122. PlayAnimation(NPC,11422)
  123. end