9
3

Eusimonae.lua 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. --[[
  2. Script Name : SpawnScripts/Starcrest/Eusimonae.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.29 07:06:34
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. function spawn(NPC)
  11. waypoints(NPC)
  12. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  13. end
  14. function hailed(NPC, Spawn)
  15. if GetFactionAmount(Spawn,11)<0 then
  16. FaceTarget (NPC,Spawn)
  17. GenericRaceCheckHail(NPC, Spawn, faction)
  18. else
  19. if not HasLanguage(Spawn,4)then
  20. if math.random(0,100)<60 then
  21. Garbled(NPC,Spawn)
  22. end
  23. else
  24. FaceTarget (NPC,Spawn)
  25. GenericEcologyHail(NPC, Spawn, faction)
  26. end
  27. end
  28. end
  29. function InRange(NPC,Spawn)
  30. if GetFactionAmount(Spawn,11)<0 then
  31. FaceTarget (NPC,Spawn)
  32. GenericRaceCheckHail(NPC, Spawn, faction)
  33. else
  34. if not HasLanguage(Spawn,4)then
  35. if math.random(0,100)<60 then
  36. Garbled(NPC,Spawn)
  37. end
  38. else
  39. FaceTarget (NPC,Spawn)
  40. GenericEcologyHail(NPC, Spawn, faction)
  41. end
  42. end
  43. end
  44. function Door1(NPC,Spawn)
  45. local door = GetSpawn(NPC, 2340077)
  46. UseWidget(door)
  47. end
  48. function Door2(NPC,Spawn)
  49. local door = GetSpawn(NPC, 2340075)
  50. UseWidget(door)
  51. end
  52. function FaceGame(NPC)
  53. SpawnSet(NPC, "heading", "134")
  54. end
  55. function Action(NPC)
  56. local choice = MakeRandomInt(1, 5)
  57. if choice == 1 then
  58. PlayFlavor(NPC, "", "", "ponder", 0, 0, Spawn)
  59. elseif choice == 2 then
  60. PlayFlavor(NPC, "", "", "agree", 0, 0, Spawn)
  61. elseif choice == 3 then
  62. PlayFlavor(NPC, "", "", "sniff", 0, 0, Spawn)
  63. elseif choice == 4 then
  64. PlayFlavor(NPC, "", "", "tapfoot", 0, 0, Spawn)
  65. elseif choice == 5 then
  66. PlayFlavor(NPC, "", "", "doh", 0, 0, Spawn)
  67. end
  68. end
  69. function waypoints(NPC)
  70. MovementLoopAddLocation(NPC, 814.88, -20.45, 294.39, 2, 1)
  71. MovementLoopAddLocation(NPC, 814.88, -20.45, 294.39, 2, 55,"Action")
  72. MovementLoopAddLocation(NPC, 810.43, -20.45, 295.6, 2, 0)
  73. MovementLoopAddLocation(NPC, 807.3, -20.45, 293.31, 2, 2,"Door1")
  74. MovementLoopAddLocation(NPC, 802.36, -20.42, 291.25, 2, 0)
  75. MovementLoopAddLocation(NPC, 798.59, -20.48, 291.58, 2, 0)
  76. MovementLoopAddLocation(NPC, 770.68, -20.34, 290.93, 2, 0)
  77. MovementLoopAddLocation(NPC, 766.93, -20.44, 288.62, 2, 0)
  78. MovementLoopAddLocation(NPC, 758.9, -20.35, 285.06, 2, 0)
  79. MovementLoopAddLocation(NPC, 751.91, -20.3, 286.82, 2, 1)
  80. MovementLoopAddLocation(NPC, 751.91, -20.3, 286.82, 2, 55,"Action")
  81. MovementLoopAddLocation(NPC, 753.52, -20.3, 286.08, 2, 0)
  82. MovementLoopAddLocation(NPC, 753.87, -20.45, 281.94, 2, 0)
  83. MovementLoopAddLocation(NPC, 746.52, -20.51, 277.3, 2, 0)
  84. MovementLoopAddLocation(NPC, 733.11, -20.39, 278.57, 2, 0)
  85. MovementLoopAddLocation(NPC, 726.52, -20.42, 280.93, 2, 0)
  86. MovementLoopAddLocation(NPC, 724.18, -20.41, 289.34, 2, 0)
  87. MovementLoopAddLocation(NPC, 721.78, -20.28, 293.98, 2, 1,"FaceGame")
  88. MovementLoopAddLocation(NPC, 721.78, -20.28, 293.98, 2, 45,"Action")
  89. MovementLoopAddLocation(NPC, 721.78, -20.28, 293.98, 2, 1,"FaceGame")
  90. MovementLoopAddLocation(NPC, 726.78, -20.45, 294.02, 2, 0)
  91. MovementLoopAddLocation(NPC, 733.27, -20.43, 305.31, 2, 0)
  92. MovementLoopAddLocation(NPC, 731.83, -20.54, 313.68, 2, 0)
  93. MovementLoopAddLocation(NPC, 731.09, -20.52, 318.97, 2, 0)
  94. MovementLoopAddLocation(NPC, 729.27, -20.46, 324.27, 2, 0)
  95. MovementLoopAddLocation(NPC, 737.83, -24.6, 332.36, 2, 0)
  96. MovementLoopAddLocation(NPC, 745.99, -24.72, 335.24, 2, 0)
  97. MovementLoopAddLocation(NPC, 751.5, -24.96, 326.83, 2, 2,"Door2")
  98. MovementLoopAddLocation(NPC, 756.39, -24.96, 319.35, 2, 1)
  99. MovementLoopAddLocation(NPC, 756.39, -24.96, 319.35, 2, 38,"Action")
  100. MovementLoopAddLocation(NPC, 757.41, -24.96, 319.36, 2, 0)
  101. MovementLoopAddLocation(NPC, 753.09, -24.96, 326.1, 2, 0)
  102. MovementLoopAddLocation(NPC, 748.59, -24.77, 332.46, 2, 2,"Door2")
  103. MovementLoopAddLocation(NPC, 756.45, -24.86, 339.54, 2, 0)
  104. MovementLoopAddLocation(NPC, 765.76, -25.22, 338.42, 2, 0)
  105. MovementLoopAddLocation(NPC, 773.48, -24.96, 330.82, 2, 0)
  106. MovementLoopAddLocation(NPC, 782.37, -24.49, 321.59, 2, 1)
  107. MovementLoopAddLocation(NPC, 782.37, -24.49, 321.59, 2, 38,"Action")
  108. MovementLoopAddLocation(NPC, 781.99, -24.81, 326.46, 2, 0)
  109. MovementLoopAddLocation(NPC, 785, -25.05, 329.16, 2, 0)
  110. MovementLoopAddLocation(NPC, 784.63, -25.21, 333.89, 2, 1)
  111. MovementLoopAddLocation(NPC, 784.63, -25.21, 333.89, 2, 38,"Action")
  112. MovementLoopAddLocation(NPC, 784.35, -25.19, 334.89, 2, 0)
  113. MovementLoopAddLocation(NPC, 783.72, -25.16, 334.53, 2, 0)
  114. MovementLoopAddLocation(NPC, 790.27, -25.09, 327.22, 2, 0)
  115. MovementLoopAddLocation(NPC, 807.82, -25.85, 317.39, 2, 0)
  116. MovementLoopAddLocation(NPC, 812, -25.87, 312.52, 2, 0)
  117. MovementLoopAddLocation(NPC, 807.81, -23.9, 307.22, 2, 0)
  118. MovementLoopAddLocation(NPC, 801.02, -20.25, 301.74, 2, 0)
  119. MovementLoopAddLocation(NPC, 799.01, -20.34, 299.56, 2, 0)
  120. MovementLoopAddLocation(NPC, 808.28, -20.45, 293.59, 2, 2,"Door1")
  121. MovementLoopAddLocation(NPC, 810.71, -20.45, 295.46, 2, 0)
  122. MovementLoopAddLocation(NPC, 815.74, -20.45, 293.65, 2, 0)
  123. end