WiLDTuRTLE
Member
- Joined
- Feb 26, 2011
- Messages
- 478
- Reaction score
- 5
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 1000))
function onUse(cid, item, fromPosition, itemEx, toPosition)
local hpmax = getCreatureMaxHealth(cid)
local min = 30 -- this means 3% minimum healing
local max = 50 -- this means 5% maximum healing
local hp_add = math.random((hpmax * (min/100)), (hpmax * (max/100)))
doCreatureAddHealth(cid, hp_add)
doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
return TRUE
end
How do i change this script to heal my friends too? [if use on people and heal them and not me]