local function pushBack(cid, position, fromPosition, count)
doTeleportThing(cid, fromPosition, false)
doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
if(count) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected. You need " .. count .. " reborns.")
end
end
local reborn = {
[940] = 10,
[941] = 20,
[942] = 30,
[943] = 40,
[944] = 50,
[945] = 100
}
function onStepIn(cid, item, position, fromPosition)
if not(isPlayer(cid)) then return true end
local rebornTile = reborn[item.actionid]
if rebornTile then
if !!==INSERT_FUNCTION_TO_CHECK_REBORNS==!!(cid) < rebornTile then
pushBack(cid, position, fromPosition, rebornTile)
return false
end
end
return true
end