function onUse(cid, item, fromPosition, itemEx, toPosition)
local p = Player(cid)
p:addHealth(health)
p:say(text, TALKTYPE_MONSTER_SAY)
return true
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
doPlayerAddHealth(cid, health)
doPlayerSay(text, TALKTYPE_MONSTER_SAY)
return true
end
<item id="2353" article="a" name="burning heart">
<attribute key="description" value="Burning heart always save your live!" />
<attribute key="weight" value="200" />
</item>
<action itemid="2353" event="script" value="burningheart.lua"/>
function onUse(cid, item, fromPosition, itemEx, toPosition)
if not isPlayer(cid) then
return true
end
local x = config[getMaxHealth(cid)]
if isPlayer(itemEx.uid) then
doCreatureAddHealth(itemEx.uid, math.floor(math.random(x.hp[1], x.hp[2]) / (cid == itemEx.uid and 1 or 2)))
doSendMagicEffect(getThingPos(itemEx.uid), 12)
return true
end