Copyright © 2007 Jacob Scott GPL v2.0 or above =80+xf then SendMessage(tf1,"off") end end function renderLine1( line, pattern) -- Level 1 -- Limbo for i=1, strlen(pattern) do local c = strsub( pattern, i, i) set_floor("fl-leaves",i-1 +x1,line +y1) if c =="#" then set_stone( "st-rubberband", i-1 +x1, line +y1,{length=2}) elseif c =="A" then set_stone( "st-rubberband", i-1 +x1, line +y1,{name="r11",length=2}) elseif c =="B" then set_stone( "st-rubberband", i-1 +x1, line +y1,{name="r12",length=2}) elseif c =="C" then set_stone( "st-rubberband", i-1 +x1, line +y1,{name="r13",length=2}) elseif c =="X" then set_stone( "st-death", i-1 +x1, line +y1) elseif c =="g" then set_stone( "st-grate1", i-1 +x1, line +y1) elseif c =="*" then set_stone( "st-brownie", i-1 +x1, line +y1) elseif c =="S" then set_stone( "st-scissors", i-1 +x1, line +y1) elseif c =="W" then set_item( "it-wormhole", i-1 +x1, line +y1,{strength=20,range=7,targetx=2.5+xm,targety=3.5+ym}) elseif c == "$" then set_stone( "st-brownie", i-1 +x1, line +y1) set_floor("fl-water",i-1 +x1,line +y1) elseif c=="1" then set_item("it-sensor",i-1 +x1,line +y1,{action="callback",target="funcc11"}) elseif c == "~" then set_floor("fl-water",i-1 +x1,line +y1) elseif c=="a" then set_actor("ac-blackball", i-.5 +x1,line+.5 +y1, {name="z11",essential=0,controllers=0,player=1}) elseif c=="b" then set_actor("ac-whiteball", i-.5 +x1,line+.5 +y1, {name="y11",essential=0,controllers=0,player=1}) elseif c=="c" then set_actor("ac-whiteball-small", i-.5 +x1,line+.5 +y1, {name="s11",essential=0,controllers=0,player=1}) elseif c=="d" then set_item("it-document",i-1+x1,line+y1,{text="...for then I knew that beings of great worth / were here suspended in this Limbo."}) elseif c=="z" then set_actor("ac-blackball", i-.5 +x1,line+.5 +y1,{player=0,name="z1"}) end end end renderLine1(00,"###########################A###########################################B##############################C#############") renderLine1(01,"* ~ * ~~ * ~~ ~~~ ~~ * ~~ * ~ * ~ ~ ~ ~ ~** *~~ XS**") renderLine1(02,"* * * * ~~ ~~~ * * ~* ** ** ** ** ** * ~** X **") renderLine1(03,"* d * * * ~* *~ * ~ ~ ~ ~ ~ * ~ **") renderLine1(04,"* * * ** * ~ *~ * ~ *~ ** ** ** ** ** ~** ~ * **") renderLine1(05,"* * * ~ ** * ~ * ~ ~ ~* ~ ~ ~ ~ ~** * * **") renderLine1(06,"* 1 * ~~ ** a * ~ ** * ~ * ~ * b~ * ** ** ** ** ** * c * * *** **") renderLine1(07,"* *** * ~~ * * ~ ~~ * * * ~ ~ ~ ~ * ~*** **") renderLine1(08,"* *** * * * * *** * ~* * ** ** ** ** ** ~** * * ***") renderLine1(09,"* * * * * *~ * ~ ~ ~ ~ * ~** ** W**") renderLine1(10,"* * * * ~ * ** ** ** ** ** ** * ***") renderLine1(11,"$~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~$*") renderLine1(12,"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*") renderLine1(13,"$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$*") renderLine1(-1,"####################################################################################################################") r11=enigma.GetNamedObject("r11") r12=enigma.GetNamedObject("r12") r13=enigma.GetNamedObject("r13") z11=enigma.GetNamedObject("z11") y11=enigma.GetNamedObject("y11") s11=enigma.GetNamedObject("s11") AddRubberBand(z11,r11,10,2) AddRubberBand(y11,r12,10,2) AddRubberBand(s11,r13,10,2) function funcc11() enigma.AddConstantForce(0,40) end function renderLinem( line, pattern) -- Minos Room for i=1, strlen(pattern) do set_floor("fl-bumps",i-1+xm,line+ym) local c = strsub( pattern, i, i) if c =="#" then set_stone( "st-rock4", i-1 +xm, line +ym) elseif c =="X" then set_stone( "st-death", i-1 +xm, line +ym) elseif c == "*" then set_stone( "st-brownie", i-1 +xm, line +ym) elseif c == "!" then abyss(i-1 +xm,line +ym) elseif c == "~" then set_floor("fl-water",i-1 +xm,line +ym) elseif c == "g" then set_stone("st-grate1",i-1+xm,line+ym) elseif c=="+" then set_stone( "st-wood", i-1 +xm, line +ym) elseif c=="=" then set_floor("fl-space",i-1 +xm,line +ym) elseif c=="k" then set_stone("st-knight",i-1 +xm,line +ym) elseif c=="D" then set_item("it-document",i-1+xm,line+ym,{text="You cannot be here! I, Minos, judger of the dead, will not allow it. Go back now, or forever face the consqeuences!"}) elseif c=="E" then set_item("it-document",i-1+xm,line+ym,{text="In that case, then begone!"}) elseif c=="e" then set_item("it-document",i-1+xm,line+ym,{text="There stands Minos, snarling, terrible. / He examines each offender at the entrance, / judges and dispatches as he encoils himself."}) elseif c == "d" then --1-d set_floor("fl-gradient", i-1+xm, line+ym, {type=1}) elseif c == "u" then --2-u set_floor("fl-gradient", i-1+xm, line+ym, {type=2}) elseif c == "r" then --3-r set_floor("fl-gradient", i-1+xm, line+ym, {type=3}) elseif c == "l" then --4-l set_floor("fl-gradient", i-1+xm, line+ym, {type=4}) elseif c=="f" then set_item("it-flagblack",i-1+xm,line+ym) elseif c=="O" then set_item("it-extralife",i-1+xm,line+ym) elseif c=="2" then set_item("it-wormhole",i-1+xm,line+ym,{strength=0}) elseif c=="t" then set_item("it-sensor",i-1+xm,line+ym,{action="callback",target="funccm2"}) elseif c=="s" then set_item("it-sensor",i-1+xm,line+ym,{action="callback",target="funccm1"}) end end end renderLinem(00,"####################") renderLinem(01,"# ##k## #") renderLinem(02,"# l D r e #") renderLinem(03,"# s ## ## #") renderLinem(04,"# #d# #") renderLinem(05,"#XXXXXXXX XXXXXXXXX#") renderLinem(06,"# X #") renderLinem(07,"# XXXXXXXX X E #") renderLinem(08,"# X Xttttt#") renderLinem(09,"# X X X X X X #") renderLinem(10,"# X X X X X 2 #") renderLinem(11,"# X #") renderLinem(12,"###XXXXXXXXXXX######") function funccm1() enigma.AddConstantForce(0,0) end ffm=0 function funccm2() if ffm==0 then enigma.KillItem(16+xm,10+ym) set_item("it-wormhole",16+xm,10+ym,{targetx=x2+3.5,targety=y2+11.5,strength=200,range=4}) ffm=1 end end function renderLine2( line, pattern) -- Level 2 for i=1, strlen(pattern) do set_floor("fl-metal",i-1+xm,line+y2) local c = strsub( pattern, i, i) if c =="#" then set_stone( "st-rock5", i-1 +x2, line +y2) elseif c =="$" then set_stone( "st-rock5", i-1 +x2, line +y2) set_floor("fl-water",i-1+x2,line+y2) elseif c =="X" then set_stone( "st-death", i-1 +x2, line +y2) elseif c == "*" then set_stone( "st-brownie", i-1 +x2, line +y2) elseif c == "B" then set_stone( "st-black4", i-1 +x2, line +y2) elseif c == "N" then set_stone( "st-white4", i-1 +x2, line +y2) elseif c == "!" then abyss(i-1 +x2,line +y2) elseif c == "~" then set_floor("fl-water",i-1 +x2,line +y2) elseif c=="z" then set_actor("ac-blackball", i-.5 +x2,line +y2+.5, {controllers=0,essential=0,player=1}) elseif c=="y" then set_actor("ac-whiteball", i-.5 +x2,line +y2+.5, {controllers=0,essential=0,player=1}) elseif c=="w" then set_actor("ac-whiteball-small", i-.5 +x2,line +y2+.5, {controllers=0,essential=0,player=1}) elseif c=="R" then set_actor("ac-rotor", i-.5+x2,line+.5+y2,{force=0}) elseif c=="T" then set_actor("ac-top", i-.5+x2,line+.5+y2,{force=0}) elseif c == "g" then set_stone("st-grate1",i-1+x2,line+y2) elseif c=="+" then set_stone( "st-wood", i-1 +x2, line +y2) elseif c=="F" then set_stone( "st-actorimpulse", i-1 +x2, line +y2,{force=700}) elseif c=="=" then set_floor("fl-space",i-1 +x2,line +y2) elseif c=="D" then set_item("it-document",i-1+x2,line+y2,{text="The hellish squall, which never rests, / sweeps spirits in its headlong rush..."}) elseif c == "t" then set_item("it-sensor",i-1+x2,line+y2,{action="callback",target="funcc21"}) elseif c == "f" then set_item("it-flagblack",i-1+x2,line+y2) elseif c == "O" then set_item("it-extralife",i-1+x2,line+y2) elseif c == "L" then set_item("it-landmine",i-1+x2,line+y2) elseif c == "`" then set_stone("st-timer",i-1+x2,line+y2,{on=0,loop=1,interval=random(random(2500)+1)/100,action="callback",target="funcc22",name="t21"}) elseif c=="W" then set_item("it-wormhole",i-1 +x2,line +y2,{targetx=3.5+x3,targety=9.5+y3,strength=0}) end end end renderLine2(00,"###############################$$############################################ `") renderLine2(01,"#O* F * * * ~~ # ### # F * * XO#") renderLine2(02,"# R * + ~~ * # ### ##X### # ** ** #") renderLine2(03,"#* * * * ~~ # #### #### # # ** *W * #") renderLine2(04,"# * * F ~~ *# # ########B# # * ** ** *#") renderLine2(05,"# * F T + ~~ F ## # # !B!+ # # F * * ** #") renderLine2(06,"#* * * * ~~ #y*# +## ### # # * F* *#") renderLine2(07,"# D* * * ~~ * ## # ### ###### # #") renderLine2(08,"#BBBB O * + ~~ B### NNN # #X F#") renderLine2(09,"#f B * * F ~~ B # ##### # ###### ###") renderLine2(10,"# ### F *~~ * # # ** ## # #####L # #") renderLine2(11,"# t# F * * ~~ # #w### # X #") renderLine2(12,"###############################$$############################################") ff21=0 function funcc21() if ff21==0 then enigma.AddConstantForce(random(1000)/20-25,random(1000)/20-25) SendMessage(enigma.GetNamedObject("t21"),"on") ff21=1 end end prevy=0 prevx=0 function funcc22() if prevx==0 then choicex=random(7) if choicex<=6 then forx=random(1000)/20-25 elseif choicex==7 then forx=0 end elseif prevx<0 then choicex=random(7) if choicex<=4 then forx=random(1000)/40 elseif choicex<=6 then forx=-random(1000)/40 elseif choicex==7 then forx=0 end elseif prevx>0 then choicex=random(7) if choicex<=4 then forx=-random(1000)/40 elseif choicex<=6 then forx=random(1000)/40 elseif choicex==7 then forx=0 end end prevx=forx if prevy==0 then choicey=random(7) if choicey<=6 then fory=random(1000)/20-25 elseif choicey==7 then fory=0 end elseif prevy<0 then choicey=random(7) if choicey<=4 then fory=random(1000)/40 elseif choicey<=6 then fory=-random(1000)/40 elseif choicey==7 then fory=0 end elseif prevy>0 then choicey=random(7) if choicey<=4 then fory=-random(1000)/40 elseif choicey<=6 then fory=random(1000)/40 elseif choicey==7 then fory=0 end end prevy=fory enigma.AddConstantForce(forx,fory) enigma.KillStone(78+x2,0+y2) set_stone("st-timer",78+x2,0+y2,{on=1,loop=1,interval=random(random(2500)+1)/100,action="callback",target="funcc22",name="t21"}) end function renderLine3( line, pattern) -- Level 3 for i=1, strlen(pattern) do set_floor("fl-white",i-1+x3,line+y3) local c = strsub( pattern, i, i) if c =="#" then set_stone( "st-rock7", i-1 +x3, line +y3) elseif c =="X" then set_stone( "st-death", i-1 +x3, line +y3) elseif c == "*" then set_stone( "st-brownie", i-1 +x3, line +y3) elseif c=="c" then set_floor("fl-dunes",i-1+x3,line+y3) elseif c == "!" then abyss(i-1 +x3,line +y3) elseif c == "~" then set_floor("fl-water",i-1 +x3,line +y3) elseif c == "g" then set_stone("st-grate1",i-1+x3,line+y3) elseif c=="+" then set_stone( "st-wood", i-1 +x3, line +y3) elseif c=="=" then set_floor("fl-space",i-1 +x3,line +y3) elseif c=="s" then set_stone("st-stoneimpulse",i-1 +x3,line +y3) elseif c=="D" then set_item("it-document",i-1+x3,line+y3,{text="I am in the third circle, of eternal, / hateful rain, cold and leaden, / changeless in its monotony."}) elseif c=="E" then set_item("it-document",i-1+x3,line+y3,{text="In that case, then begone!"}) elseif c=="O" then set_item("it-extralife",i-1+x3,line+y3) elseif c == "f" then set_item("it-sensor",i-1+x3,line+y3,{action="callback",target="funcc31"}) elseif c=="T" then set_stone("st-timer",i-1+x3,line+y3,{interval=0.55,loop=1,on=1,action="callback",target="funcc32"}) elseif c=="W" then set_item("it-wormhole",i-1 +x3,line +y3,{targetx=26.5+x4,targety=2.5+y4,strength=5,range=3}) set_floor("fl-water",i-1 +x3,line +y3) elseif c=="z" then set_actor("ac-blackball", i-.5 +x3,line+.5 +y3, {player=0,name="z1"}) end end end renderLine3(00,"#################### T") renderLine3(01,"# cccccccccc #") renderLine3(02,"# + cccccccccc #") renderLine3(03,"# D cccccccccc #") renderLine3(04,"# + cccccccccc #") renderLine3(05,"# cccccccccc ~##") renderLine3(06,"# + +cccccccccc s~W#") renderLine3(07,"# cccccccccc ~##") renderLine3(08,"# + cccccccccc #") renderLine3(09,"# f cccccccccc #") renderLine3(10,"# + cccccccccc #") renderLine3(11,"# ~~~~~~~~~~ #") renderLine3(12,"####################") ff3=0 function funcc31() if ff3==0 then SendMessage(enigma.GetNamedObject("t21"),"off") enigma.AddConstantForce(0,0) ff3=1 end end f321=random(11) f322=random(11) f323=random(11) f324=random(11) f325=random(11) f326=random(11) f327=random(11) f328=random(11) f329=random(11) f3210=random(11) f32=0 function funcc32() f32=f32+1 if f32==11 then f32=0 end fill_floor("fl-dunes",5+x3,1+y3,10,10) set_floor("fl-water",5+x3,(f32+f321)%11+1+y3) set_floor("fl-water",6+x3,(f32+f322)%11+1+y3) set_floor("fl-water",7+x3,(f32+f323)%11+1+y3) set_floor("fl-water",8+x3,(f32+f324)%11+1+y3) set_floor("fl-water",9+x3,(f32+f325)%11+1+y3) set_floor("fl-water",10+x3,(f32+f326)%11+1+y3) set_floor("fl-water",11+x3,(f32+f327)%11+1+y3) set_floor("fl-water",12+x3,(f32+f328)%11+1+y3) set_floor("fl-water",13+x3,(f32+f329)%11+1+y3) set_floor("fl-water",14+x3,(f32+f3210)%11+1+y3) end function renderLine4( line, pattern) -- Level 4 for i=1, strlen(pattern) do set_floor("fl-black",i-1+x4,line+y4) local c = strsub( pattern, i, i) if c=="#" then set_stone("st-greenbrown",i-1+x4,line+y4) elseif c =="H" then randir=random(2) if randir==1 then set_stone("st-bolder",i-1+x4,line+y4,{direction=EAST}) elseif randir==2 then set_stone("st-bolder",i-1+x4,line+y4,{direction=WEST}) end elseif c =="V" then randir=random(2) if randir==1 then set_stone("st-bolder",i-1+x4,line+y4,{direction=NORTH}) elseif randir==2 then set_stone("st-bolder",i-1+x4,line+y4,{direction=SOUTH}) end elseif c =="7" then randir=random(2) if randir==1 then set_stone("st-bolder",i-1+x4,line+y4,{direction=EAST}) elseif randir==2 then set_stone("st-bolder",i-1+x4,line+y4,{direction=SOUTH}) end elseif c =="9" then randir=random(2) if randir==1 then set_stone("st-bolder",i-1+x4,line+y4,{direction=WEST}) elseif randir==2 then set_stone("st-bolder",i-1+x4,line+y4,{direction=SOUTH}) end elseif c =="3" then randir=random(2) if randir==1 then set_stone("st-bolder",i-1+x4,line+y4,{direction=WEST}) elseif randir==2 then set_stone("st-bolder",i-1+x4,line+y4,{direction=NORTH}) end elseif c =="1" then randir=random(2) if randir==1 then set_stone("st-bolder",i-1+x4,line+y4,{direction=EAST}) elseif randir==2 then set_stone("st-bolder",i-1+x4,line+y4,{direction=NORTH}) end elseif c =="X" then set_stone( "st-death", i-1 +x4, line +y4) elseif c == "*" then set_stone( "st-brownie", i-1 +x4, line +y4) elseif c == "!" then abyss(i-1 +x4,line +y4) elseif c == "~" then set_floor("fl-water",i-1 +x4,line +y4) elseif c == "g" then set_stone("st-grate1",i-1+x4,line+y4) elseif c=="+" then set_stone( "st-wood", i-1 +x4, line +y4) elseif c=="=" then set_floor("fl-space",i-1 +x4,line +y4) elseif c=="n" then set_stone("st-bolder",i-1+x4,line+y4,{direction=NORTH}) set_floor("fl-water",i-1+x4,line+y4) elseif c=="N" then set_stone("st-bolder",i-1+x4,line+y4,{direction=NORTH}) elseif c=="E" then set_stone("st-bolder",i-1+x4,line+y4,{direction=EAST}) elseif c=="S" then set_stone("st-bolder",i-1+x4,line+y4,{direction=SOUTH}) elseif c=="W" then set_stone("st-bolder",i-1+x4,line+y4,{direction=WEST}) elseif c=="D" then set_item("it-document",i-1+x4,line+y4,{text="...they, with great shouts, from opposite sides / were shoving burdens forward with their chests. / They crashed into each other, turned / and beat retreat, shoving their loads and shouting..."}) elseif c=="w" then set_item("it-wormhole",i-1 +x4,line +y4,{targetx=23.5+x5,targety=5.5+y5,strength=0}) elseif c=="x" then set_stone("st-turnstile",i-1+x4,line+y4) elseif c=="8" then set_stone("st-turnstile-n",i-1+x4,line+y4) elseif c=="6" then set_stone("st-turnstile-e",i-1+x4,line+y4) elseif c=="2" then set_stone("st-turnstile-s",i-1+x4,line+y4) elseif c=="4" then set_stone("st-turnstile-w",i-1+x4,line+y4) elseif c=="G" then set_item("it-brake",i-1+x4,line+y4) elseif c=="O" then set_item("it-extralife",i-1+x4,line+y4) elseif c=="B" then set_stone("st-break_bolder",i-1+x4,line+y4) elseif c=="`" then set_item("it-bag",i-1+x4,line+y4) elseif c=="l" then set_item("it-sensor",i-1+x4,line+y4,{action="callback",target="funcc42"}) elseif c=="z" then set_actor("ac-blackball", i-.5 +x4,line+.5 +y4, {player=0,name="z1"}) elseif c=="s" then set_item("it-sensor",i-1+x4,line+y4,{action="callback",target="funcc41",_posx4=i-1+x4}) set_item("it-sensor",i-1+x4,line+y4-1,{action="callback",target="funcc41",_posx4=i-1}) set_item("it-sensor",i-1+x4,line+y4+1,{action="callback",target="funcc41",_posx4=i-1}) end end end renderLine4(00," #7HHHHHHHHHHHHHHHHHH9SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS7HHHHHHHHHHHHHHHHHH9#") renderLine4(01," #VES S n VSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSV SWWWWWWWW V#") renderLine4(02," #V E* EES~ *~ ` VSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSV S N SWWWWW V#") renderLine4(03," #V x6 S~ N~ VNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNV S SWWW N S N V#") renderLine4(04," #V 8 82 8 S~ N~ S1HWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBEH3 S SO N N S S N V#") renderLine4(05," #V4x4x Ex6x6S~ N~ S l S S N N S S N V#") renderLine4(06," #V 2 8 S~ N~ G ssssssssssssssssssssssssssssssssssssssssssssssssssssssssl ES S N NWW S N V#") renderLine4(07," #V 4x6x86 S~ N~ N l S S N S N V#") renderLine4(08," #V 4x 1x 4xS~ N~ N7HWBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBEH9 S S NWWWWWW N V#") renderLine4(09," #V 2x *~ N~ VSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSV S S w N V#") renderLine4(10," #V 2 D ~ N~ VNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNV*WW S EEEES N V#") renderLine4(11," #V ~ N VNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNV EEEEN EEEEN V#") renderLine4(12," #1HHHHHHHHHHHHHHHHHH3NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN1HHHHHHHHHHHHHHHHHH3#") set_stone("st-bolder",34+x4,10+y4,{direction=WEST}) set_stone("st-bolder",35+x4,10+y4,{direction=WEST}) set_stone("st-bolder",36+x4,10+y4,{direction=WEST}) function funcc41(value,sender) _posx4=enigma.GetAttrib(sender,"_posx4") choice4=random(2) if choice4==1 then SendMessage(enigma.GetStone(_posx4,9+y4),"direction",NORTH) SendMessage(enigma.GetStone(_posx4,3+y4),"direction",SOUTH) elseif choice4==2 then SendMessage(enigma.GetStone(_posx4,3+y4),"direction",SOUTH) SendMessage(enigma.GetStone(_posx4,9+y4),"direction",NORTH) end enigma.KillItem(_posx4,5+y4) enigma.KillItem(_posx4,6+y4) enigma.KillItem(_posx4,7+y4) end f42=0 function funcc42() if f42==0 then set_actor("ac-top",29.5+x5,2.5+y5,{force=0,gohome=0}) f42=1 end end renderLine4(13," #####################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#####################") renderLine4(14," #####################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#####################") renderLine4(15," #####################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#####################") renderLine4(16," #####################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#####################") renderLine4(17," #####################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#####################") renderLine4(18," #####################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#####################") renderLine4(19," ##################################################################################################") renderLine4(-1," #####################SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS#####################") renderLine4(-2," #####################SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS#####################") renderLine4(-3," #####################SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS#####################") renderLine4(-4," #####################SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS#####################") renderLine4(-5," #####################SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS#####################") renderLine4(-6," #####################SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS#####################") renderLine4(-7," ##################################################################################################") addactors5=0 function renderLine5( line, pattern) -- Level 5 -- Entrance to Dis for i=1, strlen(pattern) do local c = strsub( pattern, i, i) if addactors5==0 then set_floor("fl-swamp",i-1+x5,line+y5) if c =="#" then set_stone( "st-rock1", i-1 +x5, line +y5) set_floor("fl-concrete",i-1+x5,line+y5) elseif c =="i" then set_stone( "st-invisible", i-1 +x5, line +y5) set_floor("fl-water",i-1+x5,line+y5) elseif c =="&" then set_stone( "st-greenbrown", i-1 +x5, line +y5) set_floor("fl-swamp",i-1+x5,line+y5) elseif c =="X" then set_stone( "st-death", i-1 +x5, line +y5) elseif c == "*" then set_stone( "st-brownie", i-1 +x5, line +y5) set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="+" then set_stone("st-wood",i-1+x5,line+y5) set_floor("fl-concrete",i-1+x5,line+y5) elseif c == "!" then abyss(i-1 +x5,line +y5) elseif c == "~" then set_floor("fl-water",i-1 +x5,line +y5) elseif c == "g" then set_stone("st-grate1",i-1+x5,line+y5) elseif c=="+" then set_stone( "st-wood", i-1 +x5, line +y5) elseif c=="=" then set_floor("fl-space",i-1 +x5,line +y5) elseif c=="h" then set_floor("fl-hay",i-1 +x5,line +y5) elseif c=="c" then set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="f" then set_item("it-flagblack",i-1 +x5,line +y5) elseif c=="O" then set_item("it-extralife",i-1 +x5,line +y5) elseif c=="W" then set_item("it-wormhole",i-1 +x5,line +y5,{targetx=2.5+x6,targety=2.5+y6,strength=0}) set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="A" then set_stone("st-door-h",i-1+x5,line+y5,{name="d51"}) set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="B" then set_stone("st-door-h",i-1+x5,line+y5,{name="d52"}) set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="C" then set_stone("st-door-h",i-1+x5,line+y5,{name="d53"}) set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="1" then set_item("it-trigger",i-1+x5,line+y5,{action="openclose",target="d51"}) elseif c=="2" then set_item("it-trigger",i-1+x5,line+y5,{action="openclose",target="d52"}) set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="3" then set_item("it-trigger",i-1+x5,line+y5,{action="openclose",target="d53"}) set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="q" then set_item("it-spoon",i-1+x5,line+y5) elseif c=="T" then set_floor("fl-water",i-1 +x5,line +y5) elseif c=="R" then set_floor("fl-water",i-.5 +x5,line +y5+.5) elseif c=="x" then set_floor("fl-concrete",i-1+x5,line+y5) elseif c=="l" then set_floor("fl-hay",i-1 +x5,line +y5) set_item("it-sensor",i-1+x5,line+y5,{action="callback",target="funcc51"}) elseif c=="D" then set_item("it-document",i-1+x5,line+y5,{text="This dreary stream, once it has reached / these malignant, ashen slopes, / drains out into the swamp called Styx. / And I, my gaze transfixed, could see / people with angry faces in that bog, / naked, their bodies smeared with mud."}) elseif c=="E" then set_item("it-document",i-1+x5,line+y5,{text="...we approach the city known as Dis, / with its vast army and its burdened citizens."}) elseif c=="F" then set_item("it-document",i-1+x5,line+y5,{text="At the threshold I saw more than a thousand angels / fallen from Heaven....they reined in their great disdain / enough to say: 'You come -- alone. Let him be gone, / who has so boldly made his way into this kingdom. / 'Let him retrace his reckless path alone..."}) set_floor("fl-hay",i-1 +x5,line +y5) end elseif addactors5==1 then if c=="t" then set_actor("ac-top",i-.5+x5,line+y5+.5,{range=5,force=20,gohome=0}) elseif c=="r" then set_actor("ac-rotor",i-.5+x5,line+y5+.5,{range=5,force=20,gohome=0}) elseif c=="T" then set_actor("ac-top",i-.5+x5,line+y5+.5,{force=0,gohome=0}) elseif c=="R" then set_actor("ac-rotor",i-.5+x5,line+y5+.5,{force=0,gohome=0}) elseif c=="x" then set_actor("ac-top",i-.5+x5,line+y5+.5,{range=7,force=15,gohome=0}) end end end end function make5() renderLine5(00,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(01,"i~~~~~~~~~~~~~~~~~~~~~~~~ ~~~ ~~ ~~~~~~~~~~ ~~~~ & ~~~ ~~~~ ~~ ~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(02,"i~~~~~~~~~~~~~~~~~~~~~ ~~~~ ~~~~ ~~ O~~ ~~~ ~~~ ~~~1 ~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(03,"i~~~~~~~~~~~~~~~~~~~ ~~ h ~~ ~~~ ~~ ~~~ ~~~ ~~ h ~~~~~~~~~~~~~~~~~~~~i") renderLine5(04,"i~~~~~~~~~~~~~~~~~~~ hhh f ~~~ ~~~ &~~~ ~~~~~~~ ~~~ ~~~ ~~ ~~~~~~~~~~~~~~~~~~~~~i") renderLine5(05,"i~~~~~~~~~~~~~~~~~~~ hlh ~~~ ~~~ ~~ ~~ ~~ ~~~ ~~~ h ~T~ ~~~ & ~~~~~~~~~~~~~~~~~~~~~i") renderLine5(06,"i~~~~~~~~~~~~~~~~~~~ hhh & ~~ ~~~ ~~ ~~~ h ~~~ ~~~ ~~~ ~~~~~~~~~~~~~~~~~~~~i") renderLine5(07,"i~~~~~~~~~~~~~~~~~~~ D ~~~~~~ ~~~ ~~~ ~~ ~~~ F ###~~~~~~~~~~~~~~~~~~~i") renderLine5(08,"i~~~~~~~~~~~~~~~~~~~ ~~ ~~~ ~~ ~~~~ r ~~ ~~~~~ ~~~~ #####cx#~~~~~~~~~~~~~~~~~~~i") renderLine5(09,"i~~~~~~~~~~~~~~~~~~~~~ ~ ~~~~ ~~~~ ~ ~~~~~~~~~ ~~ ~~ #A##cccc+!##~~~~~~~~~~~~~~~~~~~i") renderLine5(10,"i~~~~~~~~~~~~~~~~~~~~~~~ ~~ ~~ ~~~~ ~~~ ~~~~~~ h ~~ ##ccccc#####x#~~~~~~~~~~~~~~~~~~~i") renderLine5(11,"i~~~~~~~~~~~~~~~~~~~ ~~~ ~~~ ~~~~ ~~ ~~ ~~~~ ##ccc#B##cccc+!#~~~~~~~~~~~~~~~~~~~i") renderLine5(12,"i~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~R~ ~~~~~ ~~~ ~~ ~~ & ~~~~ ##ccc##ccccc######~~~~~~~~~~~~~~~~~~~i") renderLine5(13,"i~~~~~~~~~~~~~~~~~~~ h ~~~~~~~~~~ ~~~ ~ & ~~~~~~~~~ h #ccc##ccc#C##ccccc#~~~~~~~~~~~~~~~~~~~i") renderLine5(14,"i~~~~~~~~~~~~~~~~~~~ & ~~ ~~ h ~~~ ~~~~~ ~~ #cc##ccc##ccccccccc#~~~~~~~~~~~~~~~~~~~i") renderLine5(15,"i~~~~~~~~~~~~~~~~~~~ ~~~ t ~~ ~~~ h ~~~ ~~ ~~~ ~ #cc#ccc##ccc#c#######~~~~~~~~~~~~~~~~~~~i") renderLine5(16,"i~~~~~~~~~~~~~~~~~~~ ~~~~ ~~~ ~~~~ ~~ ~~~~~ ~~ h ~~~ #cc#cc##cccc##ccc#ccc#~~~~~~~~~~~~~~~~~~~i") renderLine5(17,"i~~~~~~~~~~~~~~~~~~~ ~~ ~~~~ ~~~~ ~ t~~~ #cc#cc#cccccc#cc*c+ccc#~~~~~~~~~~~~~~~~~~~i") renderLine5(18,"i~~~~~~~~~~~~~~~~~~~ ~ ~~ ~~~ ~~~~ ~~ ~~ h #c#cc#cc######cc###c#c#~~~~~~~~~~~~~~~~~~~i") renderLine5(19,"i~~~~~~~~~~~~~~~~~~~~~~ ~~ ~~~~~ & ~~ O~ ~~~ ~~~ #cc#c#ccc#ccccc+c+c#**c#~~~~~~~~~~~~~~~~~~~i") renderLine5(20,"i~~~~~~~~~~~~~~~~~~~~~ ~~~ ~~ q ~~~ ~~ ~~~~ ~R~~~ #cc#cc#c####c#c##c#c*ccc#~~~~~~~~~~~~~~~~~~~i") renderLine5(21,"i~~~~~~~~~~~~~~~~~~~ ~~~ ~~ ~ ~~ r ~~~ E ~~~ #c#cc#cc#c+cc*cccc*c#####~~~~~~~~~~~~~~~~~~~i") renderLine5(22,"i~~~~~~~~~~~~~~~~~~~ h ~~~~h ~~~ ~~~ ~~~ ~~ #cc#c#ccc#c##c######c#!!W#~~~~~~~~~~~~~~~~~~~i") renderLine5(23,"i~~~~~~~~~~~~~~~~~~~ ~~~~~~~ ~~~ ~~~ ~~~ ~~ #2#3c#ccc#ccccccccccc!!!!#~~~~~~~~~~~~~~~~~~~i") renderLine5(24,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~##########################~~~~~~~~~~~~~~~~~~~i") renderLine5(-1,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(-2,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(-3,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(-4,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(-5,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(-6,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii") renderLine5(25,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(26,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(27,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(28,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(29,"i~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~i") renderLine5(30,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii") end make5() f51=0 function funcc51() if f51==0 then addactors5=1 make5() makeactors6() addactors7=1 make7() makeactors8() f51=1 end end function renderLine6( line, pattern) -- Level 6 for i=1, strlen(pattern) do set_floor("fl-concrete",i-1+x6,line+y6) local c = strsub( pattern, i, i) if c =="#" then set_stone( "st-rock1", i-1 +x6, line +y6) elseif c =="$" then set_stone( "st-stone2", i-1 +x6, line +y6) elseif c =="%" then set_stone( "st-rock1", i-1 +x6, line +y6) elseif c =="X" then set_stone( "st-death", i-1 +x6, line +y6) elseif c == "*" then set_stone( "st-brownie", i-1 +x6, line +y6) elseif c == "!" then abyss(i-1 +x6,line +y6) elseif c == "~" then set_floor("fl-water",i-1 +x6,line +y6) elseif c == "g" then set_stone("st-grate2",i-1+x6,line+y6) elseif c=="+" then set_stone( "st-wood", i-1 +x6, line +y6) elseif c=="=" then set_floor("fl-space",i-1 +x6,line +y6) elseif c=="F" then set_item("it-flagblack",i-1 +x6,line +y6) elseif c=="O" then set_item("it-extralife",i-1 +x6,line +y6) elseif c=="N" then set_stone("st-mail-n",i-1+x6,line+y6) elseif c=="R" then set_stone("st-oneway_black-e",i-1+x6,line+y6) elseif c=="L" then set_stone("st-oneway_black-w",i-1+x6,line+y6) elseif c=="h" then set_item("it-pipe-h",i-1+x6,line+y6) elseif c=="v" then set_item("it-pipe-v",i-1+x6,line+y6) elseif c=="7" then set_item("it-pipe-es",i-1+x6,line+y6) elseif c=="9" then set_item("it-pipe-sw",i-1+x6,line+y6) elseif c=="3" then set_item("it-pipe-wn",i-1+x6,line+y6) elseif c=="1" then set_item("it-pipe-ne",i-1+x6,line+y6) elseif c=="m" then set_stone("st-pmirror",i-1+x6,line+y6,{movable=TRUE}) num=random(4) for timesturned=num,4 do SendMessage(enigma.GetStone(i-1+x6,line+y6),"trigger") end elseif c=="M" then set_stone("st-pmirror",i-1+x6,line+y6,{movable=FALSE}) num=random(4) for k=num,4 do SendMessage(enigma.GetStone(i-1+x6,line+y6),"trigger") end elseif c=="H" then set_stone("st-stone_break",i-1+x6,line+y6) elseif c=="`" then set_stone("st-rock1_hole",i-1+x6,line+y6) elseif c=="D" then set_item("it-document",i-1+x6,line+y6,{text="Now my master takes a hidden / path between the city's ramparts and the torments, / and I come close behind him..."}) elseif c=="E" then set_item("it-document",i-1+x6,line+y6,{text="...his hands, ready, encouraging, / thrust me towards him among the tombs."}) elseif c=="U" then set_stone("st-laser",i-1+x6,line+y6,{dir=NORTH,on=0,name="l61"}) elseif c=="T" then set_item("it-trigger",i-1+x6,line+y6,{action="onoff",target="l61"}) elseif c=="W" then set_item("it-wormhole",i-1 +x6,line +y6,{targetx=3.5+x7,targety=3.5+y7,strength=0}) elseif c=="z" then set_actor("ac-blackball", i-.5 +x6,line+.5 +y6, {player=0,name="z1"}) end end end renderLine6(00,"#############################################################################") renderLine6(01,"# m# #m m#%%%```%%%```%%%%%%####################") renderLine6(02,"# ##### ##### # # ######### #%```%`````%`````%%####################") renderLine6(03,"# # # # # #### # # #%`%%%%%%`%%%`%%%%%####################") renderLine6(04,"# ##### D # # ######### #%``%```%```%````%%####################") renderLine6(05,"#UT # # ### ### #%%`%`%`%%%%%%`%%%%####################") renderLine6(06,"### ######### # # # # # m ### #`````%`````%%`````####################") renderLine6(07,"# #m# # # # # # # # #%%%%`%%%%%``%%%`%`####################") renderLine6(08,"### ############# ### ### ### #```````%%%%%%%%`%`####################") renderLine6(09,"#m m #`%%%%%`%```%````%`####################") renderLine6(10,"# ##### ##### ### ##### #````%%`%%%`%`%`%%%####################") renderLine6(11,"# # # # # # # # # m#%%%`%````%`%`%```%####################") renderLine6(12,"# # ### ##### ### ### ###########%%%%%`%%```%`%%`%%####################") renderLine6(13,"# # #m gg # #%````````#%%````%%%%`%``%```####################") renderLine6(14,"# ### ######### ###### ###%`%%%%%%%#%%`%%`%%%%%%%%%%%`####################") renderLine6(15,"#m gg m# # #`````````````%%`````%%``````####################") renderLine6(16,"###### ############ ## #`%`%%%%`%#%%%%%`%%%%%%`%%%%%####################") renderLine6(17,"# # # #### #m #`%`%````%#%%%##H##%%%%````%%####################") renderLine6(18,"# # # # #### ############### #%%`%`%`%%%####################") renderLine6(19,"###### ############# m ``````````````` M #%%```%`%%%####################") renderLine6(20,"# # # ############### #%``%%%`%%%####################") renderLine6(21,"# ##### m ### ######%%```````#%%%#####%`%%`%%%`%####################") renderLine6(22,"# # # ### #%`%%%%%`%%%%%```````````````````%####################") renderLine6(23,"# # # # #m m#%```````````%%#`%`%%%`%%`%%%%%`%%####################") renderLine6(24,"################################################`############################") renderLine6(25,"#%%%%%`````%%%%%%%%#%%``%%%%``%%%%%%%`#%`%`%```%```%`%%%`####################") renderLine6(26,"#%```%%%`%````%`%````%%````%%`````%%%````````%```%```````####################") renderLine6(27,"#%`%`%```%%%%`%`%`%#`%%`%%````%%%`````###$$$#####$$$#########################") renderLine6(28,"#%%%```%%%````%```%#`%```%%%%`%`%%%%%`#O $ $ h $ $ h O####################") renderLine6(29,"#%```%%%`%%%%`%%`%%#```%```%%```%```%%# hL $ h$ R ####################") renderLine6(30,"#%%%`%%%`````````%%#%%%%%%%%%%%%%`%```# $7$ N $3$v h####################") renderLine6(31,"#%%%```%%%%%%%%%%%%#%```%%%`%`````%`%%#h $F$ $F$ ####################") renderLine6(32,"#%```%```%```````%%#%`%`%```%%%`%%%`%%# $F$v 9 $F$ ####################") renderLine6(33,"#%%%`%%%%%`%%%%%`%%#%`%```%%%```%%%````E v $1$ $O$ ####################") renderLine6(34,"#%````%`%``````%``````%%%```%`%```%%%%# h L $ h $ $ ####################") renderLine6(35,"#%%%%`````%%%%%%%%%#%```%%%```%%%`````#O h$ $ v $W$F####################") renderLine6(36,"#############################################$$$#####$$$#####################") renderLine6(37,"#############################################################################") renderLine6(38,"#############################################################################") renderLine6(39,"#############################################################################") renderLine6(40,"#############################################################################") renderLine6(41,"#############################################################################") renderLine6(42,"#############################################################################") renderLine6(43,"#############################################################################") renderLine6(44,"#############################################################################") renderLine6(45,"#############################################################################") renderLine6(46,"#############################################################################") renderLine6(47,"#############################################################################") renderLine6(48,"#############################################################################") fill_floor("fl-acblack",39 +x6,28 +y6,18,8) function makeFire6(x,y) set_floor("fl-acblack",x,y-1,{burnable=FALSE}) set_floor("fl-acblack",x,y+1,{burnable=FALSE}) set_floor("fl-acblack",x,y,{burnable=TRUE,initfire=TRUE,eternal=TRUE}) end makeFire6(42+x6,31+y6) makeFire6(46+x6,32+y6) makeFire6(50+x6,31+y6) makeFire6(54+x6,32+y6) function makeactors6() set_actor("ac-whiteball",42+x6+.5,28+y6+.5,{mouseforce=0,player=1}) set_actor("ac-whiteball-small",46+x6+.5,35+y6+.5,{mouseforce=0,player=1}) set_actor("ac-whiteball",50+x6+.5,28+y6+.5,{mouseforce=0,player=1}) end addactors7=0 function renderLine7( line, pattern) -- Level 7 for i=1, strlen(pattern) do local c = strsub( pattern, i, i) if addactors7==0 then set_floor("fl-stwood",i-1+x7,line+y7,{burnable=FALSE}) if c =="#" then set_stone( "st-redrock", i-1 +x7, line +y7) elseif c =="%" then set_stone( "st-camouflage", i-1 +x7, line +y7) elseif c=="$" then set_stone( "st-redrock", i-1 +x7, line +y7) set_floor("fl-sand",i-1 +x7,line +y7,{burnable=FALSE}) set_item("it-sensor",i-1+x7,line+y7) elseif c=="F" then set_floor("fl-stwood",i-1+x7,line+y7,{burnable=TRUE,initfire=TRUE,eternal=TRUE}) elseif c=="r" then set_floor("fl-stwood",i-1+x7,line+y7,{burnable=TRUE,initfire=TRUE,eternal=TRUE}) elseif c=="R" then set_floor("fl-stwood",i-1+x7,line+y7,{burnable=TRUE,initfire=TRUE,eternal=TRUE}) elseif c=="b" then set_floor("fl-bridge-closed",i-1+x7,line+y7,{type="y",burnable=FALSE}) elseif c =="X" then set_floor("fl-sand",i-1+x7,line+y7,{burnable=FALSE}) elseif c =="s" then set_floor("fl-sand",i-1+x7,line+y7,{burnable=FALSE}) set_item("it-sensor",i-1+x7,line+y7,{action="callback",target="funcc71",_posx7=i-1+x7,_posy7=line+y7}) elseif c == "*" then set_stone( "st-brownie", i-1 +x7, line +y7) elseif c=="c" then set_floor("fl-dunes",i-1+x7,line+y7) elseif c == "!" then abyss(i-1 +x7,line +y7) elseif c == "~" then set_floor("fl-water",i-1 +x7,line +y7) elseif c == "g" then set_stone("st-grate1",i-1+x7,line+y7) elseif c=="+" then set_stone( "st-wood", i-1 +x7, line +y7) elseif c=="B" then set_stone( "st-black4", i-1 +x7, line +y7) elseif c=="=" then set_floor("fl-space",i-1 +x7,line +y7) elseif c=="^" then set_floor("fl-sand",i-1 +x7,line +y7) set_item("it-sensor",i-1+x7,line+y7) elseif c=="v" then set_item("it-sensor",i-1 +x7,line +y7) elseif c=="V" then set_stone( "st-redrock", i-1 +x7, line +y7) set_item("it-sensor",i-1 +x7,line +y7) elseif c=="O" then set_item("it-extralife",i-1 +x7,line +y7) elseif c=="D" then set_item("it-document",i-1+x7,line+y7,{text="Like the bull that breaks its tether / just as it receives the mortal blow / and cannot run, but lunges here and there, / so raged the Minotaur. My artful guide / called out: 'Run to the passage: / hurry down while he is in his fury.'"}) elseif c=="E" then set_item("it-document",i-1+x7,line+y7,{text="...we went on, / skirting the edge of the vermilion boil / from which the boiled cried out with piercing shrieks."}) elseif c=="f" then set_item("it-document",i-1+x7,line+y7,{text="Here the filthy Harpies nest, / who drove the Trojans from the Strophades / with doleful prophecies of woe to come."}) elseif c=="G" then set_item("it-document",i-1+x7,line+y7,{text="Here, at the very edge, we stayed our steps / at an expanse of deep and arid sand..."}) elseif c == "f" then set_item("it-sensor",i-1+x7,line+y7,{action="callback",target="funcc71"}) elseif c=="T" then set_stone("st-timer",i-1+x7,line+y7,{interval=0.55,loop=1,on=1,action="callback",target="funcc72"}) elseif c=="W" then set_item("it-wormhole",i-1 +x7,line +y7,{targetx=5.5+x8,targety=2.5+y8,strength=10,range=10}) set_floor("fl-sand",i-1 +x7,line +y7) elseif c =="I" then set_stone("st-puzzle2-ns",i-1+x7,line+y7) elseif c =="7" then set_stone("st-puzzle2-es",i-1+x7,line+y7) elseif c =="9" then set_stone("st-puzzle2-sw",i-1+x7,line+y7) elseif c =="L" then set_stone("st-puzzle2-ne",i-1+x7,line+y7) elseif c =="/" then set_stone("st-puzzle2-nw",i-1+x7,line+y7) elseif c =="C" then set_item("it-coffee",i-1+x7,line+y7) elseif c=="1" then set_actor("ac-rotor",i-.5+x7,line+y7+.5,{gohome=1,force=40,range=5,name="r71",attacknearest=TRUE,prefercurrent=1}) elseif c=="2" then set_actor("ac-rotor",i-.5+x7,line+y7+.5,{gohome=1,force=40,range=5,name="r72",attacknearest=TRUE,prefercurrent=1}) elseif c=="3" then set_actor("ac-rotor",i-.5+x7,line+y7+.5,{gohome=1,force=40,range=5,name="r73",attacknearest=TRUE,prefercurrent=1}) elseif c=="4" then set_actor("ac-rotor",i-.5+x7,line+y7+.5,{gohome=1,force=40,range=5,name="r74",attacknearest=TRUE,prefercurrent=1}) elseif c=="5" then set_actor("ac-rotor",i-.5+x7,line+y7+.5,{gohome=1,force=40,range=5,name="r75",attacknearest=TRUE,prefercurrent=1}) elseif c=="z" then set_actor("ac-blackball", i-.5 +x7,line+.5 +y7, {player=0,name="z1"}) end elseif addactors7==1 then if c=="t" then set_actor("ac-top",i-.5+x7,line+y7+.5,{force=0}) elseif c=="x" then set_actor("ac-top",i-.5+x7,line+y7,{force=0}) elseif c=="r" then set_actor("ac-rotor",i-.5+x7,line+.5+y7,{force=0}) elseif c=="R" then set_actor("ac-rotor",i-.5+x7,line+1+y7,{force=0}) end end end end function make7() renderLine7(00,"########################################################V$$$$$$$$$$$$$$$$$$$$") renderLine7(01,"# ####### 9g FFFFFF# vsXsssssXXXssssssXsW$") renderLine7(02,"# 1 ####### / I 7g FFFrFFF # vsXssXXsXsXXXXsXsXsX$") renderLine7(03,"# ## 234 ### I Ig FFFFFFF # vsXXsXssXssssXsXssss$") renderLine7(04,"# ## 5 ### ## I Lg FFFbbFFFFF # G^sssXsXXXXssXsXXXXX$") renderLine7(05,"# D #### ## FFFRFFFFFFFbbFFF t vsXXsXsssssssXssXsss$") renderLine7(06,"# ####B## FFFFFFFFFFFFbbF % t % vsXssXXXssXXXXXsXsXX$") renderLine7(07,"# # FFFFF FF f % %%% %%% vsXXXXssssXsXsXsXsXs$") renderLine7(08,"# ## ####### E FFFFF % % %%%g%%%% %%%%%vsXssssXXsXsssXsssXs$") renderLine7(09,"# C## ####### FFFFF %t%%% x%%%t%%% %%% %%% vsXsXXXXXXXsXXXXsXXs$") renderLine7(10,"# O# FFFF t%% %%%t%%%% g % %t g vsXsXsssXsXssssXsXXs$") renderLine7(11,"# # FFFFF t g g g % % g % vsXsssXsssssXXssssss$") renderLine7(12,"########################################################V$$$$$$$$$$$$$$$$$$$$") if addactors7==1 then r71=enigma.GetNamedObject("r71") r72=enigma.GetNamedObject("r72") r73=enigma.GetNamedObject("r73") r74=enigma.GetNamedObject("r74") r75=enigma.GetNamedObject("r75") AddRubberBand(r71,r73,60,1) AddRubberBand(r72,r73,60,1) AddRubberBand(r74,r73,60,1) AddRubberBand(r75,r73,60,1) AddRubberBand(r71,r72,60,1.41421356) AddRubberBand(r72,r75,60,1.41421356) AddRubberBand(r75,r74,60,1.41421356) AddRubberBand(r74,r71,60,1.41421356) end end function funcc71(value,sender) _posx7=enigma.GetAttrib(sender,"_posx7") _posy7=enigma.GetAttrib(sender,"_posy7") if enigma.GetItem(_posx7+1,_posy7)==nil then set_floor("fl-sand",_posx7+1,_posy7,{burnable=TRUE,eternal=TRUE}) SendMessage(enigma.GetFloor(_posx7+1,_posy7),"setfire") end if enigma.GetItem(_posx7-1,_posy7)==nil then set_floor("fl-sand",_posx7-1,_posy7,{burnable=TRUE,eternal=TRUE}) SendMessage(enigma.GetFloor(_posx7-1,_posy7),"setfire") end if enigma.GetItem(_posx7,_posy7+1)==nil then set_floor("fl-sand",_posx7,_posy7+1,{burnable=TRUE,eternal=TRUE}) SendMessage(enigma.GetFloor(_posx7,_posy7+1),"setfire") end if enigma.GetItem(_posx7,_posy7-1)==nil then set_floor("fl-sand",_posx7,_posy7-1,{burnable=TRUE,eternal=TRUE}) SendMessage(enigma.GetFloor(_posx7,_posy7-1),"setfire") end end make7() function renderLine8( line, pattern) -- Level 8 for i=1, strlen(pattern) do set_floor("fl-mortar",i-1+x8,line+y8) local c = strsub( pattern, i, i) if c =="#" then set_stone( "st-metal", i-1 +x8, line +y8) elseif c =="%" then set_stone( "st-metal", i-1 +x8, line +y8) abyss(i-1 +x8,line +y8) elseif c =="X" then set_stone( "st-death", i-1 +x8, line +y8) elseif c == "*" then set_stone( "st-brownie", i-1 +x8, line +y8) elseif c == "!" then abyss(i-1 +x8,line +y8) elseif c == "^" then abyss(i-1 +x8,line +y8) set_item("it-blackbomb",i-1+x8,line+y8) elseif c == "~" then set_floor("fl-water",i-1 +x8,line +y8) elseif c == "g" then set_stone("st-grate1",i-1+x8,line+y8) elseif c=="+" then set_stone( "st-wood", i-1 +x8, line +y8) elseif c=="=" then set_floor("fl-space",i-1 +x8,line +y8) elseif c=="," then set_item("it-document",i-1+x8,line+y8,{text="A path that circles like a belt around / the base of that high rock runs round the pit, / its sides descending in ten ditches."}) elseif c=="O" then set_item("it-extralife",i-1+x8,line+y8) elseif c=="f" then set_item("it-flagblack",i-1+x8,line+y8) elseif c=="W" then set_item("it-wormhole",i-1 +x8,line +y8,{targetx=3.5+x9,targety=2.5+y9,strength=5,range=8}) elseif c=="z" then set_actor("ac-blackball", i-.5 +x8,line+.5 +y8, {player=0,name="z1"}) elseif c=="b" then -- set_actor("ac-bug", i-.5 +x8,line+.5 +y8) elseif c=="1" then set_floor("fl-bridge",i-1+x8,line+y8,{type="x",name="b81"}) elseif c=="2" then set_floor("fl-bridge",i-1+x8,line+y8,{type="y",name="b82"}) elseif c=="3" then set_floor("fl-bridge",i-1+x8,line+y8,{type="y",name="b83"}) elseif c=="4" then set_floor("fl-bridge",i-1+x8,line+y8,{type="y",name="b84"}) elseif c=="5" then set_floor("fl-bridge",i-1+x8,line+y8,{type="y",name="b85"}) elseif c=="6" then set_floor("fl-bridge",i-1+x8,line+y8,{type="x",name="b86"}) elseif c=="A" then set_stone("st-switch",i-1+x8,line+y8,{action="callback",target="funcc81"}) elseif c=="B" then set_stone("st-switch",i-1+x8,line+y8,{action="callback",target="funcc82"}) elseif c=="C" then set_stone("st-switch",i-1+x8,line+y8,{action="callback",target="funcc83"}) elseif c=="D" then set_stone("st-switch",i-1+x8,line+y8,{action="callback",target="funcc84"}) elseif c=="E" then set_stone("st-switch",i-1+x8,line+y8,{action="callback",target="funcc85"}) elseif c=="F" then set_stone("st-switch",i-1+x8,line+y8,{action="callback",target="funcc86"}) elseif c=="q" then set_item("it-vortex-open",i-1+x8,line+y8,{targetx=47.5+x8,targety=2.5+y8}) elseif c=="Q" then set_item("it-vortex-closed",i-1+x8,line+y8,{targetx=47.5+x8,targety=2.5+y8}) elseif c=="`" then set_stone("st-bombs",i-1+x8,line+y8) elseif c=="w" then set_item("it-whitebomb",i-1+x8,line+y8) elseif c=="s" then set_item("it-seed",i-1+x8,line+y8) elseif c == "c" then set_floor("fl-wood", i-1+x8, line+y8) elseif c == "d" then --1-d set_floor("fl-gradient", i-1+x8, line+y8, {type=1}) elseif c == "u" then --2-u set_floor("fl-gradient", i-1+x8, line+y8, {type=2}) elseif c == "r" then --3-r set_floor("fl-gradient", i-1+x8, line+y8, {type=3}) elseif c == "l" then --4-l set_floor("fl-gradient", i-1+x8, line+y8, {type=4}) elseif c == "1" then --ur set_floor("fl-gradient", i-1+x8, line+y8, {type=11}) elseif c == "3" then --dl set_floor("fl-gradient", i-1+x8, line+y8, {type=9}) elseif c == "7" then --dr set_floor("fl-gradient", i-1+x8, line+y8, {type=12}) elseif c == "9" then --ul set_floor("fl-gradient", i-1+x8, line+y8, {type=10}) elseif c=="U" then set_stone("st-oneway", i-1+x8,line+y8, {orientation=enigma.NORTH}) elseif c=="R" then set_stone("st-oneway", i-1+x8,line+y8, {orientation=enigma.EAST}) elseif c=="@" then set_stone("st-oneway", i-1+x8,line+y8, {orientation=enigma.SOUTH}) elseif c=="L" then set_stone("st-oneway", i-1+x8,line+y8, {orientation=enigma.WEST}) elseif c=="." then set_stone("st-oneway", i-1+x8,line+y8, {orientation=enigma.EAST}) set_item("it-spoon",i-1+x8,line+y8) elseif c=="h" then set_item("it-hammer",i-1+x8,line+y8) elseif c=="H" then set_stone("st-break_acblack",i-1+x8,line+y8) elseif c=="N" then set_stone("st-bug",i-1+x8,line+y8) end end end renderLine8(00,"##################################################################################%%%%%%%#######") renderLine8(01,"# !!! !!! f !!! !!! !!! !!! ccc !!! !!! !!! HNHN!!!!!!!!rrr HW#") renderLine8(02,"# !!! B !!! !!! ccc !!! !!! Q !!! !!! !!! ``!!! NHNH!!!!!!!!rrr HH#") renderLine8(03,"# !!! !!! !!! !!! !!! !!! !!! cccg !!! `O!!! HNHNrrrrdd!!uu!!!!%") renderLine8(04,"# ccc !!! C !!! O !!! !!! 12! !!! * !!! !!! ``!!! b NHNHrrrrdd!!uu!!!!%") renderLine8(05,"# , !!! !!! !!! !!! E !!! !3! !!! !!! ccc `s!!! HNHN!!!!dd!!uull!!%") renderLine8(06,"# !!! !!! !!! !!! !!! F !4! ^^^ !!! w !!! ``!!! !!!!dd!!uull!!%") renderLine8(07,"# !!! !!! ccc !!! !!! !56 !!! !!! !!! `q!!! !!ddll!!!!uu!!%") renderLine8(08,"# !!! !!! !!! !!! ccc !!! !!! ww !!! !!! ``!!! address@hidden@@!!dd!!!!!!uu!!%") renderLine8(09,"# !!! !!! !!! D !!! !!! !!! !!! !!! ^^^ !!! #LR.L!!dd!!!!!!uu!!%") renderLine8(10,"# A !!! ccc !!! !!! !!! !!! !!! ^^^ !!! !!! address@hidden") renderLine8(11,"# !!! !!! !!! !!! !!! !!! ccc !!! !!! !!! RRUhU!!!!!!!!!!!!!!%") renderLine8(12,"#################################################################################%%%%%%%%%%%%%%%") b81=enigma.GetNamedObject("b81") b82=enigma.GetNamedObject("b82") b83=enigma.GetNamedObject("b83") b84=enigma.GetNamedObject("b84") b85=enigma.GetNamedObject("b85") b86=enigma.GetNamedObject("b86") function makeactors8() set_actor("ac-bug",75.5+x8,4+y8) end function funcc81() bridge83() bridge84() end function funcc82() bridge81() bridge82() bridge86() end function funcc83() bridge82() bridge83() end function funcc84() bridge83() bridge84() bridge86() end function funcc85() bridge81() bridge85() end function funcc86() bridge82() bridge84() bridge85() end function bridge81() SendMessage(b81,"openclose") end function bridge82() SendMessage(b82,"openclose") end function bridge83() SendMessage(b83,"openclose") end function bridge84() SendMessage(b84,"openclose") end function bridge85() SendMessage(b85,"openclose") end function bridge86() SendMessage(b86,"openclose") end function renderLine9( line, pattern) -- Level 9 -- Cocytus for i=1, strlen(pattern) do set_floor("fl-ice",i-1+x9,line+y9,{burnable=FALSE}) local c = strsub( pattern, i, i) if c=="#" then set_stone("st-blue-sand",i-1+x9,line+y9) elseif c=="`" then set_stone("st-blue-sand",i-1+x9,line+y9) set_floor("fl-inverse",i-1+x9,line+y9) elseif c=="h" then set_stone("st-blue-sand",i-1+x9,line+y9) set_floor("fl-bluegray",i-1+x9,line+y9) elseif c=="@" then set_stone("st-rock6",i-1+x9,line+y9) elseif c=="^" then set_stone("st-invisible",i-1+x9,line+y9) elseif c=="%" then set_stone("st-invisible",i-1+x9,line+y9) set_floor("fl-floor_001",i-1 +x9,line +y9) elseif c =="H" then set_stone( "st-bumps", i-1 +x9, line +y9) elseif c =="X" then set_stone( "st-death", i-1 +x9, line +y9) elseif c == "*" then set_stone( "st-brownie", i-1 +x9, line +y9) elseif c == "!" then abyss(i-1 +x9,line +y9) elseif c == "?" then set_stone("st-stoneimpulse",i-1+x9,line+y9) elseif c == "~" then set_floor("fl-water",i-1 +x9,line +y9) elseif c == "g" then set_stone("st-grate1",i-1+x9,line+y9) elseif c=="+" then set_stone( "st-wood", i-1 +x9, line +y9) elseif c=="f" then set_stone( "st-actorimpulse_invisible", i-1 +x9, line +y9) elseif c=="t" then set_stone( "st-thief", i-1 +x9, line +y9) elseif c=="=" then set_floor("fl-space",i-1 +x9,line +y9) elseif c=="a" then set_floor("fl-rough",i-1 +x9,line +y9) elseif c=="P" then set_stone("st-blue-sand",i-1+x9,line+y9) set_floor("fl-space",i-1 +x9,line +y9) elseif c=="p" then set_stone("st-blue-sand",i-1+x9,line+y9) abyss(i-1 +x9,line +y9) elseif c=="i" then set_floor("fl-inverse",i-1 +x9,line +y9) elseif c=="c" then set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="C" then set_stone("st-glass",i-1+x9,line+y9) set_floor("fl-space",i-1 +x9,line +y9) elseif c=="d" then set_floor("fl-floor_001",i-1 +x9,line +y9) elseif c=="z" then set_actor("ac-blackball", i-.5 +x9,line+.5 +y9, {player=0,name="z1"}) elseif c=="D" then set_item("it-document",i-1+x9,line+y9,{text="Under my feet I saw a lake / so frozen that it seemed more glass than water. / Never in winter did the Austrian Danube / nor the far-off Don, under its frigid sky, / cover their currents with so thick a veil / as I saw there."}) elseif c=="F" then set_item("it-document",i-1+x9,line+y9,{text="...we made our way toward the center, / where all things that have weight converge, / and I was shivering in the eternal chill..."}) elseif c=="." then set_stone("st-door-h",i-1+x9,line+y9,{name="d91"}) elseif c=="S" then set_stone( "st-swap", i-1 +x9, line +y9) elseif c=="q" then set_stone( "st-scissors", i-1 +x9, line +y9) elseif c=="Z" then set_stone( "st-switch", i-1 +x9, line +y9,{action="callback",target="funcc91"}) elseif c=="Q" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=1}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="W" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=2}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="E" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=3}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="R" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=4}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="T" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=5}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="Y" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=6}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="U" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=7}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="I" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=8}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="O" then set_item( "it-trigger", i-1 +x9, line +y9,{action="callback",target="walls",_posx9=9}) set_floor("fl-bluegray",i-1 +x9,line +y9) elseif c=="A" then set_stone("st-glass",i-1+x9,line+y9) set_actor("ac-blackball", i-.5 +x9,line+.5 +y9, {essential=0,controllers=0,player=1}) elseif c=="B" then set_stone("st-glass",i-1+x9,line+y9) set_actor("ac-whiteball", i-.5 +x9,line+.5 +y9, {essential=0,controllers=0,player=1}) elseif c=="N" then set_stone("st-black4",i-1+x9,line+y9) elseif c==";" then set_item("it-flagblack",i-1+x9,line+y9) elseif c=="&" then set_item("it-extralife",i-1+x9,line+y9) elseif c=="M" then set_stone("st-glass_move",i-1+x9,line+y9) set_item("it-extralife",i-1+x9,line+y9) elseif c=="k" then set_stone("st-knight",i-1+x9,line+y9) elseif c=="_" then set_stone("st-chargeplus",i-1+x9,line+y9) elseif c=="-" then set_stone("st-chargeminus",i-1+x9,line+y9) elseif c=="L" then set_stone("st-chargezero",i-1+x9,line+y9) elseif c=="1" then set_stone("st-timer", i-1+x9,line+y9, {on=0,loop=1, action="callback", target="boss9", interval=8+random(1000)/200,name="t91"}) elseif c=="2" then set_stone("st-timer", i-1+x9,line+y9, {on=0,loop=1, action="callback", target="bosslasertimer", interval=1.6,name="t92"}) elseif c=="3" then set_stone("st-timer", i-1+x9,line+y9, {on=0,loop=1, action="callback", target="bossfiretimer", interval=1,name="t93"}) elseif c=="4" then set_stone("st-timer", i-1+x9,line+y9, {on=0,loop=1, action="callback", target="bossmagnettimer", interval=2,name="t94"}) elseif c=="5" then set_stone("st-timer", i-1+x9,line+y9, {on=0,loop=1, action="callback", target="bossrotortimer", interval=5,name="t95"}) elseif c=="8" then set_item("it-magnet", i-1+x9,line+y9, {strength=15,range=30,name="m91"}) elseif c=="9" then set_item("it-magnet", i-1+x9,line+y9, {strength=15,range=30,name="m92"}) elseif c==">" then set_stone("st-black4",i-1+x9,line+y9) set_item("it-sensor",i-1+x9,line+y9,{action="callback",target="bosson9"}) elseif c=="<" then set_item("it-sensor",i-1+x9,line+y9,{action="callback",target="bossoff9"}) elseif c=="/" then set_item("it-document",i-1+x9,line+y9,{text="The emperor of the woeful kingdom / rose from the ice below his breast, / and I in size am closer to a giant / than giants are when measured to his arms."}) elseif c==":" then set_item("it-document",i-1+x9,line+y9,{text="You refused many times to leave my kingdom -- now you shall pay the consequences for your foolishness!"}) elseif c=="J" then set_floor("fl-bluegreen",i-1+x9,line+y9,{burnable=FALSE}) elseif c=="v" then set_floor("fl-sand",i-1+x9,line+y9) set_actor("ac-whiteball",i-.5+x9,line+y9+.5,{essential=0,controllers=0,player=1}) elseif c=="b" then set_floor("fl-red",i-1+x9,line+y9) set_actor("ac-blackball",i-.5+x9,line+y9+.5,{essential=0,controllers=0,player=1}) elseif c=="n" then set_floor("fl-sahara",i-1+x9,line+y9) set_actor("ac-whiteball-small",i-.5+x9,line+y9+.5,{essential=0,controllers=0,player=1}) elseif c=="j" then set_item("it-hammer",i-1+x9,line+y9) end end end renderLine9(00,"##########################################################") renderLine9(01,"# c H t aaaaa f #") renderLine9(02,"# cc HH F t t HHHHH f #") renderLine9(03,"# D cccS H HHHHH HHHHH f #") renderLine9(04,"# * cccc H t HHHH ^ HHHH #") renderLine9(05,"# ccc H HHH QWERTYUIO ; ^ ^ ^HHH f #") renderLine9(06,"# Hg HHH ccccccccccccc ^ d%d^d HHH #") renderLine9(07,"# HHHH HH ccccccccccccc ^ %ddd%%d%d ^ HH #") renderLine9(08,"# H H cCcccccccccCc ^ dd%ddd%dd^ #") renderLine9(09,"# H H q ccccccccccccc %%d ^ %%dddd H #") renderLine9(10,"# H H ccccccccccccc d%d^ ddd%%d H#") renderLine9(11,"# H H Z ^ ^ ^ddd ^ H#") renderLine9(12,"####H#######H############.##############################H#") renderLine9(13," # # # ") renderLine9(14," # # # ") renderLine9(15," P= # + ==P ") renderLine9(16," P=== # ===P ") renderLine9(17," P==================P ") renderLine9(18," P==================P ") renderLine9(19," p!!!!!!!!!!!!!!!!!!p ") renderLine9(20," `iiiiiiiiiiiiiiiiii` ") renderLine9(21," # # ") renderLine9(22," hicicicicicicicicic` ") renderLine9(23," `cicicicicicicicicih ") renderLine9(24," # ###########################XX########## 12345") renderLine9(25," # # __ 8 #") renderLine9(26," # A B # @ @ #") renderLine9(27," # # @@k@@@@ #") renderLine9(28," # <> @address@hidden@n@ #") renderLine9(29," # M <> JJJ @@address@hidden@@ #") renderLine9(30," # / <> :LJJJ @@@ #") renderLine9(31," # & <> JJJ @@k@ #") renderLine9(32," # <> @k@ #") renderLine9(33," # A # @@@ #") renderLine9(34," # B # k!@ #") renderLine9(35," # # 9 -- !+?@@ #") renderLine9(36," #######################################XX#########N#######") d91=enigma.GetNamedObject("d91") t92=enigma.GetNamedObject("t92") t93=enigma.GetNamedObject("t93") t94=enigma.GetNamedObject("t94") t95=enigma.GetNamedObject("t95") m91=enigma.GetNamedObject("m91") m92=enigma.GetNamedObject("m92") z1=enigma.GetNamedObject("z1") function burnFloor(x,y) if enigma.GetItem(x,y)==nil then set_floor("fl-ice",x,y,{burnable=TRUE,eternal=TRUE}) SendMessage(enigma.GetFloor(x,y),"setfire") else if enigma.GetKind(enigma.GetItem(x,y))~="it-hammer" and enigma.GetKind(enigma.GetItem(x,y))~="it-sword" then set_floor("fl-ice",x,y,{burnable=TRUE,eternal=TRUE}) SendMessage(enigma.GetFloor(x,y),"setfire") end end end fblr=0 function bossrotortimer() if fblr==0 then fblr=1 elseif fblr==1 then set_actor("ac-rotor",69.5+x9,30.5+y9,{force=1,range=30,gohome=0,attacknearest=TRUE,prefercurrent=1}) SendMessage(t95,"off") fblr=2 end end fblm=0 function bossmagnettimer() if fblm==0 then choice=random(3) if choice==1 then SendMessage(m91,"on") elseif choice==2 then SendMessage(m92,"on") elseif choice==3 then SendMessage(m91,"on") SendMessage(m92,"on") end fblm=1 elseif fblm==1 then fblm=2 elseif fblm==2 then fblm=3 elseif fblm==3 then SendMessage(m91,"off") SendMessage(m92,"off") SendMessage(t94,"off") fblm=0 end end fblf=0 xxf=0 yyf=0 function bossfiretimer() if fblf==0 then xxf,yyf=enigma.GetPos(z1) burnFloor(xxf+2,yyf-2) burnFloor(xxf+2,yyf-1) burnFloor(xxf+2,yyf) burnFloor(xxf+2,yyf+1) burnFloor(xxf+2,yyf+2) burnFloor(xxf-2,yyf-2) burnFloor(xxf-2,yyf-1) burnFloor(xxf-2,yyf) burnFloor(xxf-2,yyf+1) burnFloor(xxf-2,yyf+2) burnFloor(xxf-1,yyf+2) burnFloor(xxf,yyf+2) burnFloor(xxf+1,yyf+2) burnFloor(xxf-1,yyf-2) burnFloor(xxf,yyf-2) burnFloor(xxf+1,yyf-2) fblf=1 elseif fblf==1 then fblf=2 elseif fblf==2 then fblf=3 elseif fblf==3 then fill_floor("fl-ice",xxf-3,yyf-3,7,7) for i=62+x9,64+x9 do for j=29+y9,31+y9 do set_floor("fl-bluegreen",i,j,{burnable=FALSE}) end end for i=xxf-2,xxf+2 do for j=yyf-2,yyf+2 do if i~=xxf or j~=yyf then if enigma.GetItem(i,j)~=nil then if enigma.GetKind(enigma.GetItem(i,j))~="it-hammer" and enigma.GetKind(enigma.GetItem(i,j))~="it-sword" and enigma.GetKind(enigma.GetItem(i,j))~="it-extralife" and enigma.GetKind(enigma.GetItem(i,j))~="it-flagblack" then enigma.KillItem(i,j) end end end end end SendMessage(t93,"off") fblf=0 end end fblt=0 xxl=0 yyl=0 function bosslasertimer() if fblt==0 then xcoord,yyl=enigma.GetPos(z1) if yyl>=26+y9 and yyl<=33+y9 then choice=random(3) if choice==1 then yyl=yyl-y9-25 else yyl=random(8) end else yyl=random(8) end if yyl==2 or yyl==3 or yyl==4 then xxl=1 end if yyl==6 then xxl=2 end if yyl==1 or yyl==5 or yyl==7 or yyl==8 then xxl=3 end set_stone("st-laser-w",67+xxl+x9,25+yyl+y9,{name="l91"}) fblt=1 elseif fblt==1 then SendMessage(enigma.GetNamedObject("l91"),"on") fblt=2 elseif fblt==2 then SendMessage(enigma.GetNamedObject("l91"),"off") fblt=3 elseif fblt==3 then enigma.KillStone(67+xxl+x9,25+yyl+y9) set_stone("st-rock6",67+xxl+x9,25+yyl+y9) SendMessage(t92,"off") fblt=0 end end ison9=0 juststarting=1 function bosson9() if juststarting==1 then bossrotor() juststarting=0 end if ison9==0 then SendMessage(enigma.GetNamedObject("t91"),"on") ison9=1 end end function bossoff9() if ison9==1 then SendMessage(enigma.GetNamedObject("t91"),"off") ison9=0 end end function boss9() xz,yz=enigma.GetPos(z1) if xz<=53+x9 or yz<=24+y9 or yz>=36+y9 then bossoff9() else if xz>=66+x9 then choice=random(2) if choice==1 then bosslaser() elseif choice==2 then bossmagnet() end else choice=random(3) if choice==1 then bosslaser() elseif choice==2 then bossfire() elseif choice==3 then bossmagnet() end end enigma.KillStone(78+x9,24+y9) interval9=6+random(1000)/250 set_stone("st-timer", 78+x9,24+y9, {on=1,loop=1, action="callback", target="boss9", interval=interval9,name="t91"}) end end function bosslaser() SendMessage(t92,"on") end function bossfire() SendMessage(t93,"on") end function bossmagnet() SendMessage(t94,"on") end function bossrotor() SendMessage(t95,"on") end prev9=0 ffw9=0 function walls(value,sender) if ffw9==0 then _posx9=enigma.GetAttrib(sender,"_posx9") if prev9==0 then prev9=_posx9 else local stonetype9=enigma.GetKind(enigma.GetStone(23+x9+prev9,8+y9)) local stonetype92=enigma.GetKind(enigma.GetStone(23+x9+_posx9,8+y9)) set_stone(stonetype92,23+x9+prev9,8+y9) set_stone(stonetype9,23+x9+_posx9,8+y9) if stonetype9=="st-bolder" then enigma.SetAttrib(enigma.GetStone(23+x9+_posx9,8+y9),"direction",WEST) end if stonetype92=="st-bolder" then enigma.SetAttrib(enigma.GetStone(23+x9+prev9,8+y9),"direction",WEST) end if stonetype9=="st-rubberband" then enigma.SetAttrib(enigma.GetStone(23+x9+_posx9,8+y9),"length",5) enigma.SetAttrib(enigma.GetStone(23+x9+_posx9,8+y9),"strength",5) end if stonetype92=="st-rubberband" then enigma.SetAttrib(enigma.GetStone(23+x9+prev9,8+y9),"length",5) enigma.SetAttrib(enigma.GetStone(23+x9+prev9,8+y9),"strength",5) end setDocuments9() prev9=0 end ffw9=1 elseif ffw9==1 then ffw9=0 end end function setDocuments9() for i=24+x9,32+x9 do local stonetype93=enigma.GetKind(enigma.GetStone(i,8+y9)) text="" if stonetype93=="st-rubberband" then text9="Faithlessness" elseif stonetype93=="st-rock5" then text9="Lust" elseif stonetype93=="st-rock7" then text9="Gluttony" elseif stonetype93=="st-bolder" then text9="Avarice" elseif stonetype93=="st-greenbrown" then text9="Sloth" elseif stonetype93=="st-rock1" then text9="Heresy" elseif stonetype93=="st-redrock" then text9="Violence" elseif stonetype93=="st-metal" then text9="Fraud" elseif stonetype93=="st-blue-sand" then text9="Treachery" end set_item("it-document",i,9+y9,{text=text9}) end end function setup9() randomPlace("st-rubberband",9,23+x9,8+y9) randomPlace("st-rock5",8,23+x9,8+y9) randomPlace("st-rock7",7,23+x9,8+y9) randomPlace("st-bolder",6,23+x9,8+y9) randomPlace("st-greenbrown",5,23+x9,8+y9) randomPlace("st-rock1",4,23+x9,8+y9) randomPlace("st-redrock",3,23+x9,8+y9) randomPlace("st-metal",2,23+x9,8+y9) randomPlace("st-blue-sand",1,23+x9,8+y9) setDocuments9() end function randomPlace(type,num,x,y) p=random(num) i=1 count=0 while i<=p do count=count+1 if enigma.GetStone(count+x,y)==nil then i=i+1 end end set_stone(type,count+x,y) if type=="st-bolder" then enigma.SetAttrib(enigma.GetStone(count+x,y),"direction",WEST) end if type=="st-rubberband" then enigma.SetAttrib(enigma.GetStone(count+x,y),"length",5) enigma.SetAttrib(enigma.GetStone(count+x,y),"strength",5) end end function funcc91() setDocuments9() dx9=23+x9 dy9=8+y9 if enigma.GetKind(enigma.GetStone(dx9+1,dy9))=="st-rubberband" and enigma.GetKind(enigma.GetStone(dx9+2,dy9))=="st-rock5" and enigma.GetKind(enigma.GetStone(dx9+3,dy9))=="st-rock7" and enigma.GetKind(enigma.GetStone(dx9+4,dy9))=="st-bolder" and enigma.GetKind(enigma.GetStone(dx9+5,dy9))=="st-greenbrown" and enigma.GetKind(enigma.GetStone(dx9+6,dy9))=="st-rock1" and enigma.GetKind(enigma.GetStone(dx9+7,dy9))=="st-redrock" and enigma.GetKind(enigma.GetStone(dx9+8,dy9))=="st-metal" and enigma.GetKind(enigma.GetStone(dx9+9,dy9))=="st-blue-sand" then SendMessage(d91,"openclose") end end setup9() function renderLineo( line, pattern) -- Finish for i=1, strlen(pattern) do set_floor("fl-gravel",i-1+xo,line+yo) local c = strsub( pattern, i, i) if c =="#" then set_stone( "st-rock8", i-1 +xo, line +yo) elseif c =="@" then set_stone( "st-rock6", i-1 +xo, line +yo) elseif c =="I" then set_stone( "st-invisible", i-1 +xo, line +yo) set_floor("fl-space",i-1 +xo,line +yo) elseif c == "o" then oxyd( i-1+xo, line+yo) set_floor("fl-leaves",i-1+xo,line+yo) elseif c =="X" then set_stone( "st-death", i-1 +xo, line +yo) elseif c == "*" then set_stone( "st-brownie", i-1 +xo, line +yo) elseif c == "l" then set_floor("fl-leaves",i-1+xo,line+yo) elseif c == "!" then abyss(i-1 +xo,line +yo) elseif c == "~" then set_floor("fl-water",i-1 +xo,line +yo) elseif c == "g" then set_stone("st-grate1",i-1+xo,line+yo) elseif c=="+" then set_stone( "st-wood", i-1 +xo, line +yo) elseif c=="=" then set_floor("fl-space",i-1 +xo,line +yo) elseif c == "D" then set_item("it-document",i-1+xo,line+yo,{text="...passed the point / to which all weights are drawn from every side."}) elseif c == "E" then set_item("it-document",i-1+xo,line+yo,{text="...climbed up.... far enough to see, through a round opening, / a few of those fair things the heavens bear. / Then we came forth, to see again the stars."}) elseif c=="0" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="prepareforgravity"}) elseif c=="1" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=40}) elseif c=="2" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=30}) elseif c=="3" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=20}) elseif c=="4" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=10}) elseif c=="5" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=0}) elseif c=="6" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=-10}) elseif c=="7" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=-20}) elseif c=="8" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=-30}) elseif c=="9" then set_item("it-sensor",i-1+xo,line+yo,{action="callback",target="funcco",_gravity=-40}) end end end renderLineo(01,"#####################################################################0@@#####") renderLineo(02,"####################################################################11@@#####") renderLineo(03,"#################################################################### @@#####") renderLineo(04,"#################################################################### @@@#####") renderLineo(05,"#################################################################### @ @#####") renderLineo(06,"#################################################################### @ @#####") renderLineo(07,"#################################################################### ######") renderLineo(08,"#################################################################### ######") renderLineo(09,"####################################################################222######") renderLineo(10,"#################################################################### ######") renderLineo(11,"#################################################################### ######") renderLineo(12,"#################################################################### ######") renderLineo(13,"####################################################################333######") renderLineo(14,"#################################################################### ######") renderLineo(15,"#################################################################### ######") renderLineo(16,"####################################################################444######") renderLineo(17,"#################################################################### ######") renderLineo(18,"####################################################################555######") renderLineo(19,"#################################################################### D ######") renderLineo(20,"####################################################################666######") renderLineo(21,"#################################################################### ######") renderLineo(22,"#################################################################### ######") renderLineo(23,"####################################################################777######") renderLineo(24,"#################################################################### ######") renderLineo(25,"#################################################################### ######") renderLineo(26,"#################################################################### ######") renderLineo(27,"####################################################################888######") renderLineo(28,"#################################################################### ######") renderLineo(29,"#################################################################### ######") renderLineo(30,"#################################################################### ######") renderLineo(31,"#################################################################### E ######") renderLineo(32,"#################################################################### ######") renderLineo(33,"#################################################################### ######") renderLineo(34,"####################################################################999######") renderLineo(35,"#################################################################### ######") renderLineo(36,"#################################################################### ######") renderLineo(37,"#########################################################I==================I") renderLineo(38,"#########################################################I==================I") renderLineo(39,"#########################################################I==llllllllllllll==I") renderLineo(40,"#########################################################I==lollllllllllol==I") renderLineo(41,"#########################################################I==llllllllllllll==I") renderLineo(42,"#########################################################I==llllllllllllll==I") renderLineo(43,"#########################################################I==llllllllllllll==I") renderLineo(44,"#########################################################I==lollllllllllol==I") renderLineo(45,"#########################################################I==llllllllllllll==I") renderLineo(46,"#########################################################I==================I") renderLineo(47,"#########################################################I==================I") renderLineo(48,"#########################################################IIIIIIIIIIIIIIIIIIII") function funcco(value,sender) _gravity=enigma.GetAttrib(sender,"_gravity") enigma.AddConstantForce(0,_gravity) end fpo=0 function prepareforgravity() if fpo==0 then set_stone("st-rock1",42 +x6,29 +y6) set_stone("st-rock1",46 +x6,34 +y6) set_stone("st-rock1",50 +x6,29 +y6) set_stone("st-rock6",71 +x9,35 +y9) fpo=1 end end oxyd_shuffle() ]]>