ref: ea43be77eba8716962c10894db1230ed06ff7a05
dir: /utils/genspr/
#!/bin/rc -e rfork n bind -a $home/p/pico /bin bind -a $home/p/sce/utils /bin bind -ca /sys/games/lib/sce . fn unit{ n=`{echo '(' $#* - 4 ')' / 2 | pc -n} s1=`{echo 5 + $n - 1 | pc -n} s2=`{echo $s1 + 1 | pc -n} rng=$*(5-$s1) id=$*($s2-) for(i in `{seq 1 $#id}){ for(n in `{awk 'BEGIN{s='^$rng($i)^'*17; for(i=s; i<s+17; i+=32/'^$2^') printf "%03d\n", i;}'}) sceass $1^.grp.^00^$n^.bit $1 $id($i) `{echo $n | awk '{printf "%02d", ($1%17) / (32/'^$2^')}'} $3 $4 for(n in (`{seq 1 8} s)) scerot $1^$n^.^$id($i) $2 } } unit drone 32 -48 -47 (0 1 2 3 4) (00 01 02 03 04) unit scv 32 -26 -14 0 00 # hatchery sceass -s hatchery.grp.00000.bit hatchery 00 00 -32 -30 sceass -s hatchery.grp.00001.bit hatchery 01 00 -32 -30 sceass -s hatchery.grp.00002.bit hatchery 02 00 -32 -30 sceass -s hatchery.grp.00003.bit hatchery 03 00 -32 -30 crop -t -32 -30 zhashad.grp.00000.bit >hatcherys.00.00.bit # command center sceass -s control.grp.00005.bit control 00 00 -2 -32 crop -t -2 -32 tccShad.grp.00000.bit >controls.00.00.bit