function cC(%x) //finding close paint colors
{
for(%a=0; %a<64; %a++)
{
%match = mabs(getword(getcoloridtable(%a),0) - getword(%x,0)) + mabs(getword(getcoloridtable(%a),1) - getword(%x,1)) + mabs(getword(getcoloridtable(%a),2) - getword(%x,2)) + mabs(getword(getcoloridtable(%a),3) - getword(%x,3))*4;
if(%match < %bestmatch || %bestmatch $= "")
{
%bestmatch = %match;
%bestid = %a;
}
}
commandtoserver('useSprayCan',%bestid);
}
function cS(%x,%y,%z) //shift brick shortened
{
commandtoserver('shiftBrick',%x,%y,%z);
}
function cP()
{
commandtoserver('plantbrick'); //plant brick shortened
}
function cD(%s) //instant use brick shortened
{
commandtoserver('instantUseBrick',$uinametable[%s]);
}
function buildCake()
{
%n=16; //Planting timeout
%m=-1;
%s[%m++]="cD(\"2x2f round\");";
%s[%m++]="cC(\"9 0.6 0.4 1\");";
%s[%m++]="cP();";
%s[%m++]="cS(0,0,1);";
%s[%m++]="cC(\"1 0.9 0.8 1\");";
%s[%m++]="cP();";
%s[%m++]="cS(0,0,1);";
%s[%m++]="cC(\"9 0.6 0.4 1\");";
%s[%m++]="cP();";
%s[%m++]="cS(0,0,1);";
%s[%m++]="cD(\"1x1f round\");";
%s[%m++]="cC(\"0.7 0.2 0.5 1\");";
%s[%m++]="cP();";
%s[%m++]="cS(0,-1,0);";
%s[%m++]="cP();";
%s[%m++]="cS(-1,0,0);";
%s[%m++]="cP();";
%s[%m++]="cS(0,1,0);";
%s[%m++]="cP();";
%s[%m++]="cS(1,0,-3);";
%s[%m++]="cD(\"2x2f round\");";
for(%i=0;%s[%i]!$="";%i++)
schedule(%i*%n,0,eval,%s[%i]@"echo(\"Step - "@%i@"\");");
}
build yourself a cake