• 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!

Walk through player

semary

[BB] OTland
Joined
May 3, 2009
Messages
813
Reaction score
18
Location
E G Y P T
Hello otland

I request a script walking through player

Example

until level 50 the can walk through them

i try to edit through in non-pvp player but i couldn't
 
Alternatively you can edit this in player.cpp:
Code:
bool Player::canWalkthrough(const Creature* creature) const
{
	if(!creature)
		return true;

	if(creature == this)
		return false;

	const Player* player = creature->getPlayer();
	if(!player)
		return false;

	if(g_game.getWorldType() == WORLD_TYPE_NO_PVP && player->getTile()->ground
		&& player->getTile()->ground->getID() != ITEM_GLOWING_SWITCH)
		return true;

	return player->isGhost() && getGhostAccess() < player->getGhostAccess();
}
 
Something like this I guess
Code:
bool Player::canWalkthrough(const Creature* creature) const
{
	if(!creature)
		return true;

	if(creature == this)
		return false;

	const Player* player = creature->getPlayer();
	if(!player)
		return false;
		
	if(g_game.getWorldType() == WORLD_TYPE_NO_PVP && player->getTile()->ground
		&& player->getTile()->ground->getID() != ITEM_GLOWING_SWITCH)
		return true;
		
	uint32_t protectionLevel = g_config.getNumber(ConfigManager::PROTECTION_LEVEL);
    if(player->getLevel() < protectionLevel && player->getTile()->ground
		&& player->getTile()->ground->getID() != ITEM_GLOWING_SWITCH)
		return true;

	return player->isGhost() && getGhostAccess() < player->getGhostAccess();
}
 
Back
Top