function onAdvance(cid, skill, oldLevel, newLevel)
if getPlayerLevel(cid) == 20 then
if getPlayerStorageValue(cid, 1234) ~= 1 then
if getPlayerVocation(cid) == 1 then
doPlayerSetVocation(cid, 5)
setPlayerStorageValue(cid, 1234, 1)
elseif getPlayerVocation(cid) == 2 then
doPlayerSetVocation(cid, 6)
setPlayerStorageValue(cid, 1234, 1)
elseif getPlayerVocation(cid) == 3 then
doPlayerSetVocation(cid, 7)
setPlayerStorageValue(cid, 1234, 1)
elseif getPlayerVocation(cid) == 4 then
doPlayerSetVocation(cid, 8)
setPlayerStorageValue(cid, 1234, 1)
end
end
end
return true
end