change:
to:
Code:
if not teleport.canTeleportWhileInfight and player:getCondition(CONDITION_INFIGHT) == false then
Code:
if not teleport.canTeleportWhileInfight and getCreatureCondition(cid, CONDITION_INFIGHT) == false then