eardrums
Member
- Joined
- May 27, 2010
- Messages
- 94
- Solutions
- 1
- Reaction score
- 10
Hello,
Can anyone help create a script where when I use a certain item it heals me for a certain amount and also sets an exhaust rate. I got the script down but without being able to put the exhaust rate. This is what i did so far but so far i cant get it to get exhausted
if anyone can help me and tell me what i might be doing wrong I would be very grateful thanks
Can anyone help create a script where when I use a certain item it heals me for a certain amount and also sets an exhaust rate. I got the script down but without being able to put the exhaust rate. This is what i did so far but so far i cant get it to get exhausted
Code:
local exhaust = createConditionObject(CONDITION_EXHAUST_HEAL)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))
function onUse(cid, item, fromPosition, itemEx, toPosition)
if itemEx.itemid == 6542 then
doRemoveItem(cid, item.uid, 1)
doTargetCombatHealth(0, cid, COMBAT_HEALING, 500, 500, CONST_ME_HEARTS)
doAddCondition(cid, exhaust)
doPlayerFeed(cid, 50)
doCreatureSay(cid, "Crack", TALKTYPE_ORANGE_1)
elseif(getCreatureCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
end
return TRUE
end
if anyone can help me and tell me what i might be doing wrong I would be very grateful thanks