not tested, but, try this..
function onStatsChange(cid, attacker, type, combat, value)
if(not isPlayer(cid)) then
return true
end
if type == STATSCHANGE_HEALTHLOSS and isPlayer(attacker) and getCreatureSkill(cid) == SKULL_RED and value > 0 then
doCreatureAddHealth(cid, -(value*0.5))...