function onUse(cid, item, frompos, item2, topos)
local MagicLevelToUse = 2
local MaxManaToAdd = 500
local MinManaToAdd = 350
local mLvl = getPlayerMagLevel(cid)
local ManaToAdd = math.random(MinManaToAdd, MaxManaToAdd)
if item2.itemid == 1 and mLvl >= MagicLevelToUse then
if item.type > 1 then
doSendMagicEffect(frompos,1)
doPlayerAddMana(cid,ManaToAdd)
doPlayerSay (cid,"Add Mana...",17) --doCreatureSay()--
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
elseif item2.itemid >= 2 then
doPlayerSendCancel(cid,"You can only use this rune on you/on other players.")
doSendMAgicEffect(frompos,2)
elseif item2.itemid == 1 and mLvl < MagicLevelToUse then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have enough magic level to use this rune.")
end
return true
end