9
3

adiscardedweapon.lua 709 B

123456789101112131415161718192021222324252627282930313233
  1. --[[
  2. Script Name : SpawnScripts/Darklight/adiscardedweapon.lua
  3. Script Author : fearfx
  4. Script Date : 2017.01.23 01:01:43
  5. Script Purpose :
  6. :
  7. --]]
  8. local OneMansWaste = 143
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  12. SetRequiredQuest(NPC, OneMansWaste, 1)
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function SpawnAccess(NPC, Spawn)
  18. if HasQuest(Spawn, OneMansWaste) 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, 6485)
  26. end
  27. end