9
3

Lionpost.lua 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. --[[
  2. Script Name : SpawnScripts/FrostfangSea/LionPost.lua
  3. Script Purpose : for the spawn "lion post"
  4. Script Author : theFoof
  5. Script Date : 2013.05.25
  6. Script Notes :
  7. --]]
  8. local IcemanesCometh = 18
  9. function spawn(NPC)
  10. SetRequiredQuest(NPC, IcemanesCometh, 1)
  11. end
  12. function casted_on(NPC, Caster, SpellName)
  13. if SpellName == 'leash cub to post' then
  14. counter = 0
  15. if GetTempVariable(Caster, "cub1") ~= nil then
  16. counter = counter + 1
  17. Despawn(GetTempVariable(Caster, "cub1"))
  18. end
  19. if GetTempVariable(Caster, "cub2") ~= nil then
  20. counter = counter + 1
  21. Despawn(GetTempVariable(Caster, "cub2"))
  22. end
  23. if GetTempVariable(Caster, "cub3") ~= nil then
  24. counter = counter + 1
  25. Despawn(GetTempVariable(Caster, "cub3"))
  26. end
  27. if GetTempVariable(Caster, "cub4") ~= nil then
  28. counter = counter + 1
  29. Despawn(GetTempVariable(Caster, "cub4"))
  30. end
  31. SetTempVariable(Caster, "cub1", nil)
  32. SetTempVariable(Caster, "cub2", nil)
  33. SetTempVariable(Caster, "cub3", nil)
  34. SetTempVariable(Caster, "cub4", nil)
  35. AddStepProgress(Caster, IcemanesCometh, 1, counter)
  36. end
  37. end