TullyJamtoe.lua 854 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. --[[
  2. Script Name : SpawnScripts/Graystone/TullyJamtoe.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.03.12 11:03:49
  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,3)then
  16. Garbled(NPC,Spawn)
  17. else
  18. GenericDrunkHail(NPC, Spawn, faction)
  19. end
  20. end
  21. function InRange(NPC, Spawn)
  22. if math.random(1, 100) <= 20 then
  23. if not HasLanguage(Spawn,3)then
  24. Garbled(NPC,Spawn)
  25. else
  26. GenericDrunkCallout(NPC, Spawn, faction)
  27. end
  28. end
  29. end
  30. function respawn(NPC)
  31. spawn(NPC)
  32. end