I Need to make this a health rune. I tryed using doPlayerAddHealth but nil value so just wondering if someone could quickly fix this script to heal health or tell me the function thanks.
local t = {
min = 1000,
max = 1200,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
if isInArray({12},getPlayerVocation(cid)) then
if getPlayerMagLevel(cid) >= 10 then
doPlayerAddMana(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You dont have the required magic level to use this rune.")
end
else
doPlayerSendCancel(cid, "You dont have the required vocation to use this rune.")
end
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end
local t = {
min = 1000,
max = 1200,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
if isInArray({12},getPlayerVocation(cid)) then
if getPlayerMagLevel(cid) >= 10 then
doPlayerAddMana(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You dont have the required magic level to use this rune.")
end
else
doPlayerSendCancel(cid, "You dont have the required vocation to use this rune.")
end
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end