Author Topic: Is there a way to force two people to have trust?  (Read 1042 times)

No, bypassing trust will not work in this situation.
Suppose BL_ID 5 and 10 are on a server and do not have trust, but I have access to console.
Can I force trust between those two people?

Yes.

There are some 'potentialtrust' values stored on the brick groups.

Forgot to state that I wanted to know how.
Could i just do BRICKGROUP_5.dump();?

Pretty sure you could.

Code: [Select]
%id1 = 1000;
%id2 = 1000;

brickgroup_1000.trust[%id2] = 2;
brickgroup_9000.trust[%id1] = 2;

You may need to reference brickgroup_xyz dynamically, so in that case, use %client.brickgroup

Code: [Select]
function everyonetrusteveryone()
{
for(%a=0;%a<clientgroup.getcount();%a++)
{
%clienta = clientgroup.getobject(%a);
%brickgroup = %clienta.brickgroup;
if(isObject(%brickgroup))
{
for(%b=0;%b<clientgroup.getcount();%b++)
{
%brickgroup.trust[clientgroup.getobject(%b).bl_id] = 2;
}
}
}
}

Taken from Gamemode_salvage. Edit as you wish.

That will actually break the level 3 trust with oneself, and set it to level 2. It doesn't matter anyway for savage.

The problem is that I don't want EVERYONE to have bypassed trust.

Code: [Select]
%id1 = 1000;
%id2 = 1000;

brickgroup_1000.trust[%id2] = 2;
brickgroup_9000.trust[%id1] = 2;

You may need to reference brickgroup_xyz dynamically, so in that case, use %client.brickgroup
Just one thing, %id2 should be 9000

Forcing between 2 IDs:

Code: [Select]
function ForceTrustLevel(%id1,%id2,%level)
{
%bg1 = "brickGroup_" @ %id1;
%bg2 = "brickGroup_" @ %id2;
%bg1.trust[%id2] = %level;
%bg2.trust[%id1] = %level;
}

Doesn't check for any possible errors.

I love doing this on my servers and messing with people... Nothing too bad though.

Forcing between 2 IDs:

Code: [Select]
function ForceTrustLevel(%id1,%id2,%level)
{
%bg1 = "brickGroup_" @ %id1;
%bg2 = "brickGroup_" @ %id2;
%bg1.trust[%id2] = %level;
%bg2.trust[%id1] = %level;
}

Doesn't check for any possible errors.
Dynamic and works. Thanks.

setMutualBrickGroupTrust(id1,id2,trust level);

setMutualBrickGroupTrust(id1,id2,trust level);

Woah, useful!

setMutualBrickGroupTrust(id1,id2,trust level);
All of a sudden I'm seeing the importance of not locking Coding Help topics.