9
3

Oakmyst.RotweedThistle.lua 956 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 x, y, z = GetX(thistle1),GetY(thistle1),GetZ(thistle1)
  24. local rotweed = SpawnMob(zone, 1950029, true, x, y, z)
  25. if rotweed ~= nil then
  26. FaceTarget(rotweed, Spawn)
  27. Attack(rotweed, Spawn)
  28. end
  29. end