9
3

doorwidget20.lua 537 B

12345678910111213141516171819202122232425262728
  1. --[[
  2. Script Name : SpawnScripts/SouthQeynos/doorwidget20.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.04.10 03:04:49
  5. Script Purpose :
  6. :
  7. --]]
  8. function spawn(NPC)
  9. SetPlayerProximityFunction(NPC, 3, "InRange", "LeaveRange")
  10. end
  11. function InRange(NPC)
  12. if GetSpawnID(Spawn,2310034) ~=nil then
  13. OpenDoor(NPC)
  14. end
  15. end
  16. function LeaveRange(NPC)
  17. if GetSpawnID(Spawn,2310034) ==nil then
  18. CloseDoor(NPC)
  19. end
  20. end
  21. function respawn(NPC)
  22. spawn(NPC)
  23. end