home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / duffy19.lua < prev    next >
Text File  |  2003-08-27  |  16KB  |  1,021 lines

  1. levelw=25
  2. levelh=15
  3.  
  4. create_world( levelw, levelh)
  5.  
  6. fill_floor("fl-hay",0,0,levelw,levelh)
  7.  
  8. function renderLine( line, pattern)
  9.     for i=1, strlen(pattern) do
  10.         local c = strsub( pattern, i, i)
  11.         if c =="#" then
  12.             set_stone( "st-greenbrown", i-1, line)
  13.         elseif c =="r" then
  14.             set_stone( "st-invisible", i-1, line)
  15.            abyss(i-1,line)
  16.         elseif c == "o" then
  17.             oxyd( i-1, line)
  18.         elseif c =="." then
  19.            set_floor( "fl-hay", i-1, line)
  20.            -- Mark original positions of abysses
  21.         elseif c=="z" then
  22.             set_actor("ac-blackball", i-.5,line+.5, {player=0, mouseforce=1})
  23. end
  24.     end    
  25. end
  26.  
  27. -- Floor:  " "
  28. -- Border: "#"
  29. -- Oxyd:   "o"
  30.  
  31. renderLine(00,"####o##########o####")
  32. renderLine(01,"#                  #")
  33. renderLine(02,"o ................ o")
  34. renderLine(03,"#                  #")
  35. renderLine(04,"o   .............. o")
  36. renderLine(05,"#   .              #")
  37. renderLine(06,"o   .              o")
  38. renderLine(07,"#           ..     #")
  39. renderLine(08,"o            .     o")
  40. renderLine(09,"#            .  z  #")
  41. renderLine(10,"o ............     o")
  42. renderLine(11,"#                  #")
  43. renderLine(12,"####o##########o####")
  44.  
  45. oxyd_shuffle()
  46.  
  47.  
  48. s0x=17
  49. s0y=2
  50. s1x=16
  51. s1y=2
  52. s2x=15
  53. s2y=2
  54. s3x=14
  55. s3y=2
  56. s4x=13
  57. s4y=2
  58. s5x=12
  59. s5y=2
  60. s6x=11
  61. s6y=2
  62. s7x=10
  63. s7y=2
  64. s8x=9
  65. s8y=2
  66. s9x=8
  67. s9y=2
  68. sax=7
  69. say=2
  70. sbx=6
  71. sby=2
  72. scx=5
  73. scy=2
  74. sdx=4
  75. sdy=2
  76. sjx=3
  77. sjy=2
  78. skx=2
  79. sky=2
  80.  
  81. px=2
  82.  
  83.  
  84. s0x2=2
  85. s0y2=10
  86. s1x2=3
  87. s1y2=10
  88. s2x2=4
  89. s2y2=10
  90. s3x2=5
  91. s3y2=10
  92. s4x2=6
  93. s4y2=10
  94. s5x2=7
  95. s5y2=10
  96. s6x2=8
  97. s6y2=10
  98. s7x2=9
  99. s7y2=10
  100. s8x2=10
  101. s8y2=10
  102. s9x2=11
  103. s9y2=10
  104. sax2=12
  105. say2=10
  106. sbx2=13
  107. sby2=10
  108. scx2=13
  109. scy2=9
  110. sdx2=13
  111. sdy2=8
  112. sjx2=13
  113. sjy2=7
  114. skx2=12
  115. sky2=7
  116.  
  117. px2=4
  118.  
  119.  
  120. s0x3=4
  121. s0y3=6
  122. s1x3=4
  123. s1y3=5
  124. s2x3=4
  125. s2y3=4
  126. s3x3=5
  127. s3y3=4
  128. s4x3=6
  129. s4y3=4
  130. s5x3=7
  131. s5y3=4
  132. s6x3=8
  133. s6y3=4
  134. s7x3=9
  135. s7y3=4
  136. s8x3=10
  137. s8y3=4
  138. s9x3=11
  139. s9y3=4
  140. sax3=12
  141. say3=4
  142. sbx3=13
  143. sby3=4
  144. scx3=14
  145. scy3=4
  146. sdx3=15
  147. sdy3=4
  148. sjx3=16
  149. sjy3=4
  150. skx3=17
  151. sky3=4
  152.  
  153. px3=3
  154.  
  155.  
  156. set_floor( "fl-abyss", s0x, s0y)
  157. set_floor( "fl-abyss", s1x, s1y)
  158. set_floor( "fl-abyss", s2x, s2y)
  159. set_floor( "fl-abyss", s3x, s3y)
  160. set_floor( "fl-abyss", s4x, s4y)
  161. set_floor( "fl-abyss", s5x, s5y)
  162. set_floor( "fl-abyss", s6x, s6y)
  163. set_floor( "fl-abyss", s7x, s7y)
  164. set_floor( "fl-abyss", s8x, s8y)
  165. set_floor( "fl-abyss", s9x, s9y)
  166. set_floor( "fl-abyss", sax, say)
  167. set_floor( "fl-abyss", sbx, sby)
  168. set_floor( "fl-abyss", scx, scy)
  169. set_floor( "fl-abyss", sdx, sdy)
  170. set_floor( "fl-abyss", sjx, sjy)
  171. set_floor( "fl-abyss", skx, sky)
  172.  
  173.  
  174. set_floor( "fl-abyss", s0x2, s0y2)
  175. set_floor( "fl-abyss", s1x2, s1y2)
  176. set_floor( "fl-abyss", s2x2, s2y2)
  177. set_floor( "fl-abyss", s3x2, s3y2)
  178. set_floor( "fl-abyss", s4x2, s4y2)
  179. set_floor( "fl-abyss", s5x2, s5y2)
  180. set_floor( "fl-abyss", s6x2, s6y2)
  181. set_floor( "fl-abyss", s7x2, s7y2)
  182. set_floor( "fl-abyss", s8x2, s8y2)
  183. set_floor( "fl-abyss", s9x2, s9y2)
  184. set_floor( "fl-abyss", sax2, say2)
  185. set_floor( "fl-abyss", sbx2, sby2)
  186. set_floor( "fl-abyss", scx2, scy2)
  187. set_floor( "fl-abyss", sdx2, sdy2)
  188. set_floor( "fl-abyss", sjx2, sjy2)
  189. set_floor( "fl-abyss", skx2, sky2)
  190.  
  191.  
  192. set_floor( "fl-abyss", s0x3, s0y3)
  193. set_floor( "fl-abyss", s1x3, s1y3)
  194. set_floor( "fl-abyss", s2x3, s2y3)
  195. set_floor( "fl-abyss", s3x3, s3y3)
  196. set_floor( "fl-abyss", s4x3, s4y3)
  197. set_floor( "fl-abyss", s5x3, s5y3)
  198. set_floor( "fl-abyss", s6x3, s6y3)
  199. set_floor( "fl-abyss", s7x3, s7y3)
  200. set_floor( "fl-abyss", s8x3, s8y3)
  201. set_floor( "fl-abyss", s9x3, s9y3)
  202. set_floor( "fl-abyss", sax3, say3)
  203. set_floor( "fl-abyss", sbx3, sby3)
  204. set_floor( "fl-abyss", scx3, scy3)
  205. set_floor( "fl-abyss", sdx3, sdy3)
  206. set_floor( "fl-abyss", sjx3, sjy3)
  207. set_floor( "fl-abyss", skx3, sky3)
  208.  
  209.  
  210. function timer_callback()
  211.  
  212. set_floor( "fl-hay", skx, sky)
  213. set_floor( "fl-hay", skx2, sky2)
  214. set_floor( "fl-hay", skx3, sky3)
  215.  
  216. if s0x<2 then
  217.    if s0y<2 then
  218.       x=random(2)
  219.       if x==1 then
  220.      x=2
  221.       elseif x==2 then
  222.      x=3
  223.       end
  224.    elseif s0y>10 then
  225.       x=random(2)
  226.       if x==1 then
  227.      x=1
  228.       elseif x==2 then
  229.      x=2
  230.       end
  231.    else
  232.       x=random(3)
  233.       if x==1 then
  234.      x=1
  235.       elseif x==2 then
  236.      x=2
  237.       elseif x==3 then
  238.      x=3
  239.       end
  240.    end
  241. elseif s0x>17 then
  242.    if s0y<2 then
  243.       x=random(2)
  244.       if x==1 then
  245.      x=3
  246.       elseif x==2 then
  247.      x=4
  248.       end
  249.    elseif s0y>10 then
  250.       x=random(2)
  251.       if x==1 then
  252.      x=1
  253.       elseif x==2 then
  254.      x=4
  255.       end
  256.    else
  257.       x=random(3)
  258.       if x==1 then
  259.      x=1
  260.       elseif x==2 then
  261.      x=3
  262.       elseif x==3 then
  263.      x=4
  264.       end
  265.    end
  266. else
  267.    if s0y<2 then
  268.       x=random(3)
  269.       if x==1 then
  270.      x=2
  271.       elseif x==2 then
  272.      x=3
  273.       elseif x==3 then
  274.      x=4
  275.       end
  276.    elseif s0y>10 then
  277.       x=random(3)
  278.       if x==1 then
  279.      x=1
  280.       elseif x==2 then
  281.      x=2
  282.       elseif x==3 then
  283.      x=4
  284.       end
  285.    else
  286.       x=random(4)
  287.       if x==1 then
  288.      x=1
  289.       elseif x==2 then
  290.      x=2
  291.       elseif x==3 then
  292.      x=3
  293.       elseif x==4 then
  294.      x=4
  295.       end
  296.    end
  297. end
  298.  
  299. skx=sjx
  300. sky=sjy
  301. sjx=sdx
  302. sjy=sdy
  303. sdx=scx
  304. sdy=scy
  305. scx=sbx
  306. scy=sby
  307. sbx=sax
  308. sby=say
  309. sax=s9x
  310. say=s9y
  311. s9x=s8x
  312. s9y=s8y
  313. s8x=s7x
  314. s8y=s7y
  315. s7x=s6x
  316. s7y=s6y
  317. s6x=s5x
  318. s6y=s5y
  319. s5x=s4x
  320. s5y=s4y
  321. s4x=s3x
  322. s4y=s3y
  323. s3x=s2x
  324. s3y=s2y
  325. s2x=s1x
  326. s2y=s1y
  327. s1x=s0x
  328. s1y=s0y
  329.  
  330. if x==1 then
  331.    if px==3 and s0y<11 then
  332.       s0y=s0y+1
  333.       px=3
  334.    else
  335.       if px==3 then
  336.      x=random(2)
  337.      if x==1 then
  338.         if s0x<18 then
  339.            s0x=s0x+1
  340.            px=2
  341.         else
  342.            s0x=s0x-1
  343.            px=4
  344.         end
  345.      elseif x==2 then
  346.         if s0x>1 then
  347.            s0x=s0x-1
  348.            px=4
  349.         else
  350.            s0x=s0x+1
  351.            px=2
  352.         end
  353.      end
  354.       else
  355.      s0y=s0y-1
  356.      px=1
  357.       end
  358.    end
  359. elseif x==2 then
  360.    if px==4 and s0x>1 then
  361.       s0x=s0x-1
  362.       px=4
  363.    else
  364.       if px==4 then
  365.      x=random(2)
  366.      if x==1 then
  367.         if s0y>1 then
  368.            s0y=s0y-1
  369.            px=1
  370.         else
  371.            s0y=s0y+1
  372.            px=3
  373.         end
  374.      elseif x==2 then
  375.         if s0y<11 then
  376.            s0y=s0y+1
  377.            px=3
  378.         else
  379.            s0y=s0y-1
  380.            px=1
  381.         end
  382.      end
  383.       else
  384.      s0x=s0x+1
  385.      px=2
  386.       end
  387.    end
  388. elseif x==3 then
  389.    if px==1 and s0y>1 then
  390.       s0y=s0y-1
  391.       px=1
  392.    else
  393.       if px==1 then
  394.      x=random(2)
  395.      if x==1 then
  396.         if s0x<18 then
  397.            s0x=s0x+1
  398.            px=2
  399.         else
  400.            s0x=s0x-1
  401.            px=4
  402.         end
  403.      elseif x==2 then
  404.         if s0x>1 then
  405.            s0x=s0x-1
  406.            px=4
  407.         else
  408.            s0x=s0x+1
  409.            px=2
  410.         end
  411.      end
  412.       else
  413.      s0y=s0y+1
  414.      px=3
  415.       end
  416.    end
  417. elseif x==4 then
  418.    if px==2 and s0x<18 then
  419.       s0x=s0x+1
  420.       px=2
  421.    else
  422.       if px==2 then
  423.      x=random(2)
  424.      if x==1 then
  425.         if s0y>1 then
  426.            s0y=s0y-1
  427.            px=1
  428.         else
  429.            s0y=s0y+1
  430.            px=3
  431.         end
  432.      elseif x==2 then
  433.         if s0y<11 then
  434.            s0y=s0y+1
  435.            px=3
  436.         else
  437.            s0y=s0y-1
  438.            px=1
  439.         end
  440.      end
  441.       else
  442.      s0x=s0x-1
  443.      px=4
  444.       end
  445.    end
  446. end
  447.  
  448. set_floor( "fl-abyss", s0x, s0y)
  449. set_floor( "fl-abyss", s1x, s1y)
  450. set_floor( "fl-abyss", s2x, s2y)
  451. set_floor( "fl-abyss", s3x, s3y)
  452. set_floor( "fl-abyss", s4x, s4y)
  453. set_floor( "fl-abyss", s5x, s5y)
  454. set_floor( "fl-abyss", s6x, s6y)
  455. set_floor( "fl-abyss", s7x, s7y)
  456. set_floor( "fl-abyss", s8x, s8y)
  457. set_floor( "fl-abyss", s9x, s9y)
  458. set_floor( "fl-abyss", sax, say)
  459. set_floor( "fl-abyss", sbx, sby)
  460. set_floor( "fl-abyss", scx, scy)
  461. set_floor( "fl-abyss", sdx, sdy)
  462. set_floor( "fl-abyss", sjx, sjy)
  463. set_floor( "fl-abyss", skx, sky)
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475. if s0x2<2 then
  476.    if s0y2<2 then
  477.       x2=random(2)
  478.       if x2==1 then
  479.      x2=2
  480.       elseif x2==2 then
  481.      x2=3
  482.       end
  483.    elseif s0y2>10 then
  484.       x2=random(2)
  485.       if x2==1 then
  486.      x2=1
  487.       elseif x2==2 then
  488.      x2=2
  489.       end
  490.    else
  491.       x2=random(3)
  492.       if x2==1 then
  493.      x2=1
  494.       elseif x2==2 then
  495.      x2=2
  496.       elseif x2==3 then
  497.      x2=3
  498.       end
  499.    end
  500. elseif s0x2>17 then
  501.    if s0y2<2 then
  502.       x2=random(2)
  503.       if x2==1 then
  504.      x2=3
  505.       elseif x2==2 then
  506.      x2=4
  507.       end
  508.    elseif s0y2>10 then
  509.       x2=random(2)
  510.       if x2==1 then
  511.      x2=1
  512.       elseif x2==2 then
  513.      x2=4
  514.       end
  515.    else
  516.       x2=random(3)
  517.       if x2==1 then
  518.      x2=1
  519.       elseif x2==2 then
  520.      x2=3
  521.       elseif x2==3 then
  522.      x2=4
  523.       end
  524.    end
  525. else
  526.    if s0y2<2 then
  527.       x2=random(3)
  528.       if x2==1 then
  529.      x2=2
  530.       elseif x2==2 then
  531.      x2=3
  532.       elseif x2==3 then
  533.      x2=4
  534.       end
  535.    elseif s0y2>10 then
  536.       x2=random(3)
  537.       if x2==1 then
  538.      x2=1
  539.       elseif x2==2 then
  540.      x2=2
  541.       elseif x2==3 then
  542.      x2=4
  543.       end
  544.    else
  545.       x2=random(4)
  546.       if x2==1 then
  547.      x2=1
  548.       elseif x2==2 then
  549.      x2=2
  550.       elseif x2==3 then
  551.      x2=3
  552.       elseif x2==4 then
  553.      x2=4
  554.       end
  555.    end
  556. end
  557.  
  558. skx2=sjx2
  559. sky2=sjy2
  560. sjx2=sdx2
  561. sjy2=sdy2
  562. sdx2=scx2
  563. sdy2=scy2
  564. scx2=sbx2
  565. scy2=sby2
  566. sbx2=sax2
  567. sby2=say2
  568. sax2=s9x2
  569. say2=s9y2
  570. s9x2=s8x2
  571. s9y2=s8y2
  572. s8x2=s7x2
  573. s8y2=s7y2
  574. s7x2=s6x2
  575. s7y2=s6y2
  576. s6x2=s5x2
  577. s6y2=s5y2
  578. s5x2=s4x2
  579. s5y2=s4y2
  580. s4x2=s3x2
  581. s4y2=s3y2
  582. s3x2=s2x2
  583. s3y2=s2y2
  584. s2x2=s1x2
  585. s2y2=s1y2
  586. s1x2=s0x2
  587. s1y2=s0y2
  588.  
  589.  
  590.  
  591.  
  592. if x2==1 then
  593.    if px2==3 and s0y2<11 then
  594.       s0y2=s0y2+1
  595.       px2=3
  596.    else
  597.       if px2==3 then
  598.      x2=random(2)
  599.      if x2==1 then
  600.         if s0x2<18 then
  601.            s0x2=s0x2+1
  602.            px2=2
  603.         else
  604.            s0x2=s0x2-1
  605.            px2=4
  606.         end
  607.      elseif x2==2 then
  608.         if s0x2>1 then
  609.            s0x2=s0x2-1
  610.            px2=4
  611.         else
  612.            s0x2=s0x2+1
  613.            px2=2
  614.         end
  615.      end
  616.       else
  617.      s0y2=s0y2-1
  618.      px2=1
  619.       end
  620.    end
  621. elseif x2==2 then
  622.    if px2==4 and s0x2>1 then
  623.       s0x2=s0x2-1
  624.       px2=4
  625.    else
  626.       if px2==4 then
  627.      x2=random(2)
  628.      if x2==1 then
  629.         if s0y2>1 then
  630.            s0y2=s0y2-1
  631.            px2=1
  632.         else
  633.            s0y2=s0y2+1
  634.            px2=3
  635.         end
  636.      elseif x2==2 then
  637.         if s0y2<11 then
  638.            s0y2=s0y2+1
  639.            px2=3
  640.         else
  641.            s0y2=s0y2-1
  642.            px2=1
  643.         end
  644.      end
  645.       else
  646.      s0x2=s0x2+1
  647.      px2=2
  648.       end
  649.    end
  650. elseif x2==3 then
  651.    if px2==1 and s0y2>1 then
  652.       s0y2=s0y2-1
  653.       px2=1
  654.    else
  655.       if px2==1 then
  656.      x2=random(2)
  657.      if x2==1 then
  658.         if s0x2<18 then
  659.            s0x2=s0x2+1
  660.            px2=2
  661.         else
  662.            s0x2=s0x2-1
  663.            px2=4
  664.         end
  665.      elseif x2==2 then
  666.         if s0x2>1 then
  667.            s0x2=s0x2-1
  668.            px2=4
  669.         else
  670.            s0x2=s0x2+1
  671.            px2=2
  672.         end
  673.      end
  674.       else
  675.      s0y2=s0y2+1
  676.      px2=3
  677.       end
  678.    end
  679. elseif x2==4 then
  680.    if px2==2 and s0x2<18 then
  681.       s0x2=s0x2+1
  682.       px2=2
  683.    else
  684.       if px2==2 then
  685.      x2=random(2)
  686.      if x2==1 then
  687.         if s0y2>1 then
  688.            s0y2=s0y2-1
  689.            px2=1
  690.         else
  691.            s0y2=s0y2+1
  692.            px2=3
  693.         end
  694.      elseif x2==2 then
  695.         if s0y2<11 then
  696.            s0y2=s0y2+1
  697.            px2=3
  698.         else
  699.            s0y2=s0y2-1
  700.            px2=1
  701.         end
  702.      end
  703.       else
  704.      s0x2=s0x2-1
  705.      px2=4
  706.       end
  707.    end
  708. end
  709.  
  710.  
  711.  
  712.  
  713.  
  714. set_floor( "fl-abyss", s0x2, s0y2)
  715. set_floor( "fl-abyss", s1x2, s1y2)
  716. set_floor( "fl-abyss", s2x2, s2y2)
  717. set_floor( "fl-abyss", s3x2, s3y2)
  718. set_floor( "fl-abyss", s4x2, s4y2)
  719. set_floor( "fl-abyss", s5x2, s5y2)
  720. set_floor( "fl-abyss", s6x2, s6y2)
  721. set_floor( "fl-abyss", s7x2, s7y2)
  722. set_floor( "fl-abyss", s8x2, s8y2)
  723. set_floor( "fl-abyss", s9x2, s9y2)
  724. set_floor( "fl-abyss", sax2, say2)
  725. set_floor( "fl-abyss", sbx2, sby2)
  726. set_floor( "fl-abyss", scx2, scy2)
  727. set_floor( "fl-abyss", sdx2, sdy2)
  728. set_floor( "fl-abyss", sjx2, sjy2)
  729. set_floor( "fl-abyss", skx2, sky2)
  730.  
  731.  
  732.  
  733.  
  734.  
  735.  
  736.  
  737.  
  738.  
  739.  
  740.  
  741.  
  742.  
  743.  
  744.  
  745.  
  746.  
  747.  
  748.  
  749.  
  750. if s0x3<2 then
  751.    if s0y3<2 then
  752.       x3=random(2)
  753.       if x3==1 then
  754.      x3=2
  755.       elseif x3==2 then
  756.      x3=3
  757.       end
  758.    elseif s0y3>10 then
  759.       x3=random(2)
  760.       if x3==1 then
  761.      x3=1
  762.       elseif x3==2 then
  763.      x3=2
  764.       end
  765.    else
  766.       x3=random(3)
  767.       if x3==1 then
  768.      x3=1
  769.       elseif x3==2 then
  770.      x3=2
  771.       elseif x3==3 then
  772.      x3=3
  773.       end
  774.    end
  775. elseif s0x3>17 then
  776.    if s0y3<2 then
  777.       x3=random(2)
  778.       if x3==1 then
  779.      x3=3
  780.       elseif x3==2 then
  781.      x3=4
  782.       end
  783.    elseif s0y3>10 then
  784.       x3=random(2)
  785.       if x3==1 then
  786.      x3=1
  787.       elseif x3==2 then
  788.      x3=4
  789.       end
  790.    else
  791.       x3=random(3)
  792.       if x3==1 then
  793.      x3=1
  794.       elseif x3==2 then
  795.      x3=3
  796.       elseif x3==3 then
  797.      x3=4
  798.       end
  799.    end
  800. else
  801.    if s0y3<2 then
  802.       x3=random(3)
  803.       if x3==1 then
  804.      x3=2
  805.       elseif x3==2 then
  806.      x3=3
  807.       elseif x3==3 then
  808.      x3=4
  809.       end
  810.    elseif s0y3>10 then
  811.       x3=random(3)
  812.       if x3==1 then
  813.      x3=1
  814.       elseif x3==2 then
  815.      x3=2
  816.       elseif x3==3 then
  817.      x3=4
  818.       end
  819.    else
  820.       x3=random(4)
  821.       if x3==1 then
  822.      x3=1
  823.       elseif x3==2 then
  824.      x3=2
  825.       elseif x3==3 then
  826.      x3=3
  827.       elseif x3==4 then
  828.      x3=4
  829.       end
  830.    end
  831. end
  832.  
  833. skx3=sjx3
  834. sky3=sjy3
  835. sjx3=sdx3
  836. sjy3=sdy3
  837. sdx3=scx3
  838. sdy3=scy3
  839. scx3=sbx3
  840. scy3=sby3
  841. sbx3=sax3
  842. sby3=say3
  843. sax3=s9x3
  844. say3=s9y3
  845. s9x3=s8x3
  846. s9y3=s8y3
  847. s8x3=s7x3
  848. s8y3=s7y3
  849. s7x3=s6x3
  850. s7y3=s6y3
  851. s6x3=s5x3
  852. s6y3=s5y3
  853. s5x3=s4x3
  854. s5y3=s4y3
  855. s4x3=s3x3
  856. s4y3=s3y3
  857. s3x3=s2x3
  858. s3y3=s2y3
  859. s2x3=s1x3
  860. s2y3=s1y3
  861. s1x3=s0x3
  862. s1y3=s0y3
  863.  
  864.  
  865.  
  866.  
  867. if x3==1 then
  868.    if px3==3 and s0y3<11 then
  869.       s0y3=s0y3+1
  870.       px3=3
  871.    else
  872.       if px3==3 then
  873.      x3=random(2)
  874.      if x3==1 then
  875.         if s0x3<18 then
  876.            s0x3=s0x3+1
  877.            px3=2
  878.         else
  879.            s0x3=s0x3-1
  880.            px3=4
  881.         end
  882.      elseif x3==2 then
  883.         if s0x3>1 then
  884.            s0x3=s0x3-1
  885.            px3=4
  886.         else
  887.            s0x3=s0x3+1
  888.            px3=2
  889.         end
  890.      end
  891.       else
  892.      s0y3=s0y3-1
  893.      px3=1
  894.       end
  895.    end
  896. elseif x3==2 then
  897.    if px3==4 and s0x3>1 then
  898.       s0x3=s0x3-1
  899.       px3=4
  900.    else
  901.       if px3==4 then
  902.      x3=random(2)
  903.      if x3==1 then
  904.         if s0y3>1 then
  905.            s0y3=s0y3-1
  906.            px3=1
  907.         else
  908.            s0y3=s0y3+1
  909.            px3=3
  910.         end
  911.      elseif x3==2 then
  912.         if s0y3<11 then
  913.            s0y3=s0y3+1
  914.            px3=3
  915.         else
  916.            s0y3=s0y3-1
  917.            px3=1
  918.         end
  919.      end
  920.       else
  921.      s0x3=s0x3+1
  922.      px3=2
  923.       end
  924.    end
  925. elseif x3==3 then
  926.    if px3==1 and s0y3>1 then
  927.       s0y3=s0y3-1
  928.       px3=1
  929.    else
  930.       if px3==1 then
  931.      x3=random(2)
  932.      if x3==1 then
  933.         if s0x3<18 then
  934.            s0x3=s0x3+1
  935.            px3=2
  936.         else
  937.            s0x3=s0x3-1
  938.            px3=4
  939.         end
  940.      elseif x3==2 then
  941.         if s0x3>1 then
  942.            s0x3=s0x3-1
  943.            px3=4
  944.         else
  945.            s0x3=s0x3+1
  946.            px3=2
  947.         end
  948.      end
  949.       else
  950.      s0y3=s0y3+1
  951.      px3=3
  952.       end
  953.    end
  954. elseif x3==4 then
  955.    if px3==2 and s0x3<18 then
  956.       s0x3=s0x3+1
  957.       px3=2
  958.    else
  959.       if px3==2 then
  960.      x3=random(2)
  961.      if x3==1 then
  962.         if s0y3>1 then
  963.            s0y3=s0y3-1
  964.            px3=1
  965.         else
  966.            s0y3=s0y3+1
  967.            px3=3
  968.         end
  969.      elseif x3==2 then
  970.         if s0y3<11 then
  971.            s0y3=s0y3+1
  972.            px3=3
  973.         else
  974.            s0y3=s0y3-1
  975.            px3=1
  976.         end
  977.      end
  978.       else
  979.      s0x3=s0x3-1
  980.      px3=4
  981.       end
  982.    end
  983. end
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990. set_floor( "fl-abyss", s0x3, s0y3)
  991. set_floor( "fl-abyss", s1x3, s1y3)
  992. set_floor( "fl-abyss", s2x3, s2y3)
  993. set_floor( "fl-abyss", s3x3, s3y3)
  994. set_floor( "fl-abyss", s4x3, s4y3)
  995. set_floor( "fl-abyss", s5x3, s5y3)
  996. set_floor( "fl-abyss", s6x3, s6y3)
  997. set_floor( "fl-abyss", s7x3, s7y3)
  998. set_floor( "fl-abyss", s8x3, s8y3)
  999. set_floor( "fl-abyss", s9x3, s9y3)
  1000. set_floor( "fl-abyss", sax3, say3)
  1001. set_floor( "fl-abyss", sbx3, sby3)
  1002. set_floor( "fl-abyss", scx3, scy3)
  1003. set_floor( "fl-abyss", sdx3, sdy3)
  1004. set_floor( "fl-abyss", sjx3, sjy3)
  1005. set_floor( "fl-abyss", skx3, sky3)
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.  
  1015.  
  1016.  
  1017.  
  1018.  
  1019. end
  1020.  
  1021. set_stone("st-timer", 21,0, {loop=1, action="callback", target="timer_callback", interval=.12})