Ir para conteúdo

[pedido] Mana Potion


PedroHEll

Posts Recomendados

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

Link para o comentário
Compartilhar em outros sites

  • 2 months later...
Visitante
Este tópico está impedido de receber novos posts.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...