function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == [B][COLOR="red"]ID_OF_THE_CLOSED_DOOR[/COLOR][/B] then
local voc = getPlayerVocation(cid)
if(voc < 5 or voc > 8) then
return doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have the required vocation.")
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
return true
end
end