Jump to content

Pescando em montanhas (andares superiores)


Recommended Posts

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 to comment
Share on other sites

3 minutos atrás, 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.

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

Link to comment
Share on other sites

  • 1 year later...
Em 10/07/2020 em 19: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.

Tfs 1.2  não funciona tem como  adaptar?

Link to comment
Share on other sites

 Share

×
×
  • Create New...