function onAdvance(cid, oldlevel, newlevel)
local config = {
[50] = {storage = 3100, jaki_poziom = 50},
[100] = {storage = 3101, jaki_poziom = 100},
[150] = {storage = 3100, jaki_poziom = 150},
[200] = {storage = 3101, jaki_poziom = 200},
[250] = {storage = 3100, jaki_poziom = 250},
[300] = {storage = 3101, jaki_poziom = 300},
[350] = {storage = 3100, jaki_poziom = 350},
[400] = {storage = 3101, jaki_poziom = 400}
}
local pozycja = getCreaturePosition(cid)
local tabela = config[getPlayerLevel(cid)]
local name = getPlayerName(cid)
local tekst = name.." zdobyl "..tabela.jaki_poziom.." poziom doswiadczenia. Gratulujemy!"
if getPlayerStorageValue(cid, tabela.storage) == -1 then
doBroadcastMessage(tekst, MESSAGE_STATUS_WARNING)
setPlayerStorageValue(cid, tabela.storage, 1)
doSendMagicEffect(pozycja, CONST_ME_MORTAREA)
end
end