local level = getPlayerLevel(cid)
local mana_min, mana_max = (level * 4), (level * 6)
function onUse (cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) and level >= 300 then
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 25)
doCreatureAddMana (cid, math.random(mana_min, mana_max))
end
return true
end
What happend if you use this one at lower level then 300? And I think he wants one that heals under 300 and then at 300+ it heals more. I can be wrong ^^LUA:local level = getPlayerLevel(cid) local mana_min, mana_max = (level * 4), (level * 6) function onUse (cid, item, fromPosition, itemEx, toPosition) if isPlayer(itemEx.uid) and level >= 300 then doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1) doSendMagicEffect(getCreaturePosition(cid), 25) doCreatureAddMana (cid, math.random(mana_min, mana_max)) end return true end
local level = getPlayerLevel(cid)
local mana_min, mana_max = (level * 4), (level * 6)
function onUse (cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) and level >= 300 then
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doSendMagicEffect(getCreaturePosition(cid), 25)
doCreatureAddMana(cid, math.random(mana_min, mana_max))
else
doPlayerSendCancel(cid, "You are too low to use this manarune")
end
return true
end
Manarune that has a required level of 300.