Please can someone fix me a script for UH that heals 1900-2000 hp
local t = {
min = 1900,
max = 2000,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
doPlayerAddHealth(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end
Works with doPlayerAddMana, but when I change to doPlayerAddHealth, it says "you cannot use this item" ingame.
when using uh:
local t = {
min = 1900,
max = 2000,
text = "Aaaah...",
effect = CONST_ME_MAGIC_BLUE
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if isPlayer(itemEx.uid) then
doPlayerAddHealth(itemEx.uid, math.random(t.min, t.max))
doCreatureSay(itemEx.uid, t.text, TALKTYPE_ORANGE_1)
doSendMagicEffect(toPosition, t.effect)
else
doPlayerSendCancel(cid, "You can only use this rune on players.")
end
return true
end
Works with doPlayerAddMana, but when I change to doPlayerAddHealth, it says "you cannot use this item" ingame.
when using uh:
Last edited: