ashinyobject.lua 804 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/Antonica/ashinyobject.lua
  3. Script Author : Premierio015
  4. Script Date : 2021.08.13 09:08:17
  5. Script Purpose :
  6. :
  7. --]]
  8. local Lucky = 457
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 20, "SpawnAccess", "SpawnAccess")
  12. end
  13. function hailed(NPC, Spawn)
  14. FaceTarget(NPC, Spawn)
  15. end
  16. function respawn(NPC)
  17. spawn(NPC)
  18. end
  19. function casted_on(NPC, Spawn, SpellName)
  20. if SpellName == 'Gathering' then
  21. SetStepComplete(Spawn, Lucky, 1)
  22. RemoveSpawnAccess(NPC, Spawn)
  23. end
  24. end
  25. function SpawnAccess(NPC, Spawn)
  26. if GetQuestStep(Spawn, Lucky) == 1 then
  27. AddSpawnAccess(NPC, Spawn)
  28. else
  29. RemoveSpawnAccess(NPC, Spawn)
  30. end
  31. end