Andrekkzie
New Member
- Joined
- Sep 12, 2010
- Messages
- 64
- Reaction score
- 2
How can i make that an item gives 10% hp or mana
function doPlayerAddManaPercent(cid, percent)
local mana = getPlayerMaxMana(cid)
doPlayerAddMana(cid, (mana / 100) * percent)
return TRUE
end
function doPlayerAddHealthPercent(cid, percent)
local health = getCreatureMaxHealth(cid)
doCreatureAddHealth(cid, (health / 100) * percent)
return TRUE
end
doPlayerAddManaPercent(cid, 10) ---- gives player 10% of his mp
doPlayerAddHealthPercent(cid, 10) ---- gives player 10% of his hp
Up me too i want to know that if its possible in items.xml