Code:
function getMother()
    for i = CREATURES_LOW, CREATURES_HIGH do
        local c = Creature.New(i)
        if c:Name() == "Slime" and c:HealthPercent() <= 75 then
            return c
        end
    end
end

local mother = getMother()
local me = Creature.GetByID(Self.ID())

Module.New('slime-trainer', function(module)
    if mother:isAlive() and me:HealthPercent() <= 80 then
        mother:Attack()
        module:Pause()
    end
end)