GerloffCrazyEyes.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. --[[
  2. Script Name : SpawnScripts/QeynosHarbor/GerloffCrazyEyes.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.11 01:06:49
  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 InRange(NPC, Spawn)
  14. if GetFactionAmount(Spawn,11)<0 then
  15. FactionCheckingCallout(NPC, Spawn, faction)
  16. else
  17. GenericDrunkCallout(NPC, Spawn, faction)
  18. end
  19. end
  20. function hailed(NPC, Spawn)
  21. FaceTarget(NPC, Spawn)
  22. if GetFactionAmount(Spawn,11)<0 then
  23. FactionChecking(NPC, Spawn, faction)
  24. else
  25. GenericDrunkHail(NPC, Spawn, faction)
  26. end
  27. end
  28. function Drink(NPC)
  29. PlayAnimation(NPC,11422)
  30. AddTimer(NPC,8000, "Drink2")
  31. end
  32. function Drink2(NPC)
  33. choice = math.random(1,3)
  34. if choice == 1 then
  35. PlayAnimation(NPC,891)
  36. elseif choice == 2 then
  37. PlayAnimation(NPC,11422)
  38. else
  39. PlayAnimation(NPC,11668)
  40. end
  41. AddTimer(NPC,6000, "Drink3")
  42. end
  43. function Drink3(NPC)
  44. PlayAnimation(NPC,11422)
  45. end
  46. function waypoints(NPC)
  47. MovementLoopAddLocation(NPC, 777.66, -20.64, 15.92, 2, 1)
  48. MovementLoopAddLocation(NPC, 777.66, -20.64, 15.92, 2, 12,"EcologyEmotes")
  49. MovementLoopAddLocation(NPC, 777.66, -20.64, 15.92, 2, 12,"EcologyEmotes")
  50. MovementLoopAddLocation(NPC, 773.61, -20.64, 11.52, 2, math.random(0,8))
  51. MovementLoopAddLocation(NPC, 763.7, -20.66, 7.77, 2, 0)
  52. MovementLoopAddLocation(NPC, 765.44, -21.05, -8.36, 2, math.random(0,8))
  53. MovementLoopAddLocation(NPC, 756.01, -21.03, -15.21, 2, math.random(0,8))
  54. MovementLoopAddLocation(NPC, 755.72, -21.05, -8.97, 2, math.random(0,8))
  55. MovementLoopAddLocation(NPC, 767.58, -20.64, -28.13, 2, 0)
  56. MovementLoopAddLocation(NPC, 768.63, -20.64, -28.31, 2, 0)
  57. MovementLoopAddLocation(NPC, 768.63, -20.64, -28.31, 2, 1)
  58. MovementLoopAddLocation(NPC, 768.63, -20.64, -28.31, 2, 25,"Drink")
  59. MovementLoopAddLocation(NPC, 771.72, -20.64, -25.86, 2, 0)
  60. MovementLoopAddLocation(NPC, 777.57, -20.64, -34.14, 2, 0)
  61. MovementLoopAddLocation(NPC, 775.45, -20.64, -35.16, 2, 0)
  62. MovementLoopAddLocation(NPC, 769.03, -20.97, -40.61, 2, 1)
  63. MovementLoopAddLocation(NPC, 769.03, -20.97, -40.61, 2, 25,"Drink")
  64. MovementLoopAddLocation(NPC, 750.78, -21.35, -41.55, 2, 0)
  65. MovementLoopAddLocation(NPC, 740.06, -21.39, -47.19, 2, 0)
  66. MovementLoopAddLocation(NPC, 735.32, -21.39, -45.98, 2, math.random(3,8))
  67. MovementLoopAddLocation(NPC, 756.74, -21.01, -68.08, 2, math.random(3,8))
  68. MovementLoopAddLocation(NPC, 759.67, -21.21, -65.33, 2, math.random(3,8))
  69. MovementLoopAddLocation(NPC, 766.02, -20.51, -70.45, 2, 0)
  70. MovementLoopAddLocation(NPC, 761, -21.02, -38.83, 2, math.random(3,8))
  71. MovementLoopAddLocation(NPC, 750.46, -21.19, -32.32, 2, math.random(3,8))
  72. MovementLoopAddLocation(NPC, 734.62, -21.36, -26.7, 2, math.random(3,8))
  73. MovementLoopAddLocation(NPC, 712.4, -20.73, -27.97, 2, 0)
  74. MovementLoopAddLocation(NPC, 717.35, -20.64, -11.08, 2, 0)
  75. MovementLoopAddLocation(NPC, 725.69, -20.66, -7.15, 2, math.random(0,8))
  76. MovementLoopAddLocation(NPC, 725.54, -20.76, -13.37, 2, math.random(3,8))
  77. MovementLoopAddLocation(NPC, 730.24, -20.79, -10.6, 2, math.random(3,8))
  78. MovementLoopAddLocation(NPC, 725.54, -20.76, -13.37, 2, 0)
  79. MovementLoopAddLocation(NPC, 725.69, -20.66, -7.15, 2, 0)
  80. MovementLoopAddLocation(NPC, 717.35, -20.64, -11.08, 2, 0)
  81. MovementLoopAddLocation(NPC, 712.4, -20.73, -27.97, 2, math.random(0,8))
  82. MovementLoopAddLocation(NPC, 734.62, -21.36, -26.7, 2, math.random(3,8))
  83. MovementLoopAddLocation(NPC, 750.46, -21.19, -32.32, 2, math.random(3,8))
  84. MovementLoopAddLocation(NPC, 761, -21.02, -38.83, 2, 0)
  85. MovementLoopAddLocation(NPC, 766.02, -20.51, -70.45, 2, 0)
  86. MovementLoopAddLocation(NPC, 759.67, -21.21, -65.33, 2, math.random(0,8))
  87. MovementLoopAddLocation(NPC, 756.74, -21.01, -68.08, 2, math.random(3,8))
  88. MovementLoopAddLocation(NPC, 735.32, -21.39, -45.98, 2, math.random(3,8))
  89. MovementLoopAddLocation(NPC, 740.06, -21.39, -47.19, 2, 0)
  90. MovementLoopAddLocation(NPC, 750.78, -21.35, -41.55, 2, 0)
  91. MovementLoopAddLocation(NPC, 769.03, -20.97, -40.61, 2, 1)
  92. MovementLoopAddLocation(NPC, 769.03, -20.97, -40.61, 2, 25,"Drink")
  93. MovementLoopAddLocation(NPC, 775.45, -20.64, -35.16, 2, 0)
  94. MovementLoopAddLocation(NPC, 777.57, -20.64, -34.14, 2, 0)
  95. MovementLoopAddLocation(NPC, 771.72, -20.64, -25.86, 2, 0)
  96. MovementLoopAddLocation(NPC, 768.63, -20.64, -28.31, 2, 1)
  97. MovementLoopAddLocation(NPC, 768.63, -20.64, -28.31, 2, 25,"Drink")
  98. MovementLoopAddLocation(NPC, 768.63, -20.64, -28.31, 2, 0)
  99. MovementLoopAddLocation(NPC, 767.58, -20.64, -28.13, 2, 0)
  100. MovementLoopAddLocation(NPC, 755.72, -21.05, -8.97, 2, math.random(3,8))
  101. MovementLoopAddLocation(NPC, 756.01, -21.03, -15.21, 2, math.random(3,8))
  102. MovementLoopAddLocation(NPC, 765.44, -21.05, -8.36, 2, math.random(0,8))
  103. MovementLoopAddLocation(NPC, 763.7, -20.66, 7.77, 2, math.random(3,8))
  104. MovementLoopAddLocation(NPC, 773.61, -20.64, 11.52, 2, 0)
  105. MovementLoopAddLocation(NPC, 777.66, -20.64, 15.92, 2, 1)
  106. MovementLoopAddLocation(NPC, 777.66, -20.64, 15.92, 2, 25,"EcologyEmotes")
  107. end