9
3

TundraBeet.lua 830 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/TundraBeet.lua
  3. Script Purpose : for the spawn signs named "tundra beet"
  4. Script Author : theFoof
  5. Script Date : 2013.5.18
  6. Script Notes :
  7. --]]
  8. local BeetsAlternative = 13
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, BeetsAlternative, 1)
  11. SetRequiredQuest(NPC, BeetsAlternative, 2)
  12. end
  13. function respawn(NPC)
  14. spawn(NPC)
  15. end
  16. function casted_on(Target, Caster, SpellName)
  17. if SpellName == "gather tundra beet" then
  18. if GetQuestStep(Caster, BeetsAlternative) == 1 then
  19. AddStepProgress(Caster, BeetsAlternative, 1, 1)
  20. Despawn(Target)
  21. elseif GetQuestStep(Caster, BeetsAlternative) == 2 then
  22. SetStepComplete(Caster, BeetsAlternative, 2)
  23. footprints = GetSpawn(Target, 4701753)
  24. AddSpawnAccess(footprints, Caster)
  25. Despawn(Target)
  26. end
  27. end
  28. end