local doors = { -- door position here
[{x = 0, y = 0, z = 0}] = 1,
[{x = 0, y = 0, z = 0}] = 2,
[{x = 0, y = 0, z = 0}] = 3,
[{x = 0, y = 0, z = 0}] = 4
}
local storage = 123456 -- vocation storage
function onUse(player, item, fromPosition, target, toPosition, isHotkey)
if player:getStorageValue(storage) < 1 then
for position, vocation in pairs(doors) do
if isInArray(position, item:getPosition()) then
player:setVocation(vocation)
player:setStorageValue(storage, vocation)
return true
end
end
end
return true
end