AnevayaStarchaser.lua 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/AnevayaStarchaser.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.22 05:06:26
  5. Script Purpose : Actually for Avilon Blueheart after name change
  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 waypoints(NPC)
  21. MovementLoopAddLocation(NPC, 676.57, -20.36, 317.02, 2, 5)
  22. MovementLoopAddLocation(NPC, 676.57, -20.36, 317.02, 2, 52,"EcologyEmotes")
  23. MovementLoopAddLocation(NPC, 676.56, -20.37, 318.1, 2, 0)
  24. MovementLoopAddLocation(NPC, 674.78, -20.44, 320.6, 2, 0)
  25. MovementLoopAddLocation(NPC, 675.25, -20.54, 323.9, 2, 0)
  26. MovementLoopAddLocation(NPC, 678.53, -20.42, 332.51, 2, 0)
  27. MovementLoopAddLocation(NPC, 678.39, -20.35, 339.77, 2, 0)
  28. MovementLoopAddLocation(NPC, 676.19, -24.54, 350.38, 2, 0)
  29. MovementLoopAddLocation(NPC, 675.29, -24.71, 354.7, 2, 0)
  30. MovementLoopAddLocation(NPC, 669.2, -24.71, 361.29, 2, 0)
  31. MovementLoopAddLocation(NPC, 665.52, -24.59, 364.12, 2, 0)
  32. MovementLoopAddLocation(NPC, 665.73, -24.57, 364.79, 2, 1)
  33. MovementLoopAddLocation(NPC, 665.73, -24.57, 364.79, 2, 45,"Drink")
  34. MovementLoopAddLocation(NPC, 665.73, -24.57, 364.79, 2, 45,"Drink")
  35. MovementLoopAddLocation(NPC, 665.95, -24.55, 365.46, 2, 0)
  36. MovementLoopAddLocation(NPC, 665.04, -24.6, 363.9, 2, 0)
  37. MovementLoopAddLocation(NPC, 665.59, -24.82, 357.02, 2, 0)
  38. MovementLoopAddLocation(NPC, 670.77, -24.05, 344.67, 2, 0)
  39. MovementLoopAddLocation(NPC, 670.8, -23.14, 341.46, 2, 0)
  40. MovementLoopAddLocation(NPC, 661.23, -22.48, 335.84, 2, 0)
  41. MovementLoopAddLocation(NPC, 649.30, -22.27, 325.81, 2, 1)
  42. MovementLoopAddLocation(NPC, 649.30, -22.27, 325.81, 2, 55,"EcologyEmotes")
  43. MovementLoopAddLocation(NPC, 650.31, -22.29, 328.25, 2, 0)
  44. MovementLoopAddLocation(NPC, 654.48, -22.3, 329.73, 2, 0)
  45. MovementLoopAddLocation(NPC, 664.35, -20.44, 326.54, 2, 0)
  46. MovementLoopAddLocation(NPC, 667.64, -20.43, 318.17, 2, 0)
  47. MovementLoopAddLocation(NPC, 670.65, -20.38, 310.43, 2, 5)
  48. MovementLoopAddLocation(NPC, 670.65, -20.38, 310.43, 2, 55,"EcologyEmotes")
  49. MovementLoopAddLocation(NPC, 671.90, -20.41, 310.66, 2, 0)
  50. MovementLoopAddLocation(NPC, 671.21, -20.42, 313.6, 2, 0)
  51. MovementLoopAddLocation(NPC, 671.76, -20.42, 317.55, 2, 0)
  52. MovementLoopAddLocation(NPC, 674.93, -20.42, 315.75, 2, 0)
  53. end
  54. function Drink(NPC)
  55. PlayFlavor(NPC,"","","drinking_idle",0,0)
  56. AddTimer(NPC,8000, "Drink2")
  57. end
  58. function Drink2(NPC)
  59. choice = math.random(1,4)
  60. if choice == 1 then
  61. PlayFlavor(NPC,"","","yawn",0,0)
  62. elseif choice == 2 then
  63. PlayFlavor(NPC,"","","drinking_idle",0,0)
  64. elseif choice == 3 then
  65. PlayFlavor(NPC,"","","hungry",0,0)
  66. else
  67. PlayFlavor(NPC,"","","happy",0,0)
  68. end
  69. AddTimer(NPC,6000, "Drink3")
  70. end
  71. function Drink3(NPC)
  72. PlayFlavor(NPC,"","","drinking_idle",0,0)
  73. end