Yo, im tryed to make a rune that adds hp and mana. But i failed. :ninja:
Also i tryed _Arthurs script but it added only mana.
Can anyone help me?
Ty in advance.
Also i tryed _Arthurs script but it added only mana.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local min, max = 0, 0
local rand = math.random(min, max)
if rand > 1600 then
rand = 1600
end
if rand < 900 then
rand = 900
end
if not isPlayer(itemEx.uid) then
return doPlayerSendDefaultCancel(cid, RETURNVALUE_NOTPOSSIBLE)
end
if(getCreatureMana(cid) >= getCreatureMaxMana(cid)) then
return doPlayerSendCancel(cid, "Your mana is currently full.")
end
return doChangeTypeItem(item.uid, item.type - 1) and doSendMagicEffect(toPosition, CONST_ME_MAGIC_BLUE) and doPlayerAddMana(itemEx.uid, rand) and doCreatureSay(itemEx.uid, "Mmmh, delicious!", TALKTYPE_ORANGE_1)
end
Can anyone help me?
Ty in advance.