function onAdvance(cid, skill, oldLevel, newLevel)
local config = {
[20] = {item = 2160, count = 5},
[50] = {item = 2160, count = 5},
[100] = {item = 2160, count = 5},
[110] = {item = 2160, count = 5},
[120] = {item = 2160, count = 5},
[130] = {item = 2160, count = 5},
[140] = {item = 2160, count = 5},
[150] = {item = 2160, count = 5},
[160] = {item = 2160, count = 5},
[170] = {item = 2160, count = 5},
[180] = {item = 2160, count = 5},
[190] = {item = 2160, count = 5},
[200] = {item = 2160, count = 5},
[210] = {item = 2160, count = 5},
[220] = {item = 2160, count = 5},
[230] = {item = 2160, count = 5},
[240] = {item = 2160, count = 5},
[250] = {item = 2160, count = 5},
[260] = {item = 2160, count = 5},
[270] = {item = 2160, count = 5},
[280] = {item = 2160, count = 5},
[290] = {item = 2160, count = 5},
[300] = {item = 2160, count = 5},
[320] = {item = 2160, count = 5},
[330] = {item = 2160, count = 5},
[340] = {item = 2160, count = 5},
[350] = {item = 2160, count = 5},
[360] = {item = 2160, count = 5},
[370] = {item = 2160, count = 5},
[380] = {item = 2160, count = 30},
[390] = {item = 2160, count = 40},
[400] = {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