9
3

AndrewLeicester.lua 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/AndrewLeicester.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.21 08:06:55
  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. if GetFactionAmount(Spawn,11)<0 then
  19. GenericEcologyCallout(NPC, Spawn, faction)
  20. end
  21. end
  22. function waypoints(NPC)
  23. MovementLoopAddLocation(NPC, 667.08, -24.59, 364.59, 2, 1)
  24. MovementLoopAddLocation(NPC, 667.08, -24.59, 364.59, 2, 45,"Drink")
  25. MovementLoopAddLocation(NPC, 667.08, -24.59, 364.59, 2, 45,"Drink")
  26. MovementLoopAddLocation(NPC, 667.08, -24.59, 364.59, 2, 45,"Drink")
  27. MovementLoopAddLocation(NPC, 666.99, -24.57, 365.05, 2, 0)
  28. MovementLoopAddLocation(NPC, 666.08, -24.62, 363.20, 2, 0)
  29. MovementLoopAddLocation(NPC, 659.52, -24.64, 365.4, 2, 0)
  30. MovementLoopAddLocation(NPC, 654.11, -24.7, 367.96, 2, 0)
  31. MovementLoopAddLocation(NPC, 645.01, -24.73, 373.11, 2, 0)
  32. MovementLoopAddLocation(NPC, 634.48, -24.97, 378.5, 2, 0)
  33. MovementLoopAddLocation(NPC, 631.31, -25.16, 379.01, 2, 0)
  34. MovementLoopAddLocation(NPC, 620.32, -25.97, 376.09, 2, 0)
  35. MovementLoopAddLocation(NPC, 615.55, -26.3, 376.08, 2, 0)
  36. MovementLoopAddLocation(NPC, 599.87, -26.48, 379.27, 2, 0)
  37. MovementLoopAddLocation(NPC, 599.87, -26.48, 379.27, 2, 0)
  38. MovementLoopAddLocation(NPC, 599.78, -26.49, 379.78, 2, 0)
  39. MovementLoopAddLocation(NPC, 599.93, -26.51, 381.12, 2, 1)
  40. MovementLoopAddLocation(NPC, 599.93, -26.51, 381.12, 2, 22,"EcologyEmotes")
  41. MovementLoopAddLocation(NPC, 599.93, -26.51, 381.12, 2, 25,"EcologyEmotes")
  42. MovementLoopAddLocation(NPC, 598.16, -26.47, 379.93, 2, 0)
  43. MovementLoopAddLocation(NPC, 595.46, -26.42, 379.64, 2, 0)
  44. MovementLoopAddLocation(NPC, 591.84, -26.41, 378.62, 2, 0)
  45. MovementLoopAddLocation(NPC, 589.6, -26.4, 378.57, 2, 0)
  46. MovementLoopAddLocation(NPC, 586.74, -25.76, 373.23, 2, 1,"FaceGate")
  47. MovementLoopAddLocation(NPC, 586.74, -25.76, 373.23, 2, 35,"EcologyEmotes")
  48. MovementLoopAddLocation(NPC, 586.74, -25.76, 373.23, 2, 35,"EcologyEmotes")
  49. MovementLoopAddLocation(NPC, 586.73, -26.21, 375.45, 2, 0)
  50. MovementLoopAddLocation(NPC, 592.93, -26.1, 376.45, 2, 0)
  51. MovementLoopAddLocation(NPC, 592.93, -26.1, 376.45, 2, 0)
  52. MovementLoopAddLocation(NPC, 592.93, -26.1, 376.45, 2, 0)
  53. MovementLoopAddLocation(NPC, 613.9, -26.35, 374.34, 2, 0)
  54. MovementLoopAddLocation(NPC, 619.35, -25.86, 371.68, 2, 0)
  55. MovementLoopAddLocation(NPC, 624.19, -25.35, 372.34, 2, 0)
  56. MovementLoopAddLocation(NPC, 632.79, -25.02, 376.76, 2, 0)
  57. MovementLoopAddLocation(NPC, 639.53, -24.83, 375.31, 2, 0)
  58. MovementLoopAddLocation(NPC, 646.24, -24.72, 373.54, 2, 0)
  59. MovementLoopAddLocation(NPC, 653.44, -24.72, 370.2, 2, 0)
  60. MovementLoopAddLocation(NPC, 658.51, -24.62, 367.3, 2, 0)
  61. MovementLoopAddLocation(NPC, 666.95, -24.64, 362.82, 2, 0)
  62. end
  63. function FaceGate(NPC)
  64. SetHeading(NPC,153)
  65. end
  66. function Drink(NPC)
  67. PlayAnimation(NPC,11422)
  68. AddTimer(NPC,8000, "Drink2")
  69. end
  70. function Drink2(NPC)
  71. choice = math.random(1,3)
  72. if choice == 1 then
  73. PlayAnimation(NPC,891)
  74. elseif choice == 2 then
  75. PlayAnimation(NPC,11422)
  76. else
  77. PlayAnimation(NPC,11668)
  78. end
  79. AddTimer(NPC,6000, "Drink3")
  80. end
  81. function Drink3(NPC)
  82. PlayAnimation(NPC,11422)
  83. end