Boa Noite , amigos vim aqui mais uma vez precisando da ajuda de vocês , estou precisando de um script pra facilitar a vida dos players pra compra promotion um comando !buypromotion se alguem tiver ai pode me disponibilizar agradeço muito abraço a todos (:
[Pedido] Comando !buypromotion

Fala ae senhorita,
Váa em talkactions/scripts, copie um arquivo qualquer e renomeie para promotions, apague tudo qe está dentro e coloque isto:
local config = {promotion = 1, -- promotion level, default = 1 . Ignore if you don't have new vocations.
minLevel = 20, -- Level needed to buy promotion
cost = 20000, -- Promotion cost in gp
premium = "yes" -- is premium needed to buy promotion?
}
local disabledVocations = {0}
config.premium = getBooleanFromString(config.premium)
function onSay(cid, words, param)
if(isInArray(disabledVocations, getPlayerVocation(cid)) == TRUE) then
doPlayerSendCancel(cid, "Your vocation cannot buy promotion.")
elseif(config.premium == TRUE and isPremium(cid) == FALSE) then
doPlayerSendCancel(cid, "You need a premium account.")
elseif(getPlayerPromotionLevel(cid) >= config.promotion) then
doPlayerSendCancel(cid, "You are already promoted.")
elseif(getPlayerLevel(cid) < config.minLevel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need " .. config.minLevel .. " to get promotion.")
elseif(doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You do not have enought money! (Promotion cost " .. config.cost .. " gp.")
else
setPlayerPromotionLevel(cid, config.promotion)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been succesful promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
end
return TRUE
end
se precisar de explicaçãao soh falar manin (:
dps vai em talkactions.xml e adiciona essa tag em players
<talkaction words="!buypromotion" script="promotion.lua"/>
Ajudei ? REP+ afterlifemax.servegame.com a nova era ( Em updates constantes )
Exelente amigo muito obrigado. REP +