Tente:
function onUse(cid, item)
local c = {
[10021] = {
vocationId = 1, to = {x = 160, y = 54, z = 7}},
[10022] = {
vocationId = 2, to = {x = 160, y = 54, z = 7}},
[10023] = {
vocationId = 3, to = {x = 160, y = 54, z = 7}},
[10024] = {
vocationId = 4, to = {x = 160, y = 54, z = 7}}
}
if item.itemid == 1945 then
if c[item.uid] then
if isRookie(cid) then
doPlayerSetVocation(cid,c[item.uid].vocationId)
doTeleportThing(cid, c[item.uid].to)
doTransformItem(item.uid, item.itemid + 1)
else
doTransformItem(item.uid, item.itemid + 1)
doPlayerSendCancel(cid, "You already have vocation.")
end
end
elseif item.itemid == 1946 then
doTransformItem(item.uid, item.itemid - 1)
end
return true
end
flw




info
Grupo: Campones
Registrado: 22/09/10
Posts: 34
Reputação: +5
Presciso de um script que quando o player puche a alavanca ganhe uma vocação e ao mesmo tempo seja teletransportado;
No caso seriam 4 alavancas (knight, paladin, druid e sorcerer);
Ou poderia ser um NPC que desse a vocação.
Agradeço desde já.