Ingraham.lua 909 B

123456789101112131415161718192021222324252627282930313233343536
  1. --[[
  2. Script Name : SpawnScripts/Classic_forest/Ingraham.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.10.13 01:10:24
  5. Script Purpose :
  6. :
  7. --]]
  8. dofile("SpawnScripts/Generic/GenericGuardVoiceOvers.lua")
  9. function spawn(NPC)
  10. SetPlayerProximityFunction(NPC, 10, "InRange", "LeaveRange")
  11. end
  12. function respawn(NPC)
  13. spawn(NPC)
  14. end
  15. function InRange(NPC, Spawn)
  16. if GetFactionAmount(Spawn,11)>0 then
  17. if MakeRandomInt(0,100) <=22 then
  18. PlayFlavor(NPC, "voiceover/english/human_eco_good_1/ft/service/guard/human_guard_service_good_1_hail_gm_ebfceda5.mp3", "Greetings, citizen. I am on guard duty. Should you get into trouble, seek me out.", "attention", 1945337199, 2685949436, Spawn, 0)
  19. end
  20. end
  21. end
  22. function LeaveRange(NPC, Spawn)
  23. end
  24. function hailed(NPC, Spawn)
  25. FaceTarget(NPC, Spawn)
  26. GenericGuardHail(NPC, Spawn)
  27. end