TullyJamtoe.lua 917 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. SetInfoStructString(NPC, "action_state", "drinking_idle")
  13. end
  14. function hailed(NPC, Spawn)
  15. FaceTarget(NPC, Spawn)
  16. if not HasLanguage(Spawn,3)then
  17. Garbled(NPC,Spawn)
  18. else
  19. GenericDrunkHail(NPC, Spawn, faction)
  20. end
  21. end
  22. function InRange(NPC, Spawn)
  23. if math.random(1, 100) <= 20 then
  24. if not HasLanguage(Spawn,3)then
  25. Garbled(NPC,Spawn)
  26. else
  27. GenericDrunkCallout(NPC, Spawn, faction)
  28. end
  29. end
  30. end
  31. function respawn(NPC)
  32. spawn(NPC)
  33. end