loop
local enemy = self:findNearestEnemy()
if enemy then
local distance = self:distanceTo(enemy)
if distance < 5 then
if self:isReady("cleave") then
self:cleave(enemy)
else
self:shield()
self:shield()
end
end
this is my code it in lua and it not working