actions.xml
<action itemid="1386" script="other/teleport.lua" />
teleport.lua
local upFloorIds = {1386, 3678, 5543}
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if isInArray(upFloorIds, item.itemid) then
fromPosition:moveUpstairs()
else...