Ir para conteúdo
Banner com Efeitos

Featured Replies

Postado

Alguém poderia ajudar?

 

140521110401506463.png

 

Portrait.lua

function onEquip (cid, item, slot)

    if not cid then return true end
    if item.uid <= 0 then return true end

    if not getItemAttribute(item.uid, "poke") then
    return true
    end
    
    for i, x in pairs(fotos) do
        if string.lower(getItemAttribute(item.uid, "poke")) == string.lower(i) then
            doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[i])
        return true
        end
    end
end

function onDeEquip(cid, item, slot)

    if not cid then return true end
    if item.uid <= 0 then return true end

    if not getItemAttribute(item.uid, "poke") then
    return true
    end

    doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEGS).uid, 2395)
end

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

  • Respostas 5
  • Visualizações 270
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Está dizendo q deu erro com o item 2395.
Vc tem um item com esse id em seu ot??

 

Caso tenha, tenta esse script:

function onEquip (cid, item, slot)

    if not cid then return true end
    if item.uid <= 0 then return true end

    if not getItemAttribute(item.uid, "poke") then
    return true
    end
    
    for i, x in pairs(fotos) do
        if string.lower(getItemAttribute(item.uid, "poke")) == string.lower(i) then
            doTransformItem(getPlayerSlotItem(cid, 7).uid, fotos[i])
        return true
        end
    end
end

function onDeEquip(cid, item, slot)

    if not cid then return true end
    if item.uid <= 0 then return true end

    if not getItemAttribute(item.uid, "poke") then
    return true
    end

    doTransformItem(getPlayerSlotItem(cid, CONST_SLOT_LEGS).uid, getPlayerSlotItem(cid, CONST_SLOT_LEGS).item_id, 2395)
end

^^ Abraços

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

Te ajudei?? REP + e ficamos quites... <ahttp://www.tibiaking.com/forum/uploads/emoticons/default_happyy.png' alt=';D'>

Atenciosamente,

Daniel.

Abraços!

Postado
  • Autor

Tenho olha ai::

 

<item id="2395" article="a" name="portrait">

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

Postado
  • Autor

alguem?

                                                            vps-plano-01.png

 

                                                                                                                    http://www.weblara.com.br/

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