function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doPlayerAddExperience(cid, -1000000)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have been punished for killing a player of the same IP.')
else
local attackerLevel, level = getPlayerLevel(cid), getPlayerLevel(target)
if level >= math.floor(attackerLevel * 0.5) and level <= math.floor(attackerLevel * 1.5) then
doPlayerAddItem(cid, 2152, 1)
end
end
end
return true
end