local runes = {
[8473] = {
voc = {4, 8},
min = 'level * 4 + maglv * 6 - 5',
max = 'level * 4 + maglv * 7'
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local i = runes[item.itemid]
if isInArray(i.voc, getPlayerVocation(cid)) then
if isPlayer(itemEx.uid) then
level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
doCreatureAddHealth(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 0)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
else
doPlayerSendCancel(cid, 'Your vocation cannot use this rune.')
end
return true
end
local runes = {
[2276] = {
voc = {1, 2, 5, 6},
min = 'level * 2 + maglv * 3 - 4',
max = 'level * 2 + maglv * 4'
},
[2298] = {
voc = {3, 7},
min = 'level * 2 + maglv * 4 - 5',
max = 'level * 2 + maglv * 8'
},
[2307] = {
voc = {4, 8},
min = 'level * 2 + maglv * 2 - 3',
max = 'level * 2 + maglv * 4'
}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local i = runes[item.itemid]
if isInArray(i.voc, getPlayerVocation(cid)) then
if isPlayer(itemEx.uid) == TRUE then
level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid)
doPlayerAddMana(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)()))
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1)
doRemoveItem(item.uid, 0)
else
doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES)
end
else
doPlayerSendCancel(cid, 'Your vocation cannot use this rune.')
end
return true
end
Wops The one up was a heal rune
use this one and u get mana rune for pally mana rune for ek mana rune for mage
Code:local runes = { [2276] = { voc = {1, 2, 5, 6}, min = 'level * 2 + maglv * 3 - 4', max = 'level * 2 + maglv * 4' }, [2298] = { voc = {3, 7}, min = 'level * 2 + maglv * 4 - 5', max = 'level * 2 + maglv * 8' }, [2307] = { voc = {4, 8}, min = 'level * 2 + maglv * 2 - 3', max = 'level * 2 + maglv * 4' } } function onUse(cid, item, fromPosition, itemEx, toPosition) local i = runes[item.itemid] if isInArray(i.voc, getPlayerVocation(cid)) then if isPlayer(itemEx.uid) == TRUE then level, maglv = getPlayerLevel(cid), getPlayerMagLevel(cid) doPlayerAddMana(cid, math.random(loadstring('return '..i.min)(), loadstring('return '..i.max)())) doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE) doCreatureSay(itemEx.uid, "Aaaah..", TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 0) else doPlayerSendDefaultCancel(cid, RETURNVALUE_CANONLYUSETHISRUNEONCREATURES) end else doPlayerSendCancel(cid, 'Your vocation cannot use this rune.') end return true end