9
3

imbuedRyGorrpickaxe.lua 748 B

12345678910111213141516171819202122232425262728293031323334
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/imbuedRyGorrpickaxe.lua
  3. Script Purpose : for the imbued RyGorr pickaxe spawns
  4. Script Author : theFoof
  5. Script Date : 2013.7.10
  6. Script Notes :
  7. --]]
  8. local RyGorrTaking = 76
  9. function spawn(NPC)
  10. AddSpawnAccess(NPC, NPC)
  11. SetRequiredQuest(NPC, RyGorrTaking, 1)
  12. SetPlayerProximityFunction(NPC, 50, "SpawnAccess", "SpawnAccess")
  13. end
  14. function respawn(NPC)
  15. spawn(NPC)
  16. end
  17. function casted_on(NPC, Spawn, SpellName)
  18. if SpellName == 'Gather Pickaxe' then
  19. if GetQuestStep(Spawn, RyGorrTaking) == 1 then
  20. Despawn(NPC)
  21. AddStepProgress(Spawn, RyGorrTaking, 1, 1)
  22. end
  23. end
  24. end
  25. function SpawnAccess(NPC, Spawn)
  26. if GetQuestStep(Spawn, RyGorrTaking) == 1 then
  27. AddSpawnAccess(NPC, Spawn)
  28. end
  29. end