mob/Pet
verb
Pet_Attack(mob/Monster in oview(5))
set category = "Pet"
for(var/mob/M in oview(5))
if(M.owner == "[usr]")
if(M.pet == 1)
walk_to(M, Monster, 1, 1)
if(!M.attack)
M.attack = 1
var/damage = M.str - Monster.def
var/num = damage
M.hp -= damage
s_damage(M, num, "#FF0000")
usr << "[M] attacks [Monster]!"
if(Monster.hp <= 0)
Monster.Death()
sleep(10)
M.attack = 0
Problem description: My pet attacks once, but I'm tryin to get it to attack until the monster is dead.