A larger list of building functions, just in case:
In all cases, decimals where they shouldn't be are floored.
commandToServer('shiftBrick', %x, %y, %z); (serverCmdShiftBrick)
Moves the ghost brick. %x, %y - movement in bricks, in the direction the client is facing. +Y is left, +X is forwards, -Y is right, -X is backwards. %z - vertical movement, in plates. +Z is up, -Z is down.
Example: commandToServer('shiftBrick', 4, 2, 3); will shift the ghost brick the length, height, and width of a 2x4 brick - forwards, to the left, and up.
commandToServer('rotateBrick', %r); (serverCmdRotateBrick)
Rotates the ghost brick. %r - rotation multiplied by 90 degrees.
Example: commandToServer('rotateBrick', 2); will rotate the brick 180 degrees.
commandToServer('plantBrick'); (serverCmdPlantBrick)
Plants a brick at the ghost brick. No arguments.
Example: commandToServer('plantBrick'); will plant the ghost brick. What else?
commandToServer('instantUseBrick', %dat); (serverCmdInstantUseBrick)
Changes the brick datablock. The brick does not have to be in the client's inventory. %dat - the datablock to change to.
Example: commandToServer('instantUseBrick', "brick2x4Data"); will switch to the 2x4 brick datablock.
Note that the brick position system is still the same - the new ghost brick will be at the center of the old one.
commandToServer('useSprayCan', %c); (serverCmdUseSprayCan)
Changes the current color. %c - the colorID. ColorIDs count from 0 on the colorlist, down columns and then rows.
Example: In the default colorset, commandToServer('useSprayCan', 12); will send you to the second column 'Bold' - each column is 9 colors tall, so mfloor(12/9) = move over 1 column, then to the fourth color 'Bold - 4' (12 - 9 = move down 3 rows).