-- Author: Kahras // TIBIA.NET.PL \\ Help: Matt --
[*]function onAdvance(cid, skill, oldLevel, newLevel)
[*]-- [level] = {give = "yes/no", itemid = iditem,
count =
count, storage = storage}
[*]local poziomy = {
[*][50] = {give = "no", itemid = id of item who give premium points,
count = 1, storage = 350001},
[*][100] = {give = "yes", itemid = id of item who give premium points,
count = 2, storage = 350002},
[*][150] = {give = "yes", itemid = id of item who give premium points,
count = 3, storage = 350003},
[*][200] = {give = "no", itemid = id of item who give premium points,
count = 5, storage = 350004}
[*]}
[*]for k, v in pairs(poziomy) do
[*]if getPlayerStorageValue(cid, v.storage) == -1 then
[*]if(newLevel == k) then
[*]setPlayerStorageValue(cid, v.storage, 1)
[*]doBroadcastMessage("Player "..getPlayerName(cid).." advanced on level "..newLevel.." !\n Congratulations!")
[*]if(v.give) then
[*]v.give = getBooleanFromString(v.give)
[*]
end
[*]if(not v.give) then
[*]return false
[*]
end
[*]doPlayerAddItem(cid, v.itemid, v.
count)
[*]
end
[*]
end
[*]
end
[*]return TRUE
[*]
end