This is something that's lying in my pastebin. Important things to note are as follow:
%color is an ID (integer), to get it manually, count on the paint menu starting on the top left, moving down and then going to the right, it would look smth like this:
So color ID for green would be 1.
EDIT: Corrected colorID to start from 0
%client field in that example is going to represent the host, since getNumKeyID() returns the host's BL_ID.
stackBL_ID in that example is %client.bl_id, but in retrospect, you probably want to use whatever you used for findClientByBL_ID. For host, this would then be
stackBL_ID = getNumKeyID();
This is in case the server is dedicated and the host isn't in the server, or the player you want to own the bricks isn't on the server -> the %client wouldn't exist.
position = VectorAdd(%x/2 SPC %y/2 SPC "50", $Temple::Position);
...
$Temple::Map::chunk[%x, %y] = %brick;
These are snippets that are specific to the project I was working on. The position is a string of three numbers (x y z coordinates) separated by spaces (i.e. 12 5 3) and the second part can be deleted alltogether.
BrickGroup_17003.add(%brick);
This is mentioned in the paste as well, but BrickGroup_### is a simset for all of a client's bricks. The ### is the BL_ID of the client.