Pra funcionar certinho essa essa talk de promotion aqui:
function onSay(cid, words, param, channel)
local configs = {
cost = 20000,
level = 20
}
if isVip(cid) then
if getPlayerLevel(cid) >= configs.level then
if getPlayerPromotionLevel(cid) == 1 then
if configs.cost <= 0 or doPlayerRemoveMoney(cid, configs.cost) then
setPlayerPromotionLevel(cid, 2)
else
doPlayerSendCancel(cid, "Voce nao tem o dinheiro suficiente que é " .. configs.cost .. " gold coins.")
end
else
doPlayerSendCancel(cid, "Voce ja é promoted.")
end
else
doPlayerSendCancel(cid, "Voce precisa ser level " .. configs.level .. " ou maior para adiquirir a promotion.")
end
else
doPlayerSendCancel(cid, "Voce precisa ser vip para adiquirir a promotion.")
end
return TRUE
end
Para funcionar o player tem que estar com a primeira promotion jah, e nos vocations.xml os fromvoc="idvocação" devem estar corretos.
info
Grupo: Conde
Registrado: 30/06/11
Posts: 631
Reputação: +371
Char no Tibia: Warrior of Mort
Pra funcionar certinho essa essa talk de promotion aqui:
function onSay(cid, words, param, channel) local configs = { cost = 20000, level = 20 } if isVip(cid) then if getPlayerLevel(cid) >= configs.level then if getPlayerPromotionLevel(cid) == 1 then if configs.cost <= 0 or doPlayerRemoveMoney(cid, configs.cost) then setPlayerPromotionLevel(cid, 2) else doPlayerSendCancel(cid, "Voce nao tem o dinheiro suficiente que é " .. configs.cost .. " gold coins.") end else doPlayerSendCancel(cid, "Voce ja é promoted.") end else doPlayerSendCancel(cid, "Voce precisa ser level " .. configs.level .. " ou maior para adiquirir a promotion.") end else doPlayerSendCancel(cid, "Voce precisa ser vip para adiquirir a promotion.") end return TRUE endPara funcionar o player tem que estar com a primeira promotion jah, e nos vocations.xml os fromvoc="idvocação" devem estar corretos.