Author Topic: Need help using a specific brick.  (Read 796 times)

I've found commands that would change your bricks in your brick slot or just instantly, but I cannot get it to work.
I'm not totally sure how to use the command since I just found it.
Code: [Select]
commandtoserver('instantusebrick',???);
commandtoserver('buybrick',Slot,???);
I know where the ???'s are, it's supposed to be a datablock, but I don't know any brick datablocks, and have not really worked with DB's before.
Please help.

No one ever replied. Thats nice...

I'm pretty sure buildbot has code that does this


I'm pretty sure buildbot has code that does this
I looked at the code, thats how I got it. But it doesn't use a specific brick. It uses variables instead. So I don't know how to properly use it.

Tell us what you're trying to do. What are you using this for?

commandtoserver('instantusebrick',$uinametable["2x2f"]);
$uinametable["2x2f"]
$uinametable["2x2 round"]
$uinametable["1x1"]


commandtoserver('instantusebrick',$uinametable["2x2f"]);
$uinametable["2x2f"]
$uinametable["2x2 round"]
$uinametable["1x1"]


THANK  YOU.


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
« Last Edit: July 13, 2013, 10:11:16 AM by MARBLE MAN »