JabariOla.lua 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/JabariOla.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.21 01:06:10
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 8, "InRange", "LeaveRange")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. if not HasLanguage(Spawn,13)then
  16. FaceTarget(NPC, Spawn)
  17. Garbled(NPC,Spawn)
  18. PlayFlavor(NPC,"","","orate",0,0,Spawn)
  19. else
  20. FaceTarget(NPC, Spawn)
  21. GenericRaceCheckHail(NPC, Spawn, faction)
  22. end
  23. end
  24. function InRange(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. if not HasLanguage(Spawn,13)then
  27. if math.random(1, 100) <= 66 then
  28. FaceTarget(NPC, Spawn)
  29. PlayFlavor(NPC,"","","confused",0,0,Spawn)
  30. Garbled(NPC,Spawn)
  31. end
  32. else
  33. GenericRaceCheckCallout(NPC, Spawn, faction)
  34. end
  35. end