(Pedido) Uh E Mana Por Actions

JohnColner
em Lixeira Pública

JohnColner

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 05/12/11Posts: 21Char no Tibia: JohnColner

Da uma força ai .. me ajudem to querendo uma Runa por actions que encha MP e HP.. vlw REP +

jhon992

Dono JhonBot
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 30/06/11Posts: 631Char no Tibia: Warrior of Mort
function onUse(cid, item, fromPosition, itemEx, toPosition)

local min_hp = 100 -- minimo de life que ira encher
local max_hp = 200 -- maximo de life que ira encher

local min_mana = 100 -- minimo de mana que ira encher
local max_mana = 200 -- maximo de mana que ira encher

local effect = 30 -- efeito no player
local exhaust_sec = 2 -- exausted em segundos

if(exhaustion.check(cid, 34539) == TRUE) then
  doPlayerSendCancel(cid, "Voçê só pode usar após [" .. exhaustion.get(cid, 34539).."] segundos.")
return TRUE
end

doCreatureAddHealth(cid, math.random(min_hp,max_hp))
doCreatureAddMana(cid, math.random(min_mana,max_mana))
exhaustion.set(cid, 34539, exhaust_sec)
doRemoveItem(item.uid, 1)
doSendMagicEffect(getPlayerPosition(cid), effect)

return TRUE
end