try this one.
function onUse(cid, item, fromPosition, itemEx, toPosition)
local promo = getPlayerPromotionLevel(cid)
if promo < 1 then
doPlayerSetPromotionLevel(cid, 2)
doCreatureSay(cid, "You are Epic Master Sorcerer now!", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 1)
else...