[pedido] Mana Potion

PedroHEll
em Lixeira Pública

PedroHEll

Brasil
avatar
Cavaleiro
Cavaleiro

INFOS

Grupo: CavaleiroRegistrado: 12/04/08Posts: 191

queria saber como faz pro mana potion ficar infinito.

Pedro Henrique



pedrohellsign.png

Movack

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/11/08Posts: 25Char no Tibia: Druid Loose

Exemplo.

Vo usar o Potions do Aries.

 

local storevalue = 2578 -- value where exhausted is saved

local exhausttime = 1 -- 1 seconds exhaustion

local greatHealthPot = 7591

local greatManaPot = 7590

local strongHealthPot = 7588

local strongManaPot = 7589

local healthPot = 7618

local manaPot = 7620

local greatEmptyPot = 7635

local strongEmptyPot = 7634

local emptyPot = 7636

function onUse(cid, item, frompos, item2, topos)

if(exhaust(cid, storevalue, exhausttime) == 1) then

if(item.itemid == healthPot) then

doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)

if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 150, 210, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then

return FALSE

end

doTransformItem(item.uid, emptyPot)

elseif(item.itemid == manaPot) then

doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)

if(doTargetCombatMana(0, cid, 400, 600, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then

return FALSE

end

doTransformItem(item.uid, emptyPot)

elseif(item.itemid == strongHealthPot) then

doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)

if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 320, 420, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then

return FALSE

end

doTransformItem(item.uid, strongEmptyPot)

elseif(item.itemid == strongManaPot) then

doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)

if(doTargetCombatMana(0, cid, 800,1000, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then

return FALSE

end

doTransformItem(item.uid, strongEmptyPot)

elseif(item.itemid == greatHealthPot) then

doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)

if(doTargetCombatHealth(0, cid, COMBAT_HEALING, 500, 650, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then

return FALSE

end

doTransformItem(item.uid, greatEmptyPot)

elseif(item.itemid == greatManaPot) then

doSendAnimatedText(getPlayerPosition(cid), "Aaaah...", TEXTCOLOR_ORANGE)

if(doTargetCombatMana(0, cid, 1000, 1100, CONST_ME_MAGIC_BLUE) == LUA_ERROR) then

return FALSE

end

doTransformItem(item.uid, greatEmptyPot)

end

else

doPlayerSendCancel(cid, "You are exhausted.")

doSendMagicEffect(frompos, 2)

end

 

return TRUE

end

 

Em vermelho tem que deletar as linhas aí ele fica infinito

flwz

ZerOOo~

Sou fan de:




~ xP/


Outifit:

G0han

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 21/09/07Posts: 12Char no Tibia: Gohan of Sky

vlw zé