9
3

Shalvo.lua 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/Shalvo.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.28 04:10:47
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  9. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 6, "InRange", "LeaveRange")
  12. waypoints(NPC)
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasLanguage(Spawn,26)then
  17. Garbled(NPC,Spawn)
  18. else
  19. GenericEcologyHail(NPC, Spawn, faction)
  20. end
  21. end
  22. function InRange(NPC,Spawn)
  23. if GetFactionAmount(Spawn,12)<0 then
  24. FactionCheckCallout(NPC,Spawn,faction)
  25. else
  26. if not HasLanguage(Spawn,26)then
  27. if math.random(0,100)<40 then
  28. FaceTarget(NPC, Spawn)
  29. Garbled(NPC,Spawn)
  30. end
  31. else
  32. end
  33. end
  34. end
  35. function respawn(NPC)
  36. spawn(NPC)
  37. end
  38. function waypoints(NPC)
  39. MovementLoopAddLocation(NPC, 43.26, 3, 85.42, 2, 1)
  40. MovementLoopAddLocation(NPC, 43.26, 3, 85.42, 2, 25,"EcologyEmotes")
  41. MovementLoopAddLocation(NPC, 43.99, 3, 78.04, 2, 1,"EcologyEmotes")
  42. MovementLoopAddLocation(NPC, 43.99, 3, 78.04, 2, 10)
  43. MovementLoopAddLocation(NPC, 43.34, 3, 76.25, 2, 0)
  44. MovementLoopAddLocation(NPC, 44.07, 3, 75.74, 2, 1)
  45. MovementLoopAddLocation(NPC, 44.07, 3, 75.74, 2, 10,"EcologyEmotes")
  46. MovementLoopAddLocation(NPC, 44.07, 3, 75.74, 2, 0)
  47. MovementLoopAddLocation(NPC, 43.25, 3, 76.07, 2, 0)
  48. MovementLoopAddLocation(NPC, 43.17, 3, 76.76, 2, 0)
  49. MovementLoopAddLocation(NPC, 48.77, 3, 86.87, 2, 1)
  50. MovementLoopAddLocation(NPC, 48.77, 3, 86.87, 2, 34,"EcologyEmotes")
  51. end