CaiusEbonroot.lua 900 B

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/BeggarsCourt/CaiusEbonroot.lua
  3. Script Author : Dorbin
  4. Script Date : 2023.11.27 02:11:37
  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", "tapfoot")
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasLanguage(Spawn,7)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,7)then
  27. if math.random(0,100)<40 then
  28. Garbled(NPC,Spawn)
  29. end
  30. else
  31. end
  32. end
  33. end