9
3

aprisoner2.lua 541 B

12345678910111213141516171819202122232425
  1. --[[
  2. Script Name : SpawnScripts/ScaleYard2/aprisoner2.lua
  3. Script Author : Premierio015
  4. Script Date : 2020.08.29 09:08:44
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 50, "InRange", "InRange")
  10. SpawnSet(NPC, "visual_state", 24528)
  11. end
  12. function hailed(NPC, Spawn)
  13. FaceTarget(NPC, Spawn)
  14. end
  15. function respawn(NPC)
  16. spawn(NPC)
  17. end
  18. function InRange(NPC, Spawn)
  19. PlayersLevel = GetLevel(Spawn)
  20. SpawnSet(NPC, "level", PlayersLevel)
  21. end