LodzBouldercrack.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. --[[
  2. Script Name : SpawnScripts/Graystone/LodzBouldercrack.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.07.07 06:07:25
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  11. waypoints(NPC)
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. GenericEcologyHail(NPC, Spawn, faction)
  16. end
  17. function InRange(NPC, Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. GenericEcologyHail(NPC, Spawn, faction)
  20. end
  21. end
  22. function waypoints(NPC)
  23. MovementLoopAddLocation(NPC, 847.06, -25.15, -161.23, 2, 1)
  24. MovementLoopAddLocation(NPC, 847.06, -25.15, -161.23, 2, 35,"EcologyEmotes")
  25. MovementLoopAddLocation(NPC, 847.4, -25.07, -161.86, 2, 0)
  26. MovementLoopAddLocation(NPC, 853.3, -23.72, -163.25, 2, 0)
  27. MovementLoopAddLocation(NPC, 859.91, -22.08, -161.79, 2, 1)
  28. MovementLoopAddLocation(NPC, 859.91, -22.08, -161.79, 2, 35,"EcologyEmotes")
  29. MovementLoopAddLocation(NPC, 860.74, -22.15, -162.88, 2, 0)
  30. MovementLoopAddLocation(NPC, 857.47, -22.86, -163.97, 2, 0)
  31. MovementLoopAddLocation(NPC, 849.56, -24.42, -165.63, 2, 0)
  32. MovementLoopAddLocation(NPC, 843.41, -25.01, -163.61, 2, 0)
  33. MovementLoopAddLocation(NPC, 841.27, -25.31, -161.56, 2, 0)
  34. MovementLoopAddLocation(NPC, 835.04, -25.49, -156.3, 2, 0)
  35. MovementLoopAddLocation(NPC, 835.05, -25.01, -154.09, 2, 0)
  36. MovementLoopAddLocation(NPC, 844.79, -24.44, -153.4, 2, 0)
  37. MovementLoopAddLocation(NPC, 857.57, -23.97, -153.51, 2, 0)
  38. MovementLoopAddLocation(NPC, 871.75, -23.66, -153.26, 2, 0)
  39. MovementLoopAddLocation(NPC, 883.66, -24.85, -150.87, 2, 0)
  40. MovementLoopAddLocation(NPC, 893.56, -24.92, -152.3, 2, 0)
  41. MovementLoopAddLocation(NPC, 904.1, -25.01, -153.99, 2, 1)
  42. MovementLoopAddLocation(NPC, 904.1, -25.01, -153.99, 2, 35,"EcologyEmotes")
  43. MovementLoopAddLocation(NPC, 905.39, -25.03, -153.55, 2, 0)
  44. MovementLoopAddLocation(NPC, 904.06, -24.97, -151.55, 2, 0)
  45. MovementLoopAddLocation(NPC, 900.19, -24.96, -144.98, 2, 0)
  46. MovementLoopAddLocation(NPC, 902.28, -25.01, -139.56, 2, 0)
  47. MovementLoopAddLocation(NPC, 901.53, -25.02, -138.42, 2, 0)
  48. MovementLoopAddLocation(NPC, 897.39, -24.99, -136.1, 2, 0)
  49. MovementLoopAddLocation(NPC, 895.12, -25.45, -134.77, 2, 0)
  50. MovementLoopAddLocation(NPC, 894.4, -25.45, -132.54, 2, 0)
  51. MovementLoopAddLocation(NPC, 894.43, -25.45, -124.36, 2, 0)
  52. MovementLoopAddLocation(NPC, 892.21, -25.45, -121.75, 2, 1)
  53. MovementLoopAddLocation(NPC, 892.21, -25.45, -121.75, 2, 30,"Drink")
  54. MovementLoopAddLocation(NPC, 892.63, -25.45, -122.04, 2, 0)
  55. MovementLoopAddLocation(NPC, 892.63, -25.45, -122.04, 2, 30,"Drink")
  56. MovementLoopAddLocation(NPC, 892.63, -25.45, -122.04, 2, 30,"Drink")
  57. MovementLoopAddLocation(NPC, 894.78, -25.45, -124.14, 2, 0)
  58. MovementLoopAddLocation(NPC, 893.4, -25.45, -139.21, 2, 0)
  59. MovementLoopAddLocation(NPC, 895.41, -24.91, -140.91, 2, 0)
  60. MovementLoopAddLocation(NPC, 898.24, -24.94, -143.25, 2, 0)
  61. MovementLoopAddLocation(NPC, 901.4, -24.98, -141.9, 2, 0)
  62. MovementLoopAddLocation(NPC, 901.16, -24.98, -140.48, 2, 0)
  63. MovementLoopAddLocation(NPC, 895.68, -22.54, -137.45, 2, 0)
  64. MovementLoopAddLocation(NPC, 890.2, -22.01, -136.2, 2, 0)
  65. MovementLoopAddLocation(NPC, 879.57, -22.21, -136.51, 2, 1)
  66. MovementLoopAddLocation(NPC, 879.57, -22.21, -136.51, 2, 35,"EcologyEmotes")
  67. MovementLoopAddLocation(NPC, 879.37, -22.21, -137.51, 2, 0)
  68. MovementLoopAddLocation(NPC, 878.43, -22.21, -142.37, 2, 0)
  69. MovementLoopAddLocation(NPC, 874.04, -22.21, -144.16, 2, 0)
  70. MovementLoopAddLocation(NPC, 869.14, -22.21, -145.34, 2, 0)
  71. MovementLoopAddLocation(NPC, 856.82, -22.21, -143.58, 2, 1)
  72. MovementLoopAddLocation(NPC, 856.82, -22.21, -143.58, 2, 35,"EcologyEmotes")
  73. MovementLoopAddLocation(NPC, 855.26, -22.21, -142.79, 2, 0)
  74. MovementLoopAddLocation(NPC, 855.26, -22.21, -141.77, 2, 0)
  75. MovementLoopAddLocation(NPC, 862.36, -22.21, -147.3, 2, 0)
  76. MovementLoopAddLocation(NPC, 863.88, -22, -149.19, 2, 0)
  77. MovementLoopAddLocation(NPC, 864, -22.71, -150.99, 2, 0)
  78. MovementLoopAddLocation(NPC, 848.75, -24.23, -151.16, 2, 0)
  79. MovementLoopAddLocation(NPC, 838.14, -24.92, -151.24, 2, 0)
  80. MovementLoopAddLocation(NPC, 833.78, -25.01, -153.45, 2, 1)
  81. MovementLoopAddLocation(NPC, 833.78, -25.01, -153.45, 2, 18,"EcologyEmotes")
  82. MovementLoopAddLocation(NPC, 834.69, -25.49, -155.81, 2, 0)
  83. MovementLoopAddLocation(NPC, 838.01, -25.22, -161.89, 2, 0)
  84. MovementLoopAddLocation(NPC, 843.78, -24.47, -167.4, 2, 0)
  85. MovementLoopAddLocation(NPC, 846.93, -24.86, -164.01, 2, 0)
  86. end
  87. function Drink(NPC)
  88. PlayFlavor(NPC,"","","drinking_idle",0,0)
  89. AddTimer(NPC,8000, "Drink2")
  90. end
  91. function Drink2(NPC)
  92. choice = math.random(1,4)
  93. if choice == 1 then
  94. PlayFlavor(NPC,"","","yawn",0,0)
  95. elseif choice == 2 then
  96. PlayFlavor(NPC,"","","drinking_idle",0,0)
  97. elseif choice == 3 then
  98. PlayFlavor(NPC,"","","ponder",0,0)
  99. else
  100. PlayFlavor(NPC,"","","happy",0,0)
  101. end
  102. AddTimer(NPC,6000, "Drink3")
  103. end
  104. function Drink3(NPC)
  105. PlayFlavor(NPC,"","","drinking_idle",0,0)
  106. end