local magicWall = {1497, 1498, 8753, 11098}
local c = {[0] = 'y' , 'x', 'y', 'x'}
function onStepIn(cid, item, position, fromPosition)
local pos = getCreaturePosition(cid)
local function movePlayer()
local dir = getCreatureLookDirection(cid)
pos[c[dir]] = isInArray({0, 1}, dir) and pos[c[dir]] + 1 or pos[c[dir]] - 1
return pos
end
if isInArray(magicWall, item.itemid) then
doTeleportThing(cid, movePlayer(), false)
doCreateItem(item.itemid, 1, position)
end
return true
end