local t = {
[1337] = {1}, -- [door action id] = {vocation}
[1338] = {2},
[1339] = {3},
[1340] = {4}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local k = t[item.actionid]
if(k and getPlayerVocation(cid) == k[1]) then
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition, true)
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "This door seems to be sealed against unwanted intruders.")
end
return true
end