@newton
erro:
[09/08/2012 16:06:43] [Error - LuaScriptInterface::loadFile] data/actions/scripts/vocation.lua:7: 'then' expected near 'doPlayerSetVocation'
[09/08/2012 16:06:43] [Warning - Event::loadScript] Cannot load script (data/actions/scripts/vocation.lua)
[09/08/2012 16:06:43] data/actions/scripts/vocation.lua:7: 'then' expected near 'doPlayerSetVocation'






info
Grupo: Conde
Registrado: 04/08/12
Posts: 762
Reputação: +80
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid,1992) == 1 then
doCreatureSay(cid, "Você ja recebeu a nova vocaçao", TALKTYPE_ORANGE_1)
else if getPlayerLevel(cid) >= 20 then
doCreatureSay(cid, "você recebeu uma nova vocaçao!", TALKTYPE_ORANGE_1)
if getPlayerVocation(cid) == 1
doPlayerSetVocation(cid, 2)
end
doSendMagicEffect(fromPosition, 2)
doRemoveItem(item.uid)
setPlayerStorageValue(cid,1992,1)
return TRUE
else
doCreatureSay(cid, "Você deve ter level 20 ou mais para usar o Item!",TALKTYPE_ORANGE_1)
end
end
end
Obs: Não esquece do:
if getPlayerStorageValue(cid, 1992) ~= -1 then
doPlayerSetVocation(cid, getPlayerStorageValue(cid, 1992))
end
Editado Agosto 9 por Newtonnotwen