-- Copyright (c) 2004 Jacob Scott -- License: GPL v2.0 or above -- Enigma Level: Listen Carefully levelw=40 levelh=30 create_world( levelw, levelh) enigma.ConserveLevel=FALSE f1=(random(4))-1 f2=(random(4))-1 f3=(random(4))-1 f4=(random(4))-1 f5=(random(4))-1 f6=(random(4))-1 f7=(random(4))-1 f8=(random(4))-1 f9=(random(4))-1 f10=(random(4))-1 f11=(random(4))-1 f12=(random(4))-1 f13=(random(4))-1 f14=(random(4))-1 f15=(random(4))-1 f16=(random(4))-1 f17=(random(4))-1 f18=(random(4))-1 f19=(random(4))-1 f20=(random(4))-1 f21=(random(4))-1 fill_floor("fl-leaves", 0,0,levelw,levelh) function renderLine( line, pattern) for i=1, strlen(pattern) do local c = strsub( pattern, i, i) if c =="#" then set_stone( "st-greenbrown", i-1, line) elseif c =="w" then set_stone( "st-glass",i-1, line) elseif c =="T" then set_stone( "st-thief", i-1, line) set_floor("fl-space",i-1,line) elseif c =="_" then set_stone( "st-thief", i-1, line) elseif c =="<" then draw_stones("st-grate1",{i-1,line}, {1,1}, 1) set_item("it-crack2",i-1,line) elseif c =="V" then abyss(i-1,line) draw_stones("st-grate1",{i-1,line}, {1,1}, 1) elseif c ==":" then set_item("it-crack3",i-1,line) elseif c == "o" then oxyd( i-1, line) elseif c == "*" then set_stone( "st-brownie", i-1, line) elseif c == "!" then abyss(i-1,line) elseif c == "~" then set_floor("fl-water",i-1,line) elseif c=="z" then set_actor("ac-blackball", i-.5,line+.5, {player=0}) elseif c == "g" then draw_stones("st-grate1",{i-1,line}, {1,1}, 1) elseif c == "?" then draw_stones("st-grate1",{i-1,line}, {1,1}, 1) abyss(i-1,line) elseif c=="+" then set_stone( "st-wood", i-1, line) elseif c=="=" then set_floor("fl-space",i-1,line) elseif c=="S" then set_attrib(laser(i-1,line, TRUE, SOUTH), "name", "laser") elseif c=="a" then doorh( i-1,line, {name="door1"}) elseif c=="b" then doorh( i-1,line, {name="door2"}) elseif c=="c" then doorh( i-1,line, {name="door3"}) elseif c=="d" then doorh( i-1,line, {name="door4"}) elseif c=="e" then doorh( i-1,line, {name="door5"}) elseif c=="f" then doorh( i-1,line, {name="door6"}) elseif c=="G" then doorh( i-1,line, {name="door7"}) elseif c=="h" then doorh( i-1,line, {name="door8"}) elseif c=="i" then doorh( i-1,line, {name="door9"}) elseif c=="j" then doorh( i-1,line, {name="door10"}) elseif c=="k" then doorh( i-1,line, {name="door11"}) elseif c=="l" then doorh( i-1,line, {name="door12"}) elseif c=="m" then doorh( i-1,line, {name="door13"}) elseif c=="n" then doorh( i-1,line, {name="door14"}) elseif c=="`" then doorh( i-1,line, {name="door15"}) elseif c=="p" then doorh( i-1,line, {name="door16"}) elseif c=="q" then doorh( i-1,line, {name="door17"}) elseif c=="r" then doorh( i-1,line, {name="door18"}) elseif c=="s" then doorh( i-1,line, {name="door19"}) elseif c=="t" then doorh( i-1,line, {name="door20"}) elseif c=="u" then doorh( i-1,line, {name="door21"}) elseif c=="v" then doorv( i-1,line, {name="door22"}) elseif c=="A" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc1"}) elseif c=="B" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc2"}) elseif c=="C" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc3"}) elseif c=="D" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc4"}) elseif c=="E" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc5"}) elseif c=="F" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc6"}) elseif c=="%" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc7"}) elseif c=="H" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc8"}) elseif c=="I" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc9"}) elseif c=="J" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc10"}) elseif c=="K" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc11"}) elseif c=="L" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc12"}) elseif c=="M" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc13"}) elseif c=="N" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc14"}) elseif c=="$" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc15"}) elseif c=="P" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc16"}) elseif c=="Q" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc17"}) elseif c=="R" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc18"}) elseif c=="^" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc19"}) elseif c=="&" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc20"}) elseif c=="U" then set_stone("st-fourswitch", i-1,line, {action="callback", target="funcc21"}) elseif c==";" then mirrorp(i-1,line,FALSE,FALSE, 2) elseif c=="/" then mirrorp(i-1,line,FALSE,FALSE, 4) elseif c=="X" then set_stone("st-laserswitch",i-1,line,{action="openclose",target="door22"}) elseif c==">" then set_stone("st-oneway", i-1,line, {orientation=enigma.EAST}) end end end renderLine(00,"***************TTTT*###################") renderLine(01,"*o v ===T*gggggggggggggggggg#") renderLine(02,"*o #S#/w;# TT=T*g g#") renderLine(03,"*o #a#n#`# T=T*g g#") renderLine(04,"*o #b#m#p# TT=T*g g#") renderLine(05,"*o #c#l#q# T==T*g g#") renderLine(06,"*o #d#k#r# _z__*g g#") renderLine(07,"*o #e#j#s# ___g*g g#") renderLine(08,"*o #f#i#t# g*?!!!! g#") renderLine(09,"*o #G#h#u# g*g >! g#") renderLine(10,"*o #;w/#w# g* >: g#") renderLine(11,"*ogggggoggggg#ggg g*g >! g#") renderLine(12,"************w*******?!!!! g#") renderLine(13,"#ggggggggggw;w;w<<