Untitled

 avatar
unknown
plain_text
9 months ago
720 B
1
Indexable
local config = {
    animationColor = TEXTCOLOR_LIGHTBLUE, --[[Color de la animación | Por defecto = Azul Claro]]
    textType = TALKTYPE_ORANGE_1, --[[Color del texto | Por defecto = Verde]]
    levelGain = 10 -- Cantidad de niveles que se ganarán
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
    local currentLevel = getPlayerLevel(cid)
    local newLevel = currentLevel + config.levelGain
    doPlayerSetLevel(cid, newLevel)
    doSendAnimatedText(getThingPosition(cid), "+" .. config.levelGain, config.animationColor)
    doPlayerSendTextMessage(cid, config.textType, "Has ganado " .. config.levelGain .. " niveles. ¡Felicidades!")
    doRemoveItem(item.uid, 1)
    return true
end
Editor is loading...
Leave a Comment