Ir para conteúdo

Posts Recomendados

Fala gente, tudo bem...bom eu to sumido aqui do portal, porém hoje estou de volta com uma coisa para disponibilizar. Muitos ja devem saber, alguns não...a pxg tem um sistema que voce pode pescar de andares mais altos, eu procurei muito pra descobrir e bom encontrei e hjee vou ensinar a voces:

 

abra o arquivo: actions.cpp/ procure por isso:

 

  ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight) 

 

Ela vai estar assim:

 

ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight)
{
    if(toPos.x == 0xFFFF)
        return RET_NOERROR;

    const Position& creaturePos = creature->getPosition();
    if(creaturePos.z > toPos.z)
        return RET_FIRSTGOUPSTAIRS;

    if(creaturePos.z < toPos.z)
        return RET_FIRSTGODOWNSTAIRS;

    if(!Position::areInRange<7,5,0>(toPos, creaturePos))
        return RET_TOOFARAWAY;

    if(checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos))
        return RET_CANNOTTHROW;

    return RET_NOERROR;

}

 

Troque por essa abaixo:

 

Apague a função toda e coloque isso:

 

ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight)
{
    if(toPos.x == 0xFFFF)
        return RET_NOERROR;

    const Position& creaturePos = creature->getPosition();
    if(creaturePos.z > toPos.z)
        return RET_FIRSTGOUPSTAIRS;

//    if(creaturePos.z < toPos.z)
//        return RET_FIRSTGODOWNSTAIRS;

    if(!Position::areInRange<7,5,3>(toPos, creaturePos))
        return RET_TOOFARAWAY;

//    if(checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos))
//        return RET_CANNOTTHROW;

    return RET_NOERROR;
}

 

 

Feito tudo certo, voce conseguira pescar de cima de montanhas. Obrigado e boa noite a todos.

Link para o comentário
https://xtibia.com/forum/topic/252020-pescando-em-montanhas-andares-superiores/
Compartilhar em outros sites

  Em 10/07/2020 em 22:29, klbkevinklb disse:

Fala gente, tudo bem...bom eu to sumido aqui do portal, porém hoje estou de volta com uma coisa para disponibilizar. Muitos ja devem saber, alguns não...a pxg tem um sistema que voce pode pescar de andares mais altos, eu procurei muito pra descobrir e bom encontrei e hjee vou ensinar a voces:

 

abra o arquivo: actions.cpp/ procure por isso:

 

 

  ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight) 

 

 

Ela vai estar assim:

 

 

ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight)
{
    if(toPos.x == 0xFFFF)
        return RET_NOERROR;

    const Position& creaturePos = creature->getPosition();
    if(creaturePos.z > toPos.z)
        return RET_FIRSTGOUPSTAIRS;

    if(creaturePos.z < toPos.z)
        return RET_FIRSTGODOWNSTAIRS;

    if(!Position::areInRange<7,5,0>(toPos, creaturePos))
        return RET_TOOFARAWAY;

    if(checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos))
        return RET_CANNOTTHROW;

    return RET_NOERROR;

}

 

 

Troque por essa abaixo:

 

Apague a função toda e coloque isso:

 

 

ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight)
{
    if(toPos.x == 0xFFFF)
        return RET_NOERROR;

    const Position& creaturePos = creature->getPosition();
    if(creaturePos.z > toPos.z)
        return RET_FIRSTGOUPSTAIRS;

//    if(creaturePos.z < toPos.z)
//        return RET_FIRSTGODOWNSTAIRS;

    if(!Position::areInRange<7,5,3>(toPos, creaturePos))
        return RET_TOOFARAWAY;

//    if(checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos))
//        return RET_CANNOTTHROW;

    return RET_NOERROR;
}

 

 

 

Feito tudo certo, voce conseguira pescar de cima de montanhas. Obrigado e boa noite a todos.

Expand  

poderia postar um vídeo ou prints mostrando a funcionalidade dentro do game?

Link para o comentário
https://xtibia.com/forum/topic/252020-pescando-em-montanhas-andares-superiores/#findComment-1760864
Compartilhar em outros sites

  Em 10/07/2020 em 22:32, LeoTK disse:

poderia postar um vídeo ou prints mostrando a funcionalidade dentro do game?

Expand  

image.thumb.png.3feddfa9e8542793e14a211d84b4bfe0.png

 

Segue imagem acima.

Link para o comentário
https://xtibia.com/forum/topic/252020-pescando-em-montanhas-andares-superiores/#findComment-1760865
Compartilhar em outros sites

  • 1 year later...
  Em 10/07/2020 em 22:29, klbkevinklb disse:

Fala gente, tudo bem...bom eu to sumido aqui do portal, porém hoje estou de volta com uma coisa para disponibilizar. Muitos ja devem saber, alguns não...a pxg tem um sistema que voce pode pescar de andares mais altos, eu procurei muito pra descobrir e bom encontrei e hjee vou ensinar a voces:

 

abra o arquivo: actions.cpp/ procure por isso:

 

 

  ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight) 

 

 

Ela vai estar assim:

 

 

ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight)
{
    if(toPos.x == 0xFFFF)
        return RET_NOERROR;

    const Position& creaturePos = creature->getPosition();
    if(creaturePos.z > toPos.z)
        return RET_FIRSTGOUPSTAIRS;

    if(creaturePos.z < toPos.z)
        return RET_FIRSTGODOWNSTAIRS;

    if(!Position::areInRange<7,5,0>(toPos, creaturePos))
        return RET_TOOFARAWAY;

    if(checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos))
        return RET_CANNOTTHROW;

    return RET_NOERROR;

}

 

 

Troque por essa abaixo:

 

Apague a função toda e coloque isso:

 

 

ReturnValue Actions::canUseFar(const Creature* creature, const Position& toPos, bool checkLineOfSight)
{
    if(toPos.x == 0xFFFF)
        return RET_NOERROR;

    const Position& creaturePos = creature->getPosition();
    if(creaturePos.z > toPos.z)
        return RET_FIRSTGOUPSTAIRS;

//    if(creaturePos.z < toPos.z)
//        return RET_FIRSTGODOWNSTAIRS;

    if(!Position::areInRange<7,5,3>(toPos, creaturePos))
        return RET_TOOFARAWAY;

//    if(checkLineOfSight && !g_game.canThrowObjectTo(creaturePos, toPos))
//        return RET_CANNOTTHROW;

    return RET_NOERROR;
}

 

 

 

Feito tudo certo, voce conseguira pescar de cima de montanhas. Obrigado e boa noite a todos.

Expand  

Tfs 1.2  não funciona tem como  adaptar?

Link para o comentário
https://xtibia.com/forum/topic/252020-pescando-em-montanhas-andares-superiores/#findComment-1766279
Compartilhar em outros sites

×
×
  • Criar Novo...