Try this
function onAdvance(cid, skill, oldLevel, newLvel)
if isPlayer(cid) and skill == SKILL_LEVEL and newLvel == 200 then
setPlayerPromotionLevel(cid, 2)
end
return true
end
doPlayerSetVocation(cid) does not work like hat, you have to set vocation id, like...