One recurring complaint is that nobody talks about code on /prog/. So everyone write go and write some code, any code, that does something, anything, and post it. A small explanation wouldn't go amiss either.
Name:
Anonymous2011-04-10 4:22
color c00
set "DARK" to random 1 to 8
set "LIGHT" to "(&DARK&<<4o&DARK&o128)"
inc "DL" by 1
set "commands" to 30000
wait for 1
put player at 0 0
loop start
put "DARK" CustomBlock pb2 at "('loopcount'%'board_w')" "('loopcount'/'board_w'+1)"
loop for "('board_w'*('board_h'-2)-1)"
set "rcount" to 4
set "rooms" to 0
: "rd"
change from cff CustomFloor pff to "DARK" CustomBlock pb2
* "(30/'rcount')"
set "local" to random 7 to 12
set "local2" to random 6 to 10
set "local3" to random 1 to "('board_w'-1-'local')"
set "local4" to random 2 to "('board_h'-3-'local2')"
loop start
if c?? CustomFloor p20 at "('loopcount'%'local'+'local3')" "('loopcount'/'local'+'local4')" then "rd"
if "LIGHT" CustomBlock pb2 at "('loopcount'%'local'+'local3')" "('loopcount'/'local'+'local4')" then "rd"
put cff CustomFloor pff at "('loopcount'%'local'+'local3')" "('loopcount'/'local'+'local4')"
loop for "('local'*'local2'-1)"
change from cff CustomFloor pff to c08 CustomFloor p20
loop start
put "LIGHT" CustomBlock pb2 at "('local3'+'loopcount')" "local4"
put "LIGHT" CustomBlock pb2 at "('local3'+'loopcount')" "('local4'+'local2'-1)"
loop for "('local'-2)"
loop start
put "LIGHT" CustomBlock pb2 at "local3" "('local4'+'loopcount')"
put "LIGHT" CustomBlock pb2 at "('local3'+'local'-1)" "('local4'+'loopcount')"
loop for "('local2'-1)"
set "room&rooms&x" to "('local1'/2+'local3')"
set "room&rooms&y" to "('local2'/2+'local4')"
inc "rooms" by 1
if "rooms" < "rcount" then "rd"
set "rooms" to 0
: "join"
goto "#joinr"
inc "rooms" by 1
if "rooms" < "rcount" then "join"
loop start
set "local" to "('loopcount'%'board_w')"
set "local2" to "('loopcount'/'board_w')"
if "DARK" CustomBlock pb2 at "local" "local2" then "#noise"
loop for "('board_w'*'board_h'-1)"
put player at "room0x" "room0y"
copy at 2 0 to "room1x" "room1y"
set "commands" to 30
send "ALL" to "go"
* "Dungeon Level &DL&"
end
: "#noise"
set "local3" to random -30 to 30
set "local4" to "('local'+'local2'+'local3'/45+176)"
put "DARK" CustomBlock "local4" at "local" "local2"
goto "#return"
: "#joinr"
set "local" to "room&rooms&x"
set "local2" to "room&rooms&y"
set "local3" to "room('rooms'+1%'rcount')x"
set "local4" to "room('rooms'+1%'rcount')y"
set "local5" to random 0 to 1
goto "#c('local5')"
goto "#c(1-'local5')"
goto "#return"
: "#c0"
: "jrla"
goto "#pc"
inc "local" by "(('local'<'local3')-('local'>'local3'))"
if "local" != "local3" then "jrla"
goto "#pc"
goto "#return"
: "#c1"
: "jrlb"
goto "#pc"
inc "local2" by "(('local2'<'local4')-('local2'>'local4'))"
if "local2" != "local4" then "jrlb"
goto "#pc"
goto "#return"
: "#pc"
if c?? CustomFloor p20 at "local" "local2" then "#return"
put c08 CustomFloor p20 at "local" "local2"
loop start
goto "#tw"
loop for 8
goto "#return"
: "#tw"
if c?? CustomFloor p20 at "('loopcount'%3-1+'local')" "('loopcount'/3-1+'local2')" then "#return"
if "LIGHT" CustomBlock pb2 at "('loopcount'%3-1+'local')" "('loopcount'/3-1+'local2')" then "#return"
put "DARK" CustomBlock pdb at "('loopcount'%3-1+'local')" "('loopcount'/3-1+'local2')"
goto "#return"