VerinaGYul.lua 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. --[[
  2. Script Name : SpawnScripts/Longshadow/VerinaGYul.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.14 07:10:21
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 7, "InRange", "LeaveRange")
  12. waypoints(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasLanguage(Spawn,2)then
  17. Garbled(NPC,Spawn)
  18. --PlayFlavor(NPC,"","","shrug",0,0,Spawn)
  19. else
  20. GenericEcology2Hail(NPC, Spawn, faction)
  21. end
  22. end
  23. function InRange(NPC,Spawn)
  24. if GetFactionAmount(Spawn,12)<0 then
  25. FactionCheckCallout(NPC,Spawn,faction)
  26. else
  27. if not HasLanguage(Spawn,2)then
  28. if math.random(0,100)<40 then
  29. FaceTarget(NPC, Spawn)
  30. Garbled(NPC,Spawn)
  31. --PlayFlavor(NPC,"","","",0,0,Spawn)
  32. end
  33. else
  34. GenericEcology2Hail(NPC, Spawn, faction)
  35. end
  36. end
  37. end
  38. function respawn(NPC)
  39. spawn(NPC)
  40. end
  41. function Forge(NPC)
  42. SetHeading(NPC,235)
  43. end
  44. function waypoints(NPC)
  45. MovementLoopAddLocation(NPC, -11.85, 0, 17.41, 2, 1)
  46. MovementLoopAddLocation(NPC, -11.85, 0, 17.41, 2, 20,"Action")
  47. MovementLoopAddLocation(NPC, -11.85, 0, 17.41, 2, 0)
  48. MovementLoopAddLocation(NPC, -14.04, 0, 11.82, 2, 0)
  49. MovementLoopAddLocation(NPC, -15.24, 0, 3.05, 2, 0)
  50. MovementLoopAddLocation(NPC, -10.72, 0, -7.44, 2, 0)
  51. MovementLoopAddLocation(NPC, -7.79, 0.08, -12.29, 2, 0)
  52. MovementLoopAddLocation(NPC, -0.02, 0, -14.69, 2, 0)
  53. MovementLoopAddLocation(NPC, 7.15, 0, -13.02, 2, 0)
  54. MovementLoopAddLocation(NPC, 11.95, 0, -11.39, 2, 0)
  55. MovementLoopAddLocation(NPC, 19.32, -0.01, -12.65, 2, 0)
  56. MovementLoopAddLocation(NPC, 19.92, -0.01, -15.37, 2, 1,"Forge")
  57. MovementLoopAddLocation(NPC, 19.92, -0.01, -15.37, 2, 30,"Action")
  58. MovementLoopAddLocation(NPC, 20.15, -0.01, -15.09, 2, 0)
  59. MovementLoopAddLocation(NPC, 20.13, -0.01, -13.18, 2, 0)
  60. MovementLoopAddLocation(NPC, 18.56, 0.11, -12.06, 2, 0)
  61. MovementLoopAddLocation(NPC, 15.06, 0, -11.69, 2, 0)
  62. MovementLoopAddLocation(NPC, 16.34, 0, -19, 2, 0)
  63. MovementLoopAddLocation(NPC, 20.45, -0.31, -21.46, 2, 0)
  64. MovementLoopAddLocation(NPC, 31.95, -1.41, -23.31, 2, 0)
  65. MovementLoopAddLocation(NPC, 38.68, -1.33, -20.08, 2, 0)
  66. MovementLoopAddLocation(NPC, 39.94, -1.58, -10.09, 2, 0)
  67. MovementLoopAddLocation(NPC, 40.16, -1.22, -0.38, 2, 2,"Door")
  68. MovementLoopAddLocation(NPC, 47.39, -1.02, 1.42, 2, 0,"Door")
  69. MovementLoopAddLocation(NPC, 52.01, -1.02, 6.16, 2, 0)
  70. MovementLoopAddLocation(NPC, 55.11, -1.02, 12.28, 2, 1)
  71. MovementLoopAddLocation(NPC, 55.11, -1.02, 12.28, 2, 40,"Action")
  72. MovementLoopAddLocation(NPC, 51.16, -1.02, 5.38, 2, 0)
  73. MovementLoopAddLocation(NPC, 45.43, -1.02, 1.5, 2, 2,"Door")
  74. MovementLoopAddLocation(NPC, 39.12, -1.26, -0.42, 2, 0,"Door")
  75. MovementLoopAddLocation(NPC, 35.37, -0.2, 8.62, 2, 0)
  76. MovementLoopAddLocation(NPC, 28.26, 0.84, 15.61, 2, 0)
  77. MovementLoopAddLocation(NPC, 20.7, 1.87, 23.56, 2, 0)
  78. MovementLoopAddLocation(NPC, 12.77, 2.36, 28.43, 2, 0)
  79. MovementLoopAddLocation(NPC, 5.44, 2.9, 31.5, 2, 0)
  80. MovementLoopAddLocation(NPC, -3.18, 2.98, 33.59, 2, 0)
  81. MovementLoopAddLocation(NPC, -19.51, 3.89, 30.97, 2, 0)
  82. MovementLoopAddLocation(NPC, -26.83, 4.32, 28.36, 2, 0)
  83. MovementLoopAddLocation(NPC, -42.03, 4.19, 20.98, 2, 0)
  84. MovementLoopAddLocation(NPC, -54.29, 3.75, 13.73, 2, 0)
  85. MovementLoopAddLocation(NPC, -55.57, 2.04, -0.34, 2, 0)
  86. MovementLoopAddLocation(NPC, -51.23, 0.27, -12.31, 2, 0)
  87. MovementLoopAddLocation(NPC, -43.92, 0, -13.95, 2, 0)
  88. MovementLoopAddLocation(NPC, -40.01, 0.07, -12.29, 2, 0)
  89. MovementLoopAddLocation(NPC, -33.9, 0, -11.07, 2, 0)
  90. MovementLoopAddLocation(NPC, -24.54, 0.08, -8.37, 2, 0)
  91. MovementLoopAddLocation(NPC, -21.42, 0, -6.68, 2, 0)
  92. MovementLoopAddLocation(NPC, -18.34, 0, -1.79, 2, 0)
  93. MovementLoopAddLocation(NPC, -18.32, 0, 3.61, 2, 1)
  94. MovementLoopAddLocation(NPC, -18.32, 0, 3.61, 2, 11,"Action")
  95. MovementLoopAddLocation(NPC, -15.16, 0, 8.3, 2, 0)
  96. MovementLoopAddLocation(NPC, -14.23, 0, 16.4, 2, 0)
  97. end
  98. function Door(NPC,Spawn)
  99. local door = GetSpawn(NPC, 1380081)
  100. UseWidget(door)
  101. end
  102. function Action(NPC)
  103. local choice = MakeRandomInt(1, 4)
  104. if choice == 1 then
  105. PlayFlavor(NPC, "", "", "mood_angry", 0, 0)
  106. elseif choice == 2 then
  107. PlayFlavor(NPC, "", "", "ponder", 0, 0)
  108. elseif choice == 3 then
  109. PlayFlavor(NPC, "", "", "sniff", 0, 0)
  110. elseif choice == 4 then
  111. PlayFlavor(NPC, "", "", "tapfoot", 0, 0)
  112. end
  113. end