- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- Action para segunda promotion
LU
action
Action para segunda promotion
Por LuckinhaSan, 09 de mai. de 2013 em Actions e Talkactions
script
1
694
Por LuckinhaSan, 09 de mai. de 2013 em Actions e Talkactions
info
Grupo: Conde
Registrado: 03/09/11
Posts: 703
Reputação: +191
Gênero: Masculino
Char no Tibia: Mirade
Vá em data/actions/scripts, crie um arquivo .lua com o nome de secondpromo e adicione isso -
local config = { promotion = 1, -- promotion de nível, padrão = 1. Ignorar se você não tem novas vocations. minLevel = 20, -- Level necessário para comprar promotion. cost = 20000, -- Custo da promotion em gp premium = "yes" -- premium é necessário para comprar promotion } function onSay(cid, words, param) if getPlayerVocation(cid) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need to have a vocation to buy a promotion.") return TRUE end if (config.premium == "yes" and isPremium(cid)) or (config.premium ~= "yes") then if(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 to be " .. 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 else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need a premium account to buy a promotion.") end return TRUE endEm actions.xml, adicione a tag -
Vocations.xml -
Créditos - LucasFerraz
Editado Maio 9 por LuckinhaSan