Ir para conteúdo

Featured Replies

  • Respostas 17
  • Visualizações 695
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • O erro do distro é porque tava if getPlayerItemCount(cid, itens) = 1 then onde no caso deveria ser "==", pois o "=" serve pra definir algo, enquanto == é pra conferir se ta igual a x.

Postado
  • Autor
  Em 31/10/2014 em 23:19, alanmtd1 disse:

Nao entendi oque voce disse ,  e o script anterior tem falhas?

se tiver acho que ja sei oque é!

function onUse(cid, item, frompos, item2, topos)
local itens = {2160}
local itens2 = {2189, 2191, 2187, 2190, 2181, 2188, 8921}

        if item.uid == 4112 then
        if getPlayerItemCount(cid, itens) >= 25 then
      doPlayerRemoveItem(cid, itens, 25)
        if getPlayerItemCount(cid, itens2) >= 1 then
      doPlayerRemoveItem(cid, itens2, 1)
        queststatus = getPlayerStorageValue(cid,100003)
        if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"You won a full mage addon!")
                doSendAnimatedText(getPlayerPosition(cid), "", TEXTCOLOR_ORANGE)
                doPlayerAddOutfit(cid,138,3)
                doPlayerAddOutfit(cid,120,3)
        setPlayerStorageValue(cid,100003,1)
        else
        doPlayerSendTextMessage(cid,22,"You own this addon!")
        end
        else
        doPlayerSendTextMessage(cid,22,"I need 1 wand of cosmic energy, 1 wand of draconia, 1 wand of dragonbreath, 1 wanf of inferno, 1 wand of vortex, 1 terra rod, 1 common akilles wand and more 250.000 cash for this addon!")
        end
        else
        return 0
        end

        return 1        
end

Fiz isso não deu certo .. acho que tem alguma a coisa haver cm os 2 'ifs'

 

O seu script não tem falhas! O problema é que só serve se for pegar items com a mesma quantidade.. exemplo 5 wand of inferno, 5 wands of decay ..

Se fosse pra pegar 4 wands of inferno e 5 wands of decay, ele não encaixaria mais,, entende ?

Editado por Xiolones (veja o histórico de edições)

Postado

voce fez quase certo 

testa esse

function onUse(cid, item, frompos, item2, topos)
local dinheiro = {2160}
local grana = {2189, 2191, 2187, 2190, 2181, 2188, 8921}


if item.uid == 4112 then
  if getPlayerItemCount(cid, grana) = 25 then
      doPlayerRemoveItem(cid, grana, 25)
end     
if getPlayerItemCount(cid, itens) = 1 then
      doPlayerRemoveItem(cid, itens, 1)
        queststatus = getPlayerStorageValue(cid,100003)
        if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"You won a full mage addon!")
                doSendAnimatedText(getPlayerPosition(cid), "", TEXTCOLOR_ORANGE)
                doPlayerAddOutfit(cid,138,3)
                doPlayerAddOutfit(cid,120,3)
        setPlayerStorageValue(cid,100003,1)
        else
        doPlayerSendTextMessage(cid,22,"You own this addon!")
        end
        else
        doPlayerSendTextMessage(cid,22,"I need 1 wand of cosmic energy, 1 wand of draconia, 1 wand of dragonbreath, 1 wanf of inferno, 1 wand of vortex, 1 terra rod, 1 common akilles wand and more 250.000 cash for this addon!")
        end
        else
        return 0
        end


        return 1        
end
Postado

EU ja sei oque foi pera to vendo uma coisa nessa script jaja te mando


acho que agora vai e.e

 

function onUse(cid, item, frompos, item2, topos)
local dinheiro = {2160}
local grana = {2189, 2191, 2187, 2190, 2181, 2188, 8921}


if item.uid == 4112 then
  if getPlayerItemCount(cid, grana) == 25 then
      doPlayerRemoveItem(cid, grana, 25)
end     
if getPlayerItemCount(cid, itens) = 1 then
      doPlayerRemoveItem(cid, itens, 1)
        queststatus = getPlayerStorageValue(cid,100003)
        if queststatus == -1 then
        doPlayerSendTextMessage(cid,22,"You won a full mage addon!")
                doSendAnimatedText(getPlayerPosition(cid), "", TEXTCOLOR_ORANGE)
                doPlayerAddOutfit(cid,138,3)
                doPlayerAddOutfit(cid,120,3)
        setPlayerStorageValue(cid,100003,1)
        else
        doPlayerSendTextMessage(cid,22,"You own this addon!")
        end
        else
        doPlayerSendTextMessage(cid,22,"I need 1 wand of cosmic energy, 1 wand of draconia, 1 wand of dragonbreath, 1 wanf of inferno, 1 wand of vortex, 1 terra rod, 1 common akilles wand and more 250.000 cash for this addon!")
        end
        else
        return 0
        end


        return 1        
end

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo