Author Topic: ranks based on amount of bricks placed  (Read 554 times)

just a simple addon that checks every minute or so for how many bricks each person has placed and then gives them a rank to the left of their name based on the amount
just put in 2 or 3 placeholder ranks and then ill replace them with what i want

this should get you started
it just replaces the clan prefix tag with the brick rank (or brickcount if you want)
you can use the color tag (<color:######>) and color codes (\c#) in the tags
if you want to put it before the message instead of in the clan prefix tag, then you'd need to package the message sending stuff similar to the admin shields addon (pretty sure it does that)
if you want to preserve the clan tag you need to either make it do ^ or monkey with saving the tag and replacing bits and it's a bit of a mess

Code: [Select]
function brickRanksLoop()
{
cancel($brickRankLoop);

for(%i = 0; %i < ClientGroup.getCount(); %i++)
{
%client = ClientGroup.getObject(%i);

//can set the rank to just be the brick count if you want
//%client.clanPrefix = %client.brickGroup.getCount();

//or set the rank based on divisions
%brickCount = %client.brickGroup.getCount();
%tag = "lots"; //the top rank

if(%brickCount < 1000)
%tag = "few";
else
if(%brickCount < 5000)
%tag = "some";
else
if(%brickCount < 25000)
%tag = "many";

%client.clanPrefix = %tag;
}

$brickRankLoop = schedule(60000, 0, brickRanksLoop);
}

$brickRankLoop = schedule(60000, 0, brickRanksLoop);

honestly I'd rather it just remove clan tags completely
also how would I make that into an add-on, exactly? do I just make it into a server.cs, throw in a namecheck.txt and description.txt, then zip it up?
that actually worked... neat
« Last Edit: July 31, 2017, 11:59:41 PM by TableSalt »