You'll need to use some _MyScript magic for this. _MyScript are special variables that, if set to some value other than -9999, may affect how some scripting commands work.
For example, for setting a build marker: _MyScriptX / _MyScriptY values will override the location at which the build marker will be placed. If you, say, set _MyScriptX to 5 and _MyScriptY to 10 and then placed a build marker at some location in the room, it will be placed at (5, 10) instead. _MyScriptW and _MyScriptH affect the width and height of the rectangle that will be covered by build markers. (starting at zero, so _MyScriptW = 0 is width of 1, _MyScriptW = 1 is width of 2, etc.) For example, in addition to the previous settings if you set _MyScriptW/H to 2 and 3 respectively, build marker command will place build markers at (5, 10)-(7, 13) (starting at (5, 10), 3 tiles wide, 4 tiles high).
There are also special variables _X, _Y and _O which can be used to check/change player's position and orientation. So using those in conjunction with _MyScript you should be able to do what you need.
Also, don't forget to reset _MyScript to -9999 after using them, so you don't end up accidentally affecting other commands, such as Wait, which can use _MyScriptX to set the number of turns to wait.
If I can get TSS working on this laptop, I'll write you an example script. Do you want just a 1x1 square to be marked or 3x3, like in TSS?
EDIT: Oops, fixed small mistake in the explanation.
Also, here's a script for 1x1 region to be marked:
Click here to view the secret text
×Label Loop
If ...
Wait for player to input Special Command
Set var ".DeltaX" = _O % 3 - 1
Set var ".DeltaY" = _O / 3 - 1
Set var "_MyScriptX" = _X + .DeltaX
Set var "_MyScriptY" = _Y + .DeltaY
Build marker Dirt floor,0,0,0,0
GoSub SUB ResetMyVars
If End
Wait 0
Go to Loop
Label SUB ResetMyVars
Set var "_MyScriptX" = -9999
Set var "_MyScriptY" = -9999
Set var "_MyScriptW" = -9999
Set var "_MyScriptH" = -9999
Set var "_MyScriptF" = -9999
Return
EDIT2: Script for 3x3 region:
Click here to view the secret text
×Label Loop
If ...
Wait for player to input Special Command
Set var ".DeltaX" = _O % 3 - 1
Set var ".DeltaY" = _O / 3 - 1
Set var ".OffsetX" = (.DeltaX - 1) * 2 + 1
Set var ".OffsetY" = (.DeltaY - 1) * 2 + 1
Set var "_MyScriptX" = _X + .OffsetX
Set var "_MyScriptY" = _Y + .OffsetY
Set var "_MyScriptW" = 2
Set var "_MyScriptH" = 2
Build marker Dirt floor,0,0,0,0
GoSub SUB ResetMyVars
If End
Wait 0
Go to Loop
Label SUB ResetMyVars
Set var "_MyScriptX" = -9999
Set var "_MyScriptY" = -9999
Set var "_MyScriptW" = -9999
Set var "_MyScriptH" = -9999
Set var "_MyScriptF" = -9999
Return
____________________________
Click here to view the secret text
[Last edited by DezzTech at 03-20-2016 06:15 AM]