• 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 1.2] Go through players on specific tile

Lopaskurwa

Active Member
Joined
Oct 6, 2017
Messages
870
Solutions
2
Reaction score
49
Hi
i think its source related so how to make if player is on tile (11111) can go trough all players. Cant find any related shit with this type of stuff.
 
Last edited:
As i understand this script blocks tiles but makes another tiles that are not include go through players. So if i add
C++:
[LIST=1]
[*]bool Player::canWalkthrough(const Creature* creature) const
[*]{
[*]    std::vector<int> blocked_tiles = {10552, 3215, 3217, 447, 425, 417};
[*]    if(creature == this || creature->isWalkable() ||
[*]        (creature->getMaster() && creature->getMaster() != this && canWalkthrough(creature->getMaster())))
[*]        return true;
[*]    const Player* player = creature->getPlayer();
[*]    if(!player)
[*]        return false;
[*]    if(
[*]        (
[*]            (
[*]                (
[*]                    (
[*]                        player->getVocation()->isAttackable() &&
[*]                        player->getLevel() < (uint32_t)g_config.getNumber(ConfigManager::PROTECTION_LEVEL)
[*]                    )
[*]                    || (
[*]                        player->getTile()->hasFlag(TILESTATE_PROTECTIONZONE) &&
[*]                        !player->getTile()->hasFlag(TILESTATE_HOUSE)
[*]                    )
[*]                )
[*]            ) && player->getTile()->ground && std::find(blocked_tiles.begin(), blocked_tiles.end(), player->getTile()->ground->getID()) != blocked_tiles.end()
[*]        ) && (
[*]            !player->hasCustomFlag(PlayerCustomFlag_GamemasterPrivileges)
[*]            || player->getAccess() <= getAccess()
[*]        )
[*]    ) return true;
[*]    return (player->isGhost() && getGhostAccess() < player->getGhostAccess())
[*]        || (isGhost() && getGhostAccess() > player->getGhostAccess());
[*]}
[/LIST]
If i dont add all my tiles into this script that i dont want it to be walkable they will be able to walk trough so if i use like 100+ tiles in my server it will be a lot of work to add them all to prevent from walk through.
 
Back
Top