I'll be grateful 😊
function battle()
local PlayObjectAnimation = function(mob, anim)
if IsObjectExists(mob) then
PlayObjectAnimation(mob, anim, 3)
end
end
while IsObjectExists("name of attacking creature") do
if IsObjectVisible(1, "name of attacking creature") then
PlayObjectAnimation("name of attacking creature", "attack00")
sleep(4)
PlayObjectAnimation("name of defending creature", "hit")
sleep(15 + random(15))
PlayObjectAnimation("name of defending creature", "attack00")
sleep(4)
PlayObjectAnimation("name of attacking creature", "hit")
end
sleep(15 + random(15))
end
end
startThread(battle)