• 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.3.6 (otswe's compiled version): Can't damage players with same feet

freaked1

Active Member
Joined
Jan 30, 2008
Messages
486
Solutions
5
Reaction score
30
Location
Sweden
Hey I use TFS 0.3.6 Crying damson (otswe's compiled version). I will jump straight to the problem, people can't attack eachother if they have the same feet color. Here is the config code.
Code:
noDamageToSameLookfeet = false
I can't figure out what the problem is some help please? Thanks in advance!
 
Last edited:
Only thing I can think of is that this compiled version may not utilize config callbacks to check for this parameter so therefore it won't matter if you change it. (ie. someone hardcoded people with the same feet don't damage eachother).

So try getting a different compiled version.

Unless of course you have a script somewhere in your events that prevents this.
 
Only thing I can think of is that this compiled version may not utilize config callbacks to check for this parameter so therefore it won't matter if you change it. (ie. someone hardcoded people with the same feet don't damage eachother).

So try getting a different compiled version.

Unless of course you have a script somewhere in your events that prevents this.
Can I somehow check it since I have the source files? configmanager.cpp? But what should I search for?
 
Thats messy, take a look in sources, post the function that has the "noDamageToSameLookfeet" variable.
 
Thats messy, take a look in sources, post the function that has the "noDamageToSameLookfeet" variable.

Here you go
In configmanager.cpp I have this.
Code:
m_confBool[CANNOT_ATTACK_SAME_LOOKFEET] = getGlobalBool("noDamageToSameLookfeet", false);
 
Then look up CANNOT_ATTACK_SAME_LOOKFEET

The script we are looking for is bigger than 1 line :p
 
Okey I'm sorry :P Where should I look for it? I found it in combat.cpp(Which I think is kinda obvious) too, but I can't really see which parts are together so I post some extra lines :p.
LUA:
		const Player* attackerPlayer = NULL;
		if((attackerPlayer = attacker->getPlayer()) || (attackerPlayer = attacker->getPlayerMaster()))
		{
			checkZones = true;
			if((g_game.getWorldType() == WORLDTYPE_OPTIONAL && !Combat::isInPvpZone(attacker, target)
				&& !attackerPlayer->isEnemy(targetPlayer, true)
				) || isProtected(const_cast<Player*>(attackerPlayer), const_cast<Player*>(targetPlayer))
				|| (g_config.getBool(ConfigManager::CANNOT_ATTACK_SAME_LOOKFEET)
				&& attackerPlayer->getDefaultOutfit().lookFeet == targetPlayer->getDefaultOutfit().lookFeet)
				|| !attackerPlayer->canSeeCreature(targetPlayer))
				return RET_YOUMAYNOTATTACKTHISPLAYER;
		}
	}
	else if(target->getMonster())
	{
		if(!target->isAttackable())
			return RET_YOUMAYNOTATTACKTHISCREATURE;

		const Player* attackerPlayer = NULL;
		if((attackerPlayer = attacker->getPlayer()) || (attackerPlayer = attacker->getPlayerMaster()))
		{
			if(attackerPlayer->hasFlag(PlayerFlag_CannotAttackMonster))
				return RET_YOUMAYNOTATTACKTHISCREATURE;
 
Back
Top