Vá até a pasta Talkactions abra o arquivo Talkactions.xml e adicione esta Tag:
<talkaction words="!promotion" event="script" value="promotion.lua"/>
Agora vá até a pasta Scripts dentro da pasta Takactions e abra ou faça um script spells.lua e adicione isto dentro:
function onSay(cid, words, param, channel)
local config = {
[1] = {level = 20, valor = 20000},
[2] = {level = 20, valor = 20000},
[3] = {level = 20, valor = 20000},
[4] = {level = 20, valor = 20000},
if config.vipsconfig.onlyvips == "yes" and getPlayerStorageValue(cid, config.vipsconfig.storagevip) - os.time() <= 0 then -- Apenas players vips "yes" ou "no" e o storage da vip.
onlypremmy = "yes" -- Apenas players premium accounts "yes" or "no".
}
if config.onlypremmy == "yes" and not isPremium(cid) then
return doPlayerSendTextMessage(cid, 23, "Sorry, only premium players.")
end
if config.vipsconfig.onlyvips == "yes" and getPlayerStorageValue(cid, config.vipsconfig.storagevip) - os.time() <= 0 then
return doPlayerSendTextMessage(cid, 23, "Sorry, only vips players.")
end
if config[getPlayerVocation(cid)] then
if getPlayerLevel(cid) >= config[getPlayerVocation(cid)].level then
if doPlayerRemoveMoney(cid, config[getPlayerVocation(cid)].valor) then
setPlayerPromotionLevel(cid, 1)
doPlayerSendTextMessage(cid, 22, "Congratulations, you have been successfully promoted!")
doSendMagicEffect(cid, 14)
else
doPlayerSendTextMessage(cid, 23, "You need "..config[getPlayerVocation(cid)].valor.." gold coins to promote.")
end
else
doPlayerSendTextMessage(cid, 23, "You need level "..config[getPlayerVocation(cid)].level.." to promote.")
end
else
doPlayerSendTextMessage(cid, 23, "Sorry, you already promoted.")
end
return TRUE
end




info
Grupo: Campones
Registrado: 19/07/11
Posts: 71
Reputação: +18
quero um comando que transforme de elite knight para hero (eu que criei) outro exemplo : de elder druid para Mago
rep ++ pra quem ajudar :smile_positivo: