Ir para conteúdo

Featured Replies

  • Respostas 13
  • Visualizações 725
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • local amuletos = {        [1] = 2130,        [2] = 2131,        [3] = 2132,        [4] = 2133,        [5] = 2135,        [6] = 2136,     }       function onLogin(cid)        if getPlayerLastLoginSaved

Postado
  • Autor

essa é a última atualização certo?

	

    local amuletos = {
       [8] = 2170,
       [9] = 2171,
       [10] = 2172,
       [11] = 2173,
       [12] = 2174,
       [13] = 2175,
    }
     
    function onLogin(cid)
       if getPlayerLastLoginSaved(cid) < 1 then
          doPlayerAddItem(cid, amuletos[getPlayerLevel(cid)])
       end
     
       local amuleto = amuletos[getPlayerLevel(cid)]
       if amuleto and getPlayerItemCount(cid, amuleto) > 0 then
          registerCreatureEvent(cid, "AmuletoChange")
       end
     
       return true
    end
     
    function onAdvance(cid, skill, oldlevel, newlevel)
       if skill == 8 then
          local amuleto = amuletos[oldlevel]
          if getPlayerItemCount(cid, amuleto) > 0 and amuletos[newlevel] then
             doPlayerRemoveItem(cid, amuleto)
             doPlayerAddItem(cid, amuletos[newlevel], 1, false, CONST_SLOT_NECKLACE)
          end
       end
     
       return true
    end


Ao upar o medalhão não é trocado e aparece o seguinte erro:

 

1dZkG.png

 

O server não fecha, só quando eu dou print screen e eu não sei por que '.'

Postado

local amuletos = {
       [1] = 2130,
       [2] = 2131,
       [3] = 2132,
       [4] = 2133,
       [5] = 2135,
       [6] = 2136,
    }
 
    function onLogin(cid)
       if getPlayerLastLoginSaved(cid) < 1 then
          doPlayerAddItem(cid, amuletos[getPlayerLevel(cid)])
       end
 
       local amuleto = amuletos[getPlayerLevel(cid)]
       if amuleto and getPlayerItemCount(cid, amuleto) > 0 then
          registerCreatureEvent(cid, "AmuletoChange")
       end
 
       return true
    end
 
    function onAdvance(cid, skill, oldlevel, newlevel)
       if skill == 8 then
         local amuleto = amuletos[oldlevel]
          if getPlayerItemCount(cid, amuleto) > 0 and amuletos[newlevel] then
             doPlayerRemoveItem(cid, amuleto, 1)
             doPlayerAddItem(cid, amuletos[newlevel], 1, false, CONST_SLOT_NECKLACE)
          end
       end
 
       return true
    end
 

 

Agora sim está certo.

-"Supra Omnes Lux Lucis"

- Acima de todos brilha a Luz -

5VGnDyBz.png

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.7k

Informação Importante

Confirmação de Termo