1
[CreatureEvents] auto promotion Miér Mayo 07, 2014 3:19 pm
[Admin] God Maya
![[Admin] God Maya](https://2img.net/u/2712/30/40/04/avatars/1-92.jpg)
Administrador

Hola ususarios de tibiaface
es un script que al llegar a x lvl se le da la promotion automaticamente si cobrarle ni un crystal.
intalacion:
nos vamos a:
copian cualquier archivo y renombran por promotion.lua y pegan esto dentro
luego añaden esta tag en:
zona editable:
creaditos: Azi
es un script que al llegar a x lvl se le da la promotion automaticamente si cobrarle ni un crystal.
intalacion:
nos vamos a:
![]() | data/creaturescripts/scripts |
copian cualquier archivo y renombran por promotion.lua y pegan esto dentro
- Código:
local config = {
promoLevel = 1, -- promotion level : )
needLevel = 20, -- level to get promotion
needPremium = "yes" -- need premium (YES/NO)? :D
}
function onAdvance(cid, skill, oldlevel, newlevel)
if (skill == 0) and (newlevel >= config.needLevel and getPlayerPromotionLevel(cid)<config.promoLevel) then
if(string.lower(config.needPremium) == "yes" and isPremium(cid) == TRUE) or (string.lower(config.needPremium) == "no") then
setPlayerPromotionLevel(cid, config.promoLevel)
doPlayerSendTextMessage(cid, 22, "You have been promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
end
end
return TRUE
end
luego añaden esta tag en:
![]() | /data/creaturescripts/creaturescripts.xml |
- Código:
<event type="advance" name="promotion" script="promotion.lua"/>
zona editable:
- Código:
promoLevel = 1, -- promotion level : )
needLevel = 20, -- level to get promotion
needPremium = "yes" -- need premium (YES/NO)? :D
creaditos: Azi

![[CreatureEvents] auto promotion YNU5B25](https://i.imgur.com/yNU5B25.png)