Uma edição do seu script:
local HP_PERCENT = 25 --% local M_PERCENT = 25 function onUse(cid, item, fromPosition, itemEx, toPosition) ITEM = 2673 local storage = 50000 local wait = 0.7 if fromPosition.x ~= CONTAINER_POSITION and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = math.floor(getCreatureMaxHealth(cid) * (HP_PERCENT/100)) REG_MANA = math.floor(getPlayerMaxMana(cid) * (M_PERCENT/100)) doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Power is back !', TALKTYPE_ORANGE_1) doRemoveItem(item.uid, 1) exhaustion.set(cid, storage, wait) elseif item.itemid == ITEM and exhaustion.get(cid, storage) == FALSE then REG_HEALTH = math.floor(getCreatureMaxHealth(cid) * (HP_PERCENT/100)) REG_MANA = math.floor(getPlayerMaxMana(cid) * (M_PERCENT/100)) doPlayerAddMana(cid, REG_MANA) doCreatureAddHealth(cid, REG_HEALTH) doCreatureSay(cid, 'Power is back !', TALKTYPE_ORANGE_1) doRemoveItem(item.uid,1) exhaustion.set(cid, storage, wait) else doPlayerSendCancel(cid, "You are exhausted.") end return TRUE end
Edite as variáveis HP_PERCENT e M_PERCENT.
O math.floor é pra não ficar valores "quebrados".






info
Grupo: Cavaleiro
Registrado: 18/12/12
Posts: 158
Reputação: +14
Gênero: Masculino
Char no Tibia: Lestat
Bom Galera eu queria primeiro saber se é possível,e se for possível pedir um item que regenera HP e MANA mais não tão simples assim,um item que regenera HP e MANA baseado no MAX HP e MANA do player
Exemplo: ao usar tal item o player regenera 25% da vida total dele
Script atual(regenera totalmente a vida do player)
function onUse(cid, item, fromPosition, itemEx, toPosition)