9
3

astrangeplant.lua 726 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/Darklight/astrangeplant.lua
  3. Script Purpose : Quest Giver
  4. Script Author : fearfx
  5. Script Date : 19/01/2017
  6. Script Notes : <special-instructions>
  7. --]]
  8. local AStrangeFind = 187
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 10, "SpawnAccess", "SpawnAccess")
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function SpawnAccess(NPC, Spawn)
  17. if not HasQuest(Spawn, AStrangeFind) and not HasItem(Spawn, 13423) then
  18. AddSpawnAccess(NPC, Spawn)
  19. else
  20. RemoveSpawnAccess(NPC, Spawn)
  21. end
  22. end
  23. function casted_on(NPC, Spawn, SpellName)
  24. if SpellName == "Gathering" and not HasItem(Player, 13423) then
  25. SummonItem(Spawn, 13423)
  26. RemoveSpawnAccess(NPC, Spawn)
  27. end
  28. end