PE

[pedido] Mana Potion

Por PedroHEll, 30 de nov. de 2008 em Archived

3
2.6k
PedroHEllP
30 de novembro de 2008 às 14:31

queria saber como faz pro mana potion ficar infinito.

MovackM
01 de dezembro de 2008 às 09:23

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

2 meses depois...
G0hanG
15 de fevereiro de 2009 às 22:35

vlw zé