Fantalosia.lua 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Fantalosia.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.29 03:06:04
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. function spawn(NPC)
  10. waypoints(NPC)
  11. SetPlayerProximityFunction(NPC, 7, "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. GenericRaceCheckCallout(NPC, Spawn, faction)
  19. end
  20. function Door(NPC,Spawn)
  21. local door = GetSpawn(NPC, 2340077)
  22. UseWidget(door)
  23. end
  24. function waypoints(NPC)
  25. MovementLoopAddLocation(NPC, 809.56, -20.45, 300.34, 2, 1)
  26. MovementLoopAddLocation(NPC, 809.56, -20.45, 300.34, 2, 40,"Action")
  27. MovementLoopAddLocation(NPC, 810.27, -20.45, 300.32, 2, 0)
  28. MovementLoopAddLocation(NPC, 810.27, -20.45, 297.01, 2, 0)
  29. MovementLoopAddLocation(NPC, 808.2, -20.45, 294.76, 2, 0)
  30. MovementLoopAddLocation(NPC, 807.87, -20.45, 294.13, 2, 2,"Door")
  31. MovementLoopAddLocation(NPC, 801.4, -20.43, 291.3, 2, 0)
  32. MovementLoopAddLocation(NPC, 791.66, -20.51, 283.54, 2, 0)
  33. MovementLoopAddLocation(NPC, 786.03, -20.53, 279, 2, 0)
  34. MovementLoopAddLocation(NPC, 777.07, -20.54, 280.1, 2, 1)
  35. MovementLoopAddLocation(NPC, 777.07, -20.54, 280.1, 2, 25,"Action")
  36. MovementLoopAddLocation(NPC, 776.25, -20.52, 280.2, 2, 0)
  37. MovementLoopAddLocation(NPC, 776.29, -20.54, 278.81, 2, 0)
  38. MovementLoopAddLocation(NPC, 773.86, -20.55, 276.53, 2, 0)
  39. MovementLoopAddLocation(NPC, 772.22, -20.52, 275.91, 2, 0)
  40. MovementLoopAddLocation(NPC, 769.45, -20.5, 276.03, 2, 0)
  41. MovementLoopAddLocation(NPC, 760.53, -20.38, 267.14, 2, 1)
  42. MovementLoopAddLocation(NPC, 760.53, -20.38, 267.14, 2, 45,"Action")
  43. MovementLoopAddLocation(NPC, 761.11, -20.37, 267.98, 2, 0)
  44. MovementLoopAddLocation(NPC, 757.42, -20.57, 270.83, 2, 0)
  45. MovementLoopAddLocation(NPC, 750.45, -20.7, 273.73, 2, 0)
  46. MovementLoopAddLocation(NPC, 740.4, -20.4, 276.34, 2, 0)
  47. MovementLoopAddLocation(NPC, 727.85, -20.42, 281.07, 2, 0)
  48. MovementLoopAddLocation(NPC, 725.19, -20.42, 286.6, 2, 0)
  49. MovementLoopAddLocation(NPC, 718.43, -20.24, 291.28, 2, 1)
  50. MovementLoopAddLocation(NPC, 718.43, -20.24, 291.28, 2, 45,"Action")
  51. MovementLoopAddLocation(NPC, 718.23, -20.24, 292.73, 2, 0)
  52. MovementLoopAddLocation(NPC, 728.11, -20.44, 296.78, 2, 0)
  53. MovementLoopAddLocation(NPC, 732.56, -20.43, 305.13, 2, 0)
  54. MovementLoopAddLocation(NPC, 732.61, -20.43, 308.31, 2, 0)
  55. MovementLoopAddLocation(NPC, 729.23, -20.49, 325.04, 2, 0)
  56. MovementLoopAddLocation(NPC, 737.2, -24.58, 331.87, 2, 0)
  57. MovementLoopAddLocation(NPC, 746.6, -24.71, 336.07, 2, 0)
  58. MovementLoopAddLocation(NPC, 753.19, -24.77, 340.19, 2, 0)
  59. MovementLoopAddLocation(NPC, 759.6, -24.97, 339.85, 2, 0)
  60. MovementLoopAddLocation(NPC, 764.36, -25.19, 339, 2, 0)
  61. MovementLoopAddLocation(NPC, 772.46, -25.03, 333.33, 2, 0)
  62. MovementLoopAddLocation(NPC, 769.03, -24.88, 328.28, 2, 1)
  63. MovementLoopAddLocation(NPC, 769.03, -24.88, 328.28, 2, 45,"Action")
  64. MovementLoopAddLocation(NPC, 772.44, -24.89, 328.08, 2, 0)
  65. MovementLoopAddLocation(NPC, 781.07, -24.95, 328.63, 2, 0)
  66. MovementLoopAddLocation(NPC, 788.33, -24.97, 327.1, 2, 0)
  67. MovementLoopAddLocation(NPC, 801.64, -25.7, 320.31, 2, 0)
  68. MovementLoopAddLocation(NPC, 811.13, -25.87, 317.08, 2, 0)
  69. MovementLoopAddLocation(NPC, 811.41, -25.85, 312.13, 2, 0)
  70. MovementLoopAddLocation(NPC, 809.97, -24.92, 308.5, 2, 0)
  71. MovementLoopAddLocation(NPC, 800.11, -20.31, 300.06, 2, 0)
  72. MovementLoopAddLocation(NPC, 800.97, -20.41, 293.71, 2, 0)
  73. MovementLoopAddLocation(NPC, 803.37, -20.39, 291.13, 2, 2,"Door")
  74. MovementLoopAddLocation(NPC, 807.52, -20.45, 293.49, 2, 0)
  75. MovementLoopAddLocation(NPC, 808.02, -20.45, 296.77, 2, 0)
  76. MovementLoopAddLocation(NPC, 807.79, -20.45, 299.5, 2, 0)
  77. end
  78. function Action(NPC)
  79. local choice = MakeRandomInt(1, 4)
  80. if choice == 1 then
  81. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  82. elseif choice == 2 then
  83. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  84. elseif choice == 3 then
  85. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  86. elseif choice == 4 then
  87. PlayFlavor(NPC, "", "", "tap", 0, 0, Spawn)
  88. end
  89. end