9
3

astunsporemushroom.lua 699 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/Darklight/astunsporemushroom.lua
  3. Script Author : fearfx
  4. Script Date : 2017.01.23 01:01:06
  5. Script Purpose :
  6. :
  7. --]]
  8. local StunningRevelation = 156
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  12. SetRequiredQuest(NPC, StunningRevelation, 1)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function SpawnAccess(NPC, Spawn)
  18. if HasQuest(Spawn, StunningRevelation) then
  19. AddSpawnAccess(NPC, Spawn)
  20. end
  21. end
  22. function casted_on(NPC, Spawn, SpellName)
  23. if SpellName == "gather " then
  24. Despawn(NPC)
  25. SummonItem(Spawn, 13532)
  26. end
  27. end