9
3

RyazVRez.lua 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. --[[
  2. Script Name : SpawnScripts/Longshadow/RyazVRez.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.14 07:10:39
  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. GenericRaceCheckHail(NPC, Spawn)
  16. end
  17. function InRange(NPC,Spawn)
  18. GenericRaceCheckCallout(NPC, Spawn)
  19. end
  20. function respawn(NPC)
  21. spawn(NPC)
  22. end
  23. function waypoints(NPC)
  24. MovementLoopAddLocation(NPC, -34.4, 1.12, 8.4, 2, 1)
  25. MovementLoopAddLocation(NPC, -34.4, 1.12, 8.4, 2, 25,"EcologyEmotes")
  26. MovementLoopAddLocation(NPC, -33.54, 1.12, 9.26, 2, 0)
  27. MovementLoopAddLocation(NPC, -32.92, 1.12, 8.61, 2, 0)
  28. MovementLoopAddLocation(NPC, -34.96, 1.12, 7.71, 2, 0)
  29. MovementLoopAddLocation(NPC, -35.52, 1.12, 5.23, 2, 0)
  30. MovementLoopAddLocation(NPC, -31.78, 1.12, 4.75, 2, 0)
  31. MovementLoopAddLocation(NPC, -29.12, 0.91, 4.45, 2, 2,"Door1")
  32. MovementLoopAddLocation(NPC, -22.8, 0, 5.13, 2, 0)
  33. MovementLoopAddLocation(NPC, -17.83, 0, 5.87, 2, 0)
  34. MovementLoopAddLocation(NPC, -16.44, 0, 15.79, 2, 0)
  35. MovementLoopAddLocation(NPC, -16.44, 0, 15.79, 2, 0)
  36. MovementLoopAddLocation(NPC, -17.33, 0, 18.72, 2, 2,"Door2")
  37. MovementLoopAddLocation(NPC, -18.26, -0.01, 22.46, 2, 0,"Door2")
  38. MovementLoopAddLocation(NPC, -18.18, 0.05, 24.75, 2, 1)
  39. MovementLoopAddLocation(NPC, -18.18, 0.05, 24.75, 2, 30,"EcologyEmotes")
  40. MovementLoopAddLocation(NPC, -19.32, -0.01, 23.11, 2, 0)
  41. MovementLoopAddLocation(NPC, -19.32, -0.01, 23.11, 2, 1)
  42. MovementLoopAddLocation(NPC, -19.32, -0.01, 23.11, 2, 30,"EcologyEmotes")
  43. MovementLoopAddLocation(NPC, -18.7, -0.01, 22.48, 2, 2,"Door2")
  44. MovementLoopAddLocation(NPC, -17.48, 0, 18.09, 2, 0,"Door2")
  45. MovementLoopAddLocation(NPC, -14.74, 0, 9.74, 2, 0)
  46. MovementLoopAddLocation(NPC, -14.47, 0, 1.64, 2, 0)
  47. MovementLoopAddLocation(NPC, -9.82, 0, -8.97, 2, 0)
  48. MovementLoopAddLocation(NPC, -1.07, 0, -16.3, 2, 0)
  49. MovementLoopAddLocation(NPC, 0, 0, -18.88, 2, 0)
  50. MovementLoopAddLocation(NPC, -0.03, 0, -21.61, 2, 0)
  51. MovementLoopAddLocation(NPC, -1.44, 0.04, -23.23, 2, 1)
  52. MovementLoopAddLocation(NPC, -1.44, 0.04, -23.23, 2, 30,"Drink")
  53. MovementLoopAddLocation(NPC, -1.44, 0.04, -23.23, 2, 30,"Drink")
  54. MovementLoopAddLocation(NPC, 0.2, 0, -21.73, 2, 0)
  55. MovementLoopAddLocation(NPC, 2.57, 0, -17.84, 2, 0)
  56. MovementLoopAddLocation(NPC, 4.97, 0, -8.75, 2, 1)
  57. MovementLoopAddLocation(NPC, 4.97, 0, -8.75, 2, 25,"EcologyEmotes")
  58. MovementLoopAddLocation(NPC, 6.07, 0, -10.42, 2, 0)
  59. MovementLoopAddLocation(NPC, 5.6, 0.01, -12.98, 2, 0)
  60. MovementLoopAddLocation(NPC, -0.4, 0, -12.2, 2, 0)
  61. MovementLoopAddLocation(NPC, -8.56, 0, -8.8, 2, 0)
  62. MovementLoopAddLocation(NPC, -14.06, 0, -0.04, 2, 0)
  63. MovementLoopAddLocation(NPC, -23.25, 0, 4.63, 2, 2,"Door1")
  64. MovementLoopAddLocation(NPC, -26.87, -0.01, 5.05, 2, 0)
  65. MovementLoopAddLocation(NPC, -34.59, 1.12, 4.76, 2, 0)
  66. MovementLoopAddLocation(NPC, -35.47, 1.12, 6.23, 2, 0)
  67. end
  68. function Door1(NPC,Spawn)
  69. local door = GetSpawn(NPC, 1380079)
  70. UseWidget(door)
  71. end
  72. function Door2(NPC,Spawn)
  73. local door = GetSpawn(NPC, 1380078)
  74. UseWidget(door)
  75. end
  76. function Drink(NPC)
  77. PlayFlavor(NPC,"","","drinking_idle",0,0)
  78. AddTimer(NPC,8000, "Drink2")
  79. end
  80. function Drink2(NPC)
  81. choice = math.random(1,4)
  82. if choice == 1 then
  83. PlayFlavor(NPC,"","","snicker",0,0)
  84. elseif choice == 2 then
  85. PlayFlavor(NPC,"","","drinking_idle",0,0)
  86. elseif choice == 3 then
  87. PlayFlavor(NPC,"","","sniff",0,0)
  88. else
  89. PlayFlavor(NPC,"","","grumble",0,0)
  90. end
  91. AddTimer(NPC,6000, "Drink3")
  92. end
  93. function Drink3(NPC)
  94. PlayFlavor(NPC,"","","drinking_idle",0,0)
  95. end