Anikra.lua 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. --[[
  2. Script Name : SpawnScripts/IsleRefuge1/Anikra.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.09.03 07:09:08
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. waypoints(NPC)
  10. end
  11. function hailed(NPC, Spawn)
  12. FaceTarget(NPC, Spawn)
  13. local choice = math.random(1,4)
  14. if choice == 1 then
  15. PlayFlavor(NPC, "voiceover/english/anikra/boat_06p_tutorial02_fvo_002.mp3", "I really miss my husband. Why did those smugglers have to throw him overboard?", "sigh", 1493499523, 2767493059)
  16. elseif choice == 2 then
  17. PlayFlavor(NPC, "voiceover/english/anikra/boat_06p_tutorial02_fvo_001.mp3", "Thanks for saving me", "thanks", 3802219844, 3242323771)
  18. elseif choice == 3 then
  19. PlayFlavor(NPC, "voiceover/english/halfelf_eco_good_1/ft/halfelf/halfelf_eco_good_1_hail_gf_5b0f480.mp3", "I'm tired of waiting! I want to make something of myself!", "pout", 3723196832, 16921270, Spawn)
  20. elseif choice == 4 then
  21. PlayFlavor(NPC, "voiceover/english/halfelf_eco_good_1/ft/halfelf/halfelf_eco_good_1_hail_gf_94429fcb.mp3", "As soon as I get my own boat, I'm outta here!", "nod", 314587977, 2229036874, Spawn)
  22. end
  23. end
  24. function respawn(NPC)
  25. spawn(NPC)
  26. end
  27. function waypoints(NPC)
  28. MovementLoopAddLocation(NPC, -27.09, -4.86, 183.72, 2, 22)
  29. MovementLoopAddLocation(NPC, -26.78, -4.92, 179.1, 2, 0)
  30. MovementLoopAddLocation(NPC, -28.38, -5.08, 173.94, 2, 0)
  31. MovementLoopAddLocation(NPC, -36.24, -5.07, 168.16, 2, 0)
  32. MovementLoopAddLocation(NPC, -46.85, -5.03, 159.76, 2, 0)
  33. MovementLoopAddLocation(NPC, -49.04, -5.02, 152.98, 2, 0)
  34. MovementLoopAddLocation(NPC, -53.57, -5.01, 142.69, 2, 0)
  35. MovementLoopAddLocation(NPC, -58.03, -4.99, 133.61, 2, 0)
  36. MovementLoopAddLocation(NPC, -55.73, -4.95, 120.93, 2, 0)
  37. MovementLoopAddLocation(NPC, -55.23, -5.55, 114.55, 2, 0)
  38. MovementLoopAddLocation(NPC, -55.7, -5.85, 111.25, 2, 0)
  39. MovementLoopAddLocation(NPC, -57.29, -5.66, 109.08, 2, 0)
  40. MovementLoopAddLocation(NPC, -58.71, -5.58, 107.46, 2, 0)
  41. MovementLoopAddLocation(NPC, -65.72, -6.7, 101.71, 2, 0)
  42. MovementLoopAddLocation(NPC, -72.71, -8.5, 95.97, 2, 0)
  43. MovementLoopAddLocation(NPC, -78.97, -7.74, 89.55, 2, 0)
  44. MovementLoopAddLocation(NPC, -82.68, -7.24, 85.74, 2, 0)
  45. MovementLoopAddLocation(NPC, -88.71, -7.41, 85.88, 2, 22)
  46. MovementLoopAddLocation(NPC, -89.6, -7.4, 85.94, 2, 0)
  47. MovementLoopAddLocation(NPC, -88.55, -7.41, 84.29, 2, 0)
  48. MovementLoopAddLocation(NPC, -85.52, -7.42, 80.1, 2, 0)
  49. MovementLoopAddLocation(NPC, -81.68, -7.18, 78.96, 2, 0)
  50. MovementLoopAddLocation(NPC, -75.03, -8.05, 78.1, 2, 0)
  51. MovementLoopAddLocation(NPC, -71.48, -7.9, 90.36, 2, 0)
  52. MovementLoopAddLocation(NPC, -70.06, -8.61, 94.98, 2, 0)
  53. MovementLoopAddLocation(NPC, -59.9, -5.58, 103.31, 2, 0)
  54. MovementLoopAddLocation(NPC, -52.01, -5.43, 109.89, 2, 0)
  55. MovementLoopAddLocation(NPC, -51.46, -4.99, 112.41, 2, 0)
  56. MovementLoopAddLocation(NPC, -54.06, -5, 120.14, 2, 0)
  57. MovementLoopAddLocation(NPC, -56.46, -4.99, 132.49, 2, 0)
  58. MovementLoopAddLocation(NPC, -54.13, -5, 139.2, 2, 0)
  59. MovementLoopAddLocation(NPC, -49.64, -5.02, 146.41, 2, 0)
  60. MovementLoopAddLocation(NPC, -47.72, -5.03, 156.21, 2, 0)
  61. MovementLoopAddLocation(NPC, -40.15, -5.06, 163.56, 2, 0)
  62. MovementLoopAddLocation(NPC, -31.62, -5.1, 170.09, 2, 0)
  63. MovementLoopAddLocation(NPC, -22.11, -5.13, 177.12, 2, 0)
  64. MovementLoopAddLocation(NPC, -14.16, -5.16, 184.86, 2, 0)
  65. MovementLoopAddLocation(NPC, -9.89, -5.22, 188.44, 2, 0)
  66. MovementLoopAddLocation(NPC, -9.89, -5.22, 188.44, 2, 0)
  67. MovementLoopAddLocation(NPC, -3.05, -5.2, 183.52, 2, 0)
  68. MovementLoopAddLocation(NPC, 4.28, -5.23, 177.87, 2, 0)
  69. MovementLoopAddLocation(NPC, 10.74, -5.06, 180.22, 2, 0)
  70. MovementLoopAddLocation(NPC, 20.08, -6.86, 183.67, 2, 0)
  71. MovementLoopAddLocation(NPC, 23.74, -6.86, 187.07, 2, 15,"InitialPause")
  72. MovementLoopAddLocation(NPC, 20.06, -6.88, 192.26, 2, 0,"stop_gathering")
  73. MovementLoopAddLocation(NPC, 20.69, -6.86, 199.29, 2, 15,"InitialPause")
  74. MovementLoopAddLocation(NPC, 24.24, -6.86, 192.73, 2, 0,"stop_gathering")
  75. MovementLoopAddLocation(NPC, 28.21, -6.86, 190.32, 2, 15,"InitialPause")
  76. MovementLoopAddLocation(NPC, 22.37, -6.86, 194.32, 2, 0,"stop_gathering")
  77. MovementLoopAddLocation(NPC, 11.12, -6.9, 205.21, 2, 15,"InitialPause")
  78. MovementLoopAddLocation(NPC, 12.8, -6.9, 200.16, 2, 0,"stop_gathering")
  79. MovementLoopAddLocation(NPC, 5.85, -5.45, 189.64, 2, 0)
  80. MovementLoopAddLocation(NPC, -0.07, -5.22, 183.06, 2, 0)
  81. MovementLoopAddLocation(NPC, -7.59, -5.19, 186.27, 2, 0)
  82. MovementLoopAddLocation(NPC, -17.2, -5.1, 185.98, 2, 0)
  83. MovementLoopAddLocation(NPC, -24.89, -4.87, 187.27, 2, 0)
  84. end
  85. function InitialPause(NPC)
  86. local GatherSpawn = GetSpawn(NPC, 3250033) -- Get Anikra
  87. math.randomseed(os.time())
  88. local pause = math.random (1, 4)
  89. if pause == 1 then
  90. AddTimer(NPC, 100, "stop_gathering")
  91. else
  92. AddTimer(NPC, 1000, "Gather")
  93. end
  94. end
  95. function Gather(NPC)
  96. local GatherSpawn = GetSpawn(NPC, 3250033) -- Get Anikra
  97. SpawnSet(NPC, "visual_state", "gathering_search") -- Start gathering
  98. AddTimer(NPC, 8000, "Collect") -- for 5 seconds, then stop
  99. end
  100. function Collect(NPC)
  101. local GatherSpawn = GetSpawn(NPC, 3250033) -- Get Anikra
  102. SpawnSet(NPC, "visual_state", "gathering_success") -- Start gathering
  103. AddTimer(NPC, 2000, "stop_gathering") -- for 5 seconds, then stop
  104. end
  105. function stop_gathering(NPC)
  106. local GatherSpawn = GetSpawn(NPC, 3250033) -- get Anikra
  107. SpawnSet(NPC, "visual_state", "0") -- Stop her from gathering
  108. end