em creaturescripts crie um arquivo.lua com o nome levelitem.lua e adicione isto dentro:
function onAdvance(cid, skill, oldLevel, newLevel)
local config = {
[50] = {item = 2160, count = 50},
}
if skill == 8 then
for level, info in pairs(config) do
if newLevel >= level and (getPlayerStorageValue(cid, 30700) == -1 or not (string.find(getPlayerStorageValue(cid, 30700), "'" .. level .. "'"))) then
doPlayerAddItem(cid, info.item, info.count)
doPlayerSendTextMessage(cid, 27, "Parabéns Guerreiro você atingiu o level "..newLevel.." e ganhou "..info.count.." "..getItemNameById(info.item)..".")
local sat = getPlayerStorageValue(cid, 30700) == -1 and "Values: '" .. level .. "'" or getPlayerStorageValue(cid, 30700) .. ",'" .. level .. "'"
setPlayerStorageValue(cid, 30700, sat)
end
end
end
return TRUE
end
em creaturescripts/scripts/login.lua adicione isto:
registerCreatureEvent(cid, "LevelItem")
por fim em creaturescripts.xml adicione esta linha:
<event type="advance" name="LevelItem" event="script" value="levelitem.lua"/>
explicando:
[50] = {item = 2160, count = 50},
vermelho: level que ira ganhar o item
verde: id do item que ira ganhar
roxo: quantidade que ira ganhar
rep+ profavor.









info
Grupo: Campones
Registrado: 07/08/11
Posts: 56
Reputação: 0
Char no Tibia: lalala
Olá queria q alguem me ajudasse e me aarrumasse uma script de quando o player pega lvl 50 ganha 50k dou +rep pra quem me ajudar
obrigado desde ja