tested on 0.3.5 and it will work on 0.2.5 for 0.3.5 it got small errors in console but dont take it in hearth ! i hope us will rep me
Code:
local MIN = 200
local MAX = 300
function onUse(cid, item, fromPosition, itemEx, interval, lastexecution)
if isPlayer(itemEx.uid) == FALSE then
return FALSE
end
if((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80)) then
doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above use this mana rune.", TALKTYPE_ORANGE_1)
return TRUE
end
if doPlayerAddMana(itemEx.uid, math.random(MIN, MAX)) == LUA_ERROR then
return FALSE
end
doAddCondition(cid, exhaust, lastExecution, interval, fromPosition, toPosition)
doCreatureSay(cid,"Ahh, manarune rocks!",19)
doSendMagicEffect(fromPosition, math.random( 1, 50 ) )
return TRUE
end