It's a / command made a couple months ago, but here's a better version - just do /removeBrickColor <COLORID> where COLORID is the number of your current color. To get that, just say /coloridPls. Also, it's Super Admin only, and you can only use it every 5 seconds.
//No, this is NOT tested. Please correct me if I am incorrect. Deletes a brick of the color you specify every 50 milliseconds to prevent lag.
$Pref::Server::RemoveBrickColors::Timeout = 5000;
function serverCmdRemoveBrickColor(%client, %colorid)
{
if(%client.isSuperAdmin)
{
if(!%colorid == "" || !%colorid == " ")
{
if(!getSimTime() - %client.removeColorTimeout < $Pref::Server::RemoveBrickColors::Timeout)
{
%removeCount = 0;
%sched = 0;
for(%i = mainBrickGroup.getCount(); %i > 0; %i--)
{
for(%j = mainBrickGroup.getObject(%i); %j > 0; %j--)
{
if(isObject(%brick = mainBrickGroup.getObject(%i).getObject(%j)));
{
if(%brick.getColorID() == %colorid)
{
%brick.schedule(%sched += 50, delete);
%removeCount++;
}
}
}
}
if(%removeCount == 0)
return messageClient(%client, '', "\c6No \c3" @ %colorid SPC "\c6bricks were found.");
else
messageAll('MsgClearBricks', "\c4" @ %client.getPlayerName() SPC "\c6removed all \c0" @ %colorid SPC "\c6colored bricks!");
}
else
{
%time = $Pref::Server::RemoveBrickColors::Timeout - (getSimTime() - %client.removeColorTimeout);
%time = %time SPC %time > 1 ? "seconds" : "second";
return messageClient(%client, '', "\c6You must wait another \c3" SPC %time SPC "to use the command again.");
}
else
return messageClient(%client, '', "\c6Please enter a colorid to remove.");
}
}
else
return messageClient(%client, '', "\c6You must be \c2Super Admin \c6to use this command.");
}
function serverCmdColorIDPls(%c)
{
messageClient(%c, '', "\c6Please move your paint can around and then back to the color you want.");
schedule(2000, 0, messageClient, %c, '', "\c6Your paint color is \c3" @ %c.currentColor);
}
Also, side note to coders - I can put an object calling a method in a schedule, correct? (eg %this.delete?)