9
3

RotweedThistle.lua 885 B

12345678910111213141516171819202122232425262728293031
  1. --[[
  2. Script Name : SpawnScripts/Oakmyst/RotweedThistle.lua
  3. Script Author : Dorbin
  4. Script Date : 2022.05.20 04:05:04
  5. Script Purpose :
  6. :
  7. --]]
  8. function death(NPC, Spawn)
  9. local zone = GetZone(NPC)
  10. local thistle1 = GetSpawnByLocationID(zone, 422456)
  11. local thistle2 = GetSpawnByLocationID(zone, 422457)
  12. local thistle3 = GetSpawnByLocationID(zone, 422458)
  13. if IsAlive(thistle1) == true then
  14. elseif IsAlive(thistle2) == true then
  15. elseif IsAlive(thistle3) == true then
  16. else
  17. AddTimer(NPC, 1000, "rotweedSpawn", 1, Spawn)
  18. end
  19. end
  20. function rotweedSpawn(NPC, Spawn)
  21. local zone = GetZone(NPC)
  22. local thistle1 = GetSpawnByLocationID(zone, 422456)
  23. local rotweed=SpawnByLocationID(zone, 422459)
  24. if rotweed ~= nil then
  25. FaceTarget(rotweed, Spawn)
  26. Attack(rotweed, Spawn)
  27. end
  28. end