9
3

aCaptiveCub.lua 565 B

1234567891011121314151617181920212223242526
  1. --[[
  2. Script Name : SpawnScripts/Darklight/acaptivecub.lua
  3. Script Purpose : Add spawn access to a captive cub
  4. Script Author : Cynnar
  5. Script Date : 3/23/2016
  6. Script Notes : a captive cub (341075)
  7. --]]
  8. local DrawUponWellsprings = 155
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 20, "SpawnAccess", "SpawnAccess")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function SpawnAccess(NPC, Spawn)
  17. if not HasCompletedQuest(Spawn, DrawUponWellsprings) then
  18. RemoveSpawnAccess(NPC, Spawn)
  19. else
  20. AddSpawnAccess(NPC, Spawn)
  21. end
  22. end