KL
pesca

Pescando em montanhas (andares superiores)

Por klbkevinklb, 10 de jul. de 2020 em Actions e Talkactions

fishing
iscas
action
ac
4
3.4k
klbkevinklbK
10 de julho de 2020 às 19:29

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.

LeoTKL
10 de julho de 2020 às 19:32
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?

klbkevinklbK
10 de julho de 2020 às 19:51
17 minutos atrás, LeoTK disse:

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

image.thumb.png.3feddfa9e8542793e14a211d84b4bfe0.png

 

Segue imagem acima.

1 ano depois...
DilooowD
11 de novembro de 2021 às 16:17
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?