local t = {
voc = {2, 10, 28, 29, 30}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ID_OF_THE_CLOSED_DOOR then
if(t.voc and not isInArray(t.voc, getPlayerVocation(cid))) 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
local t = {
voc = {2, 10, 28, 29, 30}
}
*
*
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ID_OF_THE_CLOSED_DOOR then
if isInArray(t.voc, getPlayerVocation(cid) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have the required vocation.")
return FALSE
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
return TRUE
end
end
local t = {
[voc] = {2, 10, 28, 29, 30}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if item.itemid == ID_OF_THE_CLOSED_DOOR then
if isInArray(t[voc], getPlayerVocation(cid) == FALSE then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You don't have the required vocation.")
return FALSE
end
doTransformItem(item.uid, item.itemid + 1)
doTeleportThing(cid, toPosition)
return TRUE
end
end