Irina.lua 968 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. --[[
  2. Script Name : SpawnScripts/TempleSt/Irina.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.10.27 07:10:12
  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. SetInfoStructString(NPC, "action_state", "ponder")
  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. end
  32. end
  33. end
  34. function respawn(NPC)
  35. spawn(NPC)
  36. end