HadiyaPili.lua 934 B

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/Nettleville/HadiyaPili.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.06.21 01:06:29
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/UnknownLanguage.lua")
  9. dofile("SpawnScripts/Generic/GenericEcologyVoiceOvers.lua")
  10. function spawn(NPC)
  11. SetPlayerProximityFunction(NPC, 5, "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,"","","no",0,0,Spawn)
  19. else
  20. FaceTarget(NPC, Spawn)
  21. GenericEcologyHail(NPC, Spawn, faction)
  22. end
  23. end
  24. function InRange(NPC, Spawn)
  25. if not HasLanguage(Spawn,13)then
  26. if math.random(1, 100) <= 25 then
  27. Garbled(NPC,Spawn)
  28. end
  29. else
  30. GenericEcologyHail(NPC, Spawn, faction)
  31. end
  32. end