9
3

Fantalosia.lua 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/Fantalosia.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.22 05:06:34
  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. GenericRaceCheckHail(NPC, Spawn, faction)
  16. end
  17. function InRange(NPC,Spawn)
  18. if GetFactionAmount(Spawn,11)<0 then
  19. FaceTarget (NPC,Spawn)
  20. FactionChecking(NPC,Spawn,faction)
  21. end
  22. end
  23. function FaceStreet(NPC)
  24. SpawnSet(NPC, "heading", "250")
  25. end
  26. function waypoints(NPC)
  27. MovementLoopAddLocation(NPC, 617.37, -26.26, 378.15, 2, 5)
  28. MovementLoopAddLocation(NPC, 617.37, -26.26, 378.15, 2, 50,"Action")
  29. MovementLoopAddLocation(NPC, 616.74, -26.3, 379.03, 2, 0)
  30. MovementLoopAddLocation(NPC, 617.83, -26.21, 377.28, 2, 0)
  31. MovementLoopAddLocation(NPC, 619.65, -26.08, 377.54, 2, 0)
  32. MovementLoopAddLocation(NPC, 621.72, -26.03, 379.25, 2, 0)
  33. MovementLoopAddLocation(NPC, 626.41, -25.83, 382.04, 2, 0)
  34. MovementLoopAddLocation(NPC, 627.28, -25.82, 384.49, 2, 5)
  35. MovementLoopAddLocation(NPC, 627.28, -25.82, 384.49, 2, 50,"Action")
  36. MovementLoopAddLocation(NPC, 627.9, -25.68, 383.16, 2, 0)
  37. MovementLoopAddLocation(NPC, 625.55, -25.89, 381.74, 2, 0)
  38. MovementLoopAddLocation(NPC, 621.22, -26.08, 379.36, 2, 0)
  39. MovementLoopAddLocation(NPC, 617.36, -25.81, 367.66, 2, 0)
  40. MovementLoopAddLocation(NPC, 616.31, -25.47, 365.34, 2, 5)
  41. MovementLoopAddLocation(NPC, 616.31, -25.47, 365.34, 2, 52,"Action")
  42. MovementLoopAddLocation(NPC, 617.19, -25.91, 368.38, 2, 0)
  43. MovementLoopAddLocation(NPC, 614.55, -26.37, 377.5, 2, 0)
  44. MovementLoopAddLocation(NPC, 607.1, -26.51, 378.98, 2, 0)
  45. MovementLoopAddLocation(NPC, 601.02, -26.49, 379.26, 2, 0)
  46. MovementLoopAddLocation(NPC, 591.49, -26.49, 380.54, 2, 0)
  47. MovementLoopAddLocation(NPC, 576.28, -26.63, 380.71, 2, 0)
  48. MovementLoopAddLocation(NPC, 572.38, -26.52, 379.81, 2, 1,"FaceStreet")
  49. MovementLoopAddLocation(NPC, 572.38, -26.52, 379.81, 2, 35,"Action")
  50. MovementLoopAddLocation(NPC, 572.38, -26.52, 379.81, 2, 45,"Action")
  51. MovementLoopAddLocation(NPC, 573.08, -26.52, 379.27, 2, 0)
  52. MovementLoopAddLocation(NPC, 575.34, -26.54, 379.97, 2, 0)
  53. MovementLoopAddLocation(NPC, 582.35, -26.95, 382.21, 2, 0)
  54. MovementLoopAddLocation(NPC, 592.01, -26.22, 377.16, 2, 0)
  55. MovementLoopAddLocation(NPC, 598.12, -26.22, 375.95, 2, 0)
  56. MovementLoopAddLocation(NPC, 612.6, -26.38, 373.1, 2, 0)
  57. end
  58. function Action(NPC)
  59. local choice = MakeRandomInt(1, 4)
  60. if choice == 1 then
  61. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  62. elseif choice == 2 then
  63. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  64. elseif choice == 3 then
  65. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  66. elseif choice == 4 then
  67. PlayFlavor(NPC, "", "", "tap", 0, 0, Spawn)
  68. end
  69. end