local level = {
[1] = {
dest = {x = 1000, y = 1000, z = 7},
min = 100,
max = 200,
msg = 'You have entered the first floor.'
},
[2] = {
dest = {x = 1001, y = 1001, z = 8},
min = 200,
max = 300,
msg = 'You have entered the second floor.'
}
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
for _, v in pairs(level) do
if(getPlayerLevel(cid) < v.min and getPlayerLevel(cid) > v.max) then
return doTeleportThing(cid, v.dest), doSendMagicEffect(v.dest, CONST_ME_TELEPORT), doCreatureSay(cid, v.msg, TALKTYPE_ORANGE_1)
end
end
doTeleportThing(cid, fromPosition)
return true
end