Hello everyone.
I have script who give hp and mana when you click.
Its work fine, but my problem is that i dont know how to add exhaust to this item.
And if i want add another item i must put some storagevavle?
Please if somebody can do this for me will be great.
And how to change if i want to script give hp/mana but not in %?
script:
local config = {
hp = 10, -- ile procent hp
mana = 25, -- ile procent many
konczysie = true -- konczy sie? (true = tak, false = nie)
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(config.konczysie) then
doRemoveItem(item.uid)
end
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)*(config.hp/100))
doCreatureAddMana(cid, getCreatureMaxMana(cid)*(config.mana/100))
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_CAKE)
return true
end
I have script who give hp and mana when you click.
Its work fine, but my problem is that i dont know how to add exhaust to this item.
And if i want add another item i must put some storagevavle?
Please if somebody can do this for me will be great.
And how to change if i want to script give hp/mana but not in %?
script:
local config = {
hp = 10, -- ile procent hp
mana = 25, -- ile procent many
konczysie = true -- konczy sie? (true = tak, false = nie)
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(config.konczysie) then
doRemoveItem(item.uid)
end
doCreatureAddHealth(cid, getCreatureMaxHealth(cid)*(config.hp/100))
doCreatureAddMana(cid, getCreatureMaxMana(cid)*(config.mana/100))
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_CAKE)
return true
end