ChadwickStrohn.lua 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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 Drink3(NPC)
  28. PlayAnimation(NPC,11422)--Drink
  29. end
  30. function Drink(NPC)
  31. PlayFlavor(NPC,"","","drinking_idle",0,0)
  32. AddTimer(NPC,8000, "Drink2")
  33. end
  34. function Drink2(NPC)
  35. choice = math.random(1,4)
  36. if choice == 1 then
  37. PlayFlavor(NPC,"","","yawn",0,0)
  38. elseif choice == 2 then
  39. PlayFlavor(NPC,"","","drinking_idle",0,0)
  40. elseif choice == 3 then
  41. PlayFlavor(NPC,"","","chuckle",0,0)
  42. else
  43. PlayFlavor(NPC,"","","happy",0,0)
  44. end
  45. AddTimer(NPC,6000, "Drink3")
  46. end
  47. function Drink3(NPC)
  48. PlayFlavor(NPC,"","","drinking_idle",0,0)
  49. end
  50. function waypoints(NPC)
  51. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 1,"FaceBar")
  52. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 33,"Drink")
  53. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 1,"FaceBar")
  54. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 33,"Drink")
  55. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 1,"FaceBar")
  56. MovementLoopAddLocation(NPC, 721.14, -20.47, 264.76, 2, 33,"Drink")
  57. MovementLoopAddLocation(NPC, 721.51, -20.46, 264.45, 2, 0)
  58. MovementLoopAddLocation(NPC, 724.6, -20.46, 265.36, 2, 0)
  59. MovementLoopAddLocation(NPC, 731.57, -20.46, 267.71, 2, 2,"Door")
  60. MovementLoopAddLocation(NPC, 733.14, -20.44, 273.19, 2, 0)
  61. MovementLoopAddLocation(NPC, 742.87, -20.59, 272.5, 2, 0)
  62. MovementLoopAddLocation(NPC, 757.17, -20.56, 271.45, 2, 0)
  63. MovementLoopAddLocation(NPC, 770.17, -20.18, 268.23, 2, 1)
  64. MovementLoopAddLocation(NPC, 770.17, -20.18, 268.23, 2, 45,"EcologyEmotes")
  65. MovementLoopAddLocation(NPC, 769.92, -20.29, 270.06, 2, 0)
  66. MovementLoopAddLocation(NPC, 762.61, -20.45, 273.78, 2, 0)
  67. MovementLoopAddLocation(NPC, 756.2, -20.53, 273.95, 2, 0)
  68. MovementLoopAddLocation(NPC, 733.2, -20.39, 278.06, 2, 0)
  69. MovementLoopAddLocation(NPC, 723.67, -20.41, 281.84, 2, 0)
  70. MovementLoopAddLocation(NPC, 714.94, -19.96, 281.85, 2, 1)
  71. MovementLoopAddLocation(NPC, 714.94, -19.96, 281.85, 2, 33,"EcologyEmotes")
  72. MovementLoopAddLocation(NPC, 714.94, -19.96, 281.85, 2, 1)
  73. MovementLoopAddLocation(NPC, 715.11, -20.1, 282.71, 2, 0)
  74. MovementLoopAddLocation(NPC, 719.85, -20.25, 285.91, 2, 0)
  75. MovementLoopAddLocation(NPC, 731.41, -20.44, 299.04, 2, 0)
  76. MovementLoopAddLocation(NPC, 741.8, -20.35, 307.52, 2, 1)
  77. MovementLoopAddLocation(NPC, 741.8, -20.35, 307.52, 2, 33,"EcologyEmotes")
  78. MovementLoopAddLocation(NPC, 740.17, -20.35, 307.49, 2, 0)
  79. MovementLoopAddLocation(NPC, 736.37, -20.43, 307.91, 2, 0)
  80. MovementLoopAddLocation(NPC, 731.57, -20.53, 319.44, 2, 0)
  81. MovementLoopAddLocation(NPC, 728.9, -20.44, 324.22, 2, 0)
  82. MovementLoopAddLocation(NPC, 737.25, -24.58, 331.81, 2, 0)
  83. MovementLoopAddLocation(NPC, 741.07, -24.71, 332.39, 2, 0)
  84. MovementLoopAddLocation(NPC, 751.24, -24.68, 342.43, 2, 0)
  85. MovementLoopAddLocation(NPC, 762.92, -25.1, 337.17, 2, 0)
  86. MovementLoopAddLocation(NPC, 789.45, -25.03, 326.82, 2, 0)
  87. MovementLoopAddLocation(NPC, 803.05, -25.81, 322.74, 2, 1)
  88. MovementLoopAddLocation(NPC, 803.05, -25.81, 322.74, 2, 33,"EcologyEmotes")
  89. MovementLoopAddLocation(NPC, 803.6, -25.85, 323.19, 2, 0)
  90. MovementLoopAddLocation(NPC, 803.66, -25.76, 320.71, 2, 0)
  91. MovementLoopAddLocation(NPC, 813.02, -25.85, 315.74, 2, 0)
  92. MovementLoopAddLocation(NPC, 816.04, -25.77, 311.51, 2, 1)
  93. MovementLoopAddLocation(NPC, 816.04, -25.77, 311.51, 2, 15,"EcologyEmotes")
  94. MovementLoopAddLocation(NPC, 811.27, -25.29, 308.25, 2, 0)
  95. MovementLoopAddLocation(NPC, 800.87, -20.28, 301.11, 2, 0)
  96. MovementLoopAddLocation(NPC, 793.94, -20.52, 293.89, 2, 0)
  97. MovementLoopAddLocation(NPC, 788.5, -20.53, 291.85, 2, 0)
  98. MovementLoopAddLocation(NPC, 780.62, -20.44, 291.12, 2, 0)
  99. MovementLoopAddLocation(NPC, 764.84, -20.4, 288.55, 2, 0)
  100. MovementLoopAddLocation(NPC, 757.07, -20.42, 283.51, 2, 0)
  101. MovementLoopAddLocation(NPC, 748.26, -20.55, 277.35, 2, 0)
  102. MovementLoopAddLocation(NPC, 742.32, -20.44, 276.29, 2, 0)
  103. MovementLoopAddLocation(NPC, 733.59, -20.44, 275.01, 2, 2,"Door")
  104. MovementLoopAddLocation(NPC, 730.18, -20.46, 267.02, 2, 0)
  105. MovementLoopAddLocation(NPC, 723.55, -20.46, 265.62, 2, 0)
  106. MovementLoopAddLocation(NPC, 722.12, -20.46, 266.63, 2, 0)
  107. end