• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X Change push priority to break anti push and push max bots

willdu

Active Member
Joined
Mar 11, 2017
Messages
91
Reaction score
25
How to change the push priority?

I mean...
If player push another player and there is some gold or something under target, the pusher first push the under item until there is no more items so he can push the other player
I would like to know if is it possible to change this order? I mean, if player try to push a player the server dont care if there is a item under the other player

Don't get me wrong if u like bots, but anti push and push max just destroy the hands pvp

It could be done on lua with this function?
lua_register(m_luaState, "doRelocate", LuaInterface::luaDoRelocate);
lua_register(m_luaState, "doMoveCreature", LuaInterface::luaDoMoveCreature);

Or do need sources edits?
 
Solution
use
Code:
case STACKPOS_MOVE:
{
    thing = tile->getTopVisibleCreature(player);
    if (thing) {
        const Creature* target = thing->getCreature();
        if (target->getID() == player->getID() || target->getMonster()) {
            Item* item = tile->getTopDownItem();
            if(item && item->isMoveable())
                thing = item;
        }
    } else {
        Item* item = tile->getTopDownItem();
        if(item && item->isMoveable())
            thing = item;
    }
    break;
}
@Infernum it is correct?
You know that people also trash their sqm by hand when not using bots, right? I'd be pissed if I trashed my sqm manually and got pushed by a botter xD

Yes i did think about it too
But by changing the push priority it would disable only one mode to anti push
Yes, block push by trash your foot woudn't work anymore, and that is the point
Disable anti push in your SQM pos


But there are few other ways to block push...
And that ways u can do without bots and play fair against a bot
The way are in anti push next SQM u gonna go if u be pushed

Like:
  • block items (parcel, honeyflower)
  • fire bomb
  • fire field
  • mw
 
Anti push is one thing, blocking the sqms you can pushed to is another. They are very different.

You can look from two different points of view the changes you are suggesting:

1 - Making it possible to push characters with trash on their sqm.
2 - Making it impossible to move any item that's under any character.

I know you might hate my by now because I'm questioning your idea, but is the second point worth just because of the first one?
Just think about all the "moving an(y) item under a character" versus "not being able to push a character on a PVP situation".

I'm sure there are better options to deal with antipush than that.
 
Anti push is one thing, blocking the sqms you can pushed to is another. They are very different.

You can look from two different points of view the changes you are suggesting:

1 - Making it possible to push characters with trash on their sqm.
2 - Making it impossible to move any item that's under any character.

I know you might hate my by now because I'm questioning your idea, but is the second point worth just because of the first one?
Just think about all the "moving an(y) item under a character" versus "not being able to push a character on a PVP situation".

I'm sure there are better options to deal with antipush than that.

Your 1 isn't exactly what he asked for?


Btw i love the idea 100% uses if anyone make possible :)
 
Tyyyy to your prettier help <3
Its simple as edit this lines: https://github.com/Fir3element/3777/blob/master/src/game.cpp#L569-L578 ?
Idk how to, but only change this would make it work?
I'm not sure if it works well or if it breaks the gameplay, but if you reverse the search like this:
Code:
case STACKPOS_MOVE:
            {
                thing = tile->getTopVisibleCreature(player);
                if (!thing) {
                    Item* item = tile->getTopDownItem();
                    if(item && item->isMoveable())
                        thing = item;
                }

                break;
            }
it would work just the way you want.
 
I'm not sure if it works well or if it breaks the gameplay, but if you reverse the search like this:
Code:
case STACKPOS_MOVE:
            {
                thing = tile->getTopVisibleCreature(player);
                if (!thing) {
                    Item* item = tile->getTopDownItem();
                    if(item && item->isMoveable())
                        thing = item;
                }

                break;
            }
it would work just the way you want.

IT WORKS!!!!!!!!!!!!!!!!!!!
THANK YOUUUUUUUUUUUUUUUUUUUUU

if it is not a lot, could u help me to fix only 2 things to be perfect?
1- if this thing is a monster -> move first item, after the thing (like it was by default)
2- if this thing is yourserlf -> move first item, after the thing (like it was by default)
 
IT WORKS!!!!!!!!!!!!!!!!!!!
THANK YOUUUUUUUUUUUUUUUUUUUUU

if it is not a lot, could u help me to fix only 2 things to be perfect?
1- if this thing is a monster -> move first item, after the thing (like it was by default)
2- if this thing is yourserlf -> move first item, after the thing (like it was by default)
Code:
case STACKPOS_MOVE:
            {
                thing = tile->getTopVisibleCreature(player);
                if (!thing || thing == player || thing->getMonster()) {
                    Item* item = tile->getTopDownItem();
                    if(item && item->isMoveable())
                        thing = item;
                }

                break;
            }
 
Code:
game.cpp: In member function ‘Thing* Game::internalGetThing(Player*, const Position&, int32_t, uint32_t, stackposType_t)’:
game.cpp:573:57: error: ‘class Thing’ has no member named ‘getMonster’; did you mean ‘getItem’?
                 if (!thing || thing == player || thing->getMonster()) {
                                                         ^~~~~~~~~~
Makefile:33: recipe for target 'game.o' failed
make: *** [game.o] Error 1

Looking for getMonster, there are this 2
 
use
Code:
case STACKPOS_MOVE:
{
    thing = tile->getTopVisibleCreature(player);
    if (thing) {
        const Creature* target = thing->getCreature();
        if (target->getID() == player->getID() || target->getMonster()) {
            Item* item = tile->getTopDownItem();
            if(item && item->isMoveable())
                thing = item;
        }
    } else {
        Item* item = tile->getTopDownItem();
        if(item && item->isMoveable())
            thing = item;
    }
    break;
}
@Infernum it is correct?
 
Last edited:
Solution
use
Code:
case STACKPOS_MOVE:
{
    thing = tile->getTopVisibleCreature(player);
    if (thing) {
        const Creature* target = thing->getCreature();
        if (target->getID() == player->getID() || target->getMonster()) {
            Item* item = tile->getTopDownItem();
            if(item && item->isMoveable())
                thing = item;
        }
    } else {
        Item* item = tile->getTopDownItem();
        if(item && item->isMoveable())
            thing = item;
    }
    break;
}
@Infernum it is correct?

ty so much :)
 
Back
Top