9
3

ChadwickStrohn.lua 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/ChadwickStrohn.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.29 02:06:14
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SetPlayerProximityFunction(NPC, 5, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. GenericEcologyHail(NPC, Spawn, faction)
  16. end
  17. function InRange(NPC,Spawn)
  18. GenericEcologyCallout(NPC, Spawn, faction)
  19. end
  20. function Door(NPC,Spawn)
  21. local door = GetSpawn(NPC, 2340076)
  22. UseWidget(door)
  23. end
  24. function FaceBar(NPC)
  25. SpawnSet(NPC, "heading", "340")
  26. end
  27. function Drink(NPC)
  28. PlayAnimation(NPC,11422)--Drink
  29. AddTimer(NPC,8000, "Drink2")
  30. end
  31. function Drink2(NPC)
  32. choice = math.random(1,4)
  33. if choice == 1 then
  34. PlayAnimation(NPC,891)--Yawn
  35. elseif choice == 2 then
  36. PlayAnimation(NPC,11422) --Drink
  37. elseif choice == 3 then
  38. PlayAnimation(NPC,11152 )--Chuckle
  39. else
  40. PlayAnimation(NPC,11668)--Happy
  41. end
  42. AddTimer(NPC,6000, "Drink3")
  43. end
  44. function Drink3(NPC)
  45. PlayAnimation(NPC,11422)--Drink
  46. end
  47. function waypoints(NPC)
  48. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 1,"FaceBar")
  49. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 33,"Drink")
  50. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 1,"FaceBar")
  51. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 33,"Drink")
  52. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 1,"FaceBar")
  53. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 33,"Drink")
  54. MovementLoopAddLocation(NPC, 721.51, -20.46, 264.45, 2, 0)
  55. MovementLoopAddLocation(NPC, 724.6, -20.46, 265.36, 2, 0)
  56. MovementLoopAddLocation(NPC, 731.57, -20.46, 267.71, 2, 2,"Door")
  57. MovementLoopAddLocation(NPC, 733.14, -20.44, 273.19, 2, 0)
  58. MovementLoopAddLocation(NPC, 742.87, -20.59, 272.5, 2, 0)
  59. MovementLoopAddLocation(NPC, 757.17, -20.56, 271.45, 2, 0)
  60. MovementLoopAddLocation(NPC, 770.17, -20.18, 268.23, 2, 1)
  61. MovementLoopAddLocation(NPC, 770.17, -20.18, 268.23, 2, 45,"EcologyEmotes")
  62. MovementLoopAddLocation(NPC, 769.92, -20.29, 270.06, 2, 0)
  63. MovementLoopAddLocation(NPC, 762.61, -20.45, 273.78, 2, 0)
  64. MovementLoopAddLocation(NPC, 756.2, -20.53, 273.95, 2, 0)
  65. MovementLoopAddLocation(NPC, 733.2, -20.39, 278.06, 2, 0)
  66. MovementLoopAddLocation(NPC, 723.67, -20.41, 281.84, 2, 0)
  67. MovementLoopAddLocation(NPC, 714.94, -19.96, 281.85, 2, 1)
  68. MovementLoopAddLocation(NPC, 714.94, -19.96, 281.85, 2, 33,"EcologyEmotes")
  69. MovementLoopAddLocation(NPC, 714.94, -19.96, 281.85, 2, 1)
  70. MovementLoopAddLocation(NPC, 715.11, -20.1, 282.71, 2, 0)
  71. MovementLoopAddLocation(NPC, 719.85, -20.25, 285.91, 2, 0)
  72. MovementLoopAddLocation(NPC, 731.41, -20.44, 299.04, 2, 0)
  73. MovementLoopAddLocation(NPC, 741.8, -20.35, 307.52, 2, 1)
  74. MovementLoopAddLocation(NPC, 741.8, -20.35, 307.52, 2, 33,"EcologyEmotes")
  75. MovementLoopAddLocation(NPC, 740.17, -20.35, 307.49, 2, 0)
  76. MovementLoopAddLocation(NPC, 736.37, -20.43, 307.91, 2, 0)
  77. MovementLoopAddLocation(NPC, 731.57, -20.53, 319.44, 2, 0)
  78. MovementLoopAddLocation(NPC, 728.9, -20.44, 324.22, 2, 0)
  79. MovementLoopAddLocation(NPC, 737.25, -24.58, 331.81, 2, 0)
  80. MovementLoopAddLocation(NPC, 741.07, -24.71, 332.39, 2, 0)
  81. MovementLoopAddLocation(NPC, 751.24, -24.68, 342.43, 2, 0)
  82. MovementLoopAddLocation(NPC, 762.92, -25.1, 337.17, 2, 0)
  83. MovementLoopAddLocation(NPC, 789.45, -25.03, 326.82, 2, 0)
  84. MovementLoopAddLocation(NPC, 803.05, -25.81, 322.74, 2, 1)
  85. MovementLoopAddLocation(NPC, 803.05, -25.81, 322.74, 2, 33,"EcologyEmotes")
  86. MovementLoopAddLocation(NPC, 803.6, -25.85, 323.19, 2, 0)
  87. MovementLoopAddLocation(NPC, 803.66, -25.76, 320.71, 2, 0)
  88. MovementLoopAddLocation(NPC, 813.02, -25.85, 315.74, 2, 0)
  89. MovementLoopAddLocation(NPC, 816.04, -25.77, 311.51, 2, 1)
  90. MovementLoopAddLocation(NPC, 816.04, -25.77, 311.51, 2, 15,"EcologyEmotes")
  91. MovementLoopAddLocation(NPC, 811.27, -25.29, 308.25, 2, 0)
  92. MovementLoopAddLocation(NPC, 800.87, -20.28, 301.11, 2, 0)
  93. MovementLoopAddLocation(NPC, 793.94, -20.52, 293.89, 2, 0)
  94. MovementLoopAddLocation(NPC, 788.5, -20.53, 291.85, 2, 0)
  95. MovementLoopAddLocation(NPC, 780.62, -20.44, 291.12, 2, 0)
  96. MovementLoopAddLocation(NPC, 764.84, -20.4, 288.55, 2, 0)
  97. MovementLoopAddLocation(NPC, 757.07, -20.42, 283.51, 2, 0)
  98. MovementLoopAddLocation(NPC, 748.26, -20.55, 277.35, 2, 0)
  99. MovementLoopAddLocation(NPC, 742.32, -20.44, 276.29, 2, 0)
  100. MovementLoopAddLocation(NPC, 733.59, -20.44, 275.01, 2, 2,"Door")
  101. MovementLoopAddLocation(NPC, 730.18, -20.46, 267.02, 2, 0)
  102. MovementLoopAddLocation(NPC, 723.55, -20.46, 265.62, 2, 0)
  103. MovementLoopAddLocation(NPC, 722.12, -20.46, 266.63, 2, 0)
  104. end