local t = {
39001, {
[20] = {2160, 2, "Congratulations, you have achieved one of eleven goals! You have been awarded with 2 crystal coins!", 1},
[60] = {2160, 4, "Congratulations, you have achieved two of eleven goals! You have been awarded with 4 crystal coins!", 2},
[100] = {2160, 5, "Congratulations, you have achieved three of eleven goals! You have been awarded with 5 crystal coins!", 3},
[140] = {2160, 7, "Congratulations, you have achieved four of eleven goals! You have been awarded with 7 crystal coins!", 4},
[180] = {2160, 8, "Congratulations, you have achieved five of eleven goals! You have been awarded with 8 crystal coins!", 5},
[220] = {2160, 9, "Congratulations, you have achieved six of eleven goals! You have been awarded with 9 crystal coins!", 6},
[260] = {2160, 10, "Congratulations, you have achieved seven of eleven goals! You have been awarded with 10 crystal coins!", 7},
[300] = {2160, 11, "Congratulations, you have achieved eight of eleven goals! You have been awarded with 11 crystal coins!", 8},
[340] = {2160, 12, "Congratulations, you have achieved ten of eleven goals! You have been awarded with 12 crystal coins!", 9},
[380] = {2160, 13, "Congratulations, you have achieved all eleven goals! You have been awarded with 13 crystal coins!", 10}
}
}
function onAdvance(cid, skill, oldlevel, newlevel)
if skill == SKILL__LEVEL then
for level, v in pairs(t[2]) do
if oldlevel < level and getPlayerLevel(cid) >= level and getPlayerStorageValue(cid, t[1]) < v[4] then
doPlayerAddItem(cid, v[1], v[2])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, v[3])
setPlayerStorageValue(cid, t[1], v[4])
end
end
end
doPlayerSave(cid, true)
return true
end