def alarm(event):
while True:
# Pets can find enemies, too.
enemy = pet.findNearestEnemy()
# If there is an enemy:
if enemy:
hero.say(“message”)
# Then have the pet say something:
This problem has been solved and left alone for six months. Try not to revive dead threads in the future, but thanks for extending a helping hand to the CodeCombat community.