home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / siegfried77.lua < prev    next >
Text File  |  2003-03-22  |  8KB  |  169 lines

  1. --Siegfried Fennig 22.03.2003 Rev.0
  2.  
  3. levelw = 58
  4. levelh = 49
  5.  
  6. create_world(levelw, levelh)
  7. draw_border("st-glass1")
  8. --enigma.ConserveLevel = FALSE
  9. oxyd_default_flavor = "a"
  10. fill_floor("fl-sahara", 0,0, level_width,level_height)
  11.  
  12. function renderLine( line, pattern)
  13.     for i=1, strlen(pattern) do
  14.       local c = strsub( pattern, i, i)
  15.       if c == "g" then
  16.          set_stone("st-glass1",i-1,line)
  17.       elseif c =="f" then
  18.          fill_floor("fl-rough", i-1,line, 1,1)
  19.       elseif c =="#" then
  20.          fill_floor("fl-abyss", i-1,line, 1,1)
  21.       elseif c =="x" then
  22.          fill_floor("fl-space", i-1,line, 1,1)
  23.       elseif c == "h" then
  24.          set_stone("st-glass1_hole",i-1,line)
  25.       elseif c == "r" then
  26.          set_stone("st-rock5", i-1,line)
  27.       elseif c == "y" then
  28.          set_stone("st-death", i-1,line)
  29.       elseif c == "d" then
  30.          set_stone("st-death_invisible", i-1,line)
  31.       elseif c == "q" then
  32.          set_stone("st-window", i-1,line)
  33.       elseif c == "i" then
  34.          set_stone("st-actorimpulse", i-1,line)
  35.       elseif c == "l" then
  36.          set_attrib(laser(i-1,line, TRUE, EAST), "name", "laser")
  37.       elseif c == "s" then
  38.          set_item("it-spring1", i-1, line)
  39.       elseif c == "o" then
  40.          oxyd( i-1, line)
  41.       elseif c == "a" then
  42.          set_actor("ac-blackball", i-.5,line+.5, {player=0})
  43.         end
  44.     end
  45. end
  46. --                        1         2         3         4         5
  47. --              0123456789012345678901234567890123456789012345678901234567
  48. renderLine(00, "                                                          ")
  49. renderLine(01, "                  rgfffffg s          g                   ")
  50. renderLine(02, "                  rgffoffg            g                   ")
  51. renderLine(03, " l                rgfffffg          d h                   ")
  52. renderLine(04, "                  rgfffffg            g                   ")
  53. renderLine(05, "                  rgfffffg            g                   ")
  54. renderLine(06, "                  rgfffff             g                   ")
  55. renderLine(07, "                  rgfffffg            g                   ")
  56. renderLine(08, "                  rgfffffg            g                   ")
  57. renderLine(09, "                  rgfffffg            g                   ")
  58. renderLine(10, "                  rgffoffg            g            d      ")
  59. renderLine(11, " rrrrrrrrrrrrrrrrrrgfffffg            g                   ")
  60. renderLine(12, " ggggggggggggggggggggggggggggggggggggggggggggggggggqgggggg")
  61. renderLine(13, "                   g                  g                   ")
  62. renderLine(14, "                   g                  h d                 ")
  63. renderLine(15, "                   g                  g                   ")
  64. renderLine(16, "                   g                  g                   ")
  65. renderLine(17, "                   g                  g                   ")
  66. renderLine(18, "                   g                  g                   ")
  67. renderLine(19, "                   g                  g                   ")
  68. renderLine(20, "                   g                  g                   ")
  69. renderLine(21, "                   g                  g                   ")
  70. renderLine(22, "   d               g                  g                   ")
  71. renderLine(23, "                   h d                g                   ")
  72. renderLine(24, " gghggggggggggggggggggggggggggggggggggggggghggggggggggggg ")
  73. renderLine(25, "                   g                  g                   ")
  74. renderLine(26, "                   g  # # #    # # #  g    d              ")
  75. renderLine(27, "                   g  # # #    # # #  g                   ")
  76. renderLine(28, "                   g  # # #    # # #  g                   ")
  77. renderLine(29, "                   g  # #        # #  g                   ")
  78. renderLine(30, "        a          g  # ####  #### #  g                   ")
  79. renderLine(31, "                   g  #            #  g                   ")
  80. renderLine(32, "                 d h  ##############  g                   ")
  81. renderLine(33, "                   g                  g                   ")
  82. renderLine(34, "                   g                  g                   ")
  83. renderLine(35, "                   g                  g                   ")
  84. renderLine(36, " gggggggggggggggggggggggggggggggggggggggggggggggggggghggg ")
  85. renderLine(37, "                                                          ")
  86. renderLine(38, "                                                     d    ")
  87. renderLine(39, "                                                          ")
  88. renderLine(40, "                                                          ")
  89. renderLine(41, "   hhh   ggyggggggggggggggggyggggggggggggggggggygg        ")
  90. renderLine(42, "   hyh   ###  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxig        ")
  91. renderLine(43, "   hhh   ggyggggggggggggggggyggggggggggggggggggygg        ")
  92. renderLine(44, "                                                          ")
  93. renderLine(45, "                                                          ")
  94. renderLine(46, "                                                          ")
  95. renderLine(47, "                                                          ")
  96. renderLine(48, "                                                          ")
  97. --              0123456789012345678901234567890123456789012345678901234567
  98. --                        1         2         3         4         5
  99.  
  100. set_stone("st-fourswitch",21,25, {action="callback", target="mf01"})
  101. set_attrib (mirrorp ( 3, 3, 1,0,3), "name", "mirror01")
  102. function mf01()
  103.     mir=enigma.GetNamedObject("mirror01")
  104.     enigma.SendMessage(mir, "turn", nil)
  105. end
  106.  
  107. set_stone("st-fourswitch",23,25, {action="callback", target="mf02"})
  108. set_attrib (mirrorp ( 3, 5, 1,0,4), "name", "mirror02")
  109. function mf02()
  110.     mir=enigma.GetNamedObject("mirror02")
  111.     enigma.SendMessage(mir, "turn", nil)
  112. end
  113.  
  114. set_stone("st-fourswitch",25,25, {action="callback", target="mf03"})
  115. set_attrib (mirrorp ( 5, 5, 1,0,2), "name", "mirror03")
  116. function mf03()
  117.     mir=enigma.GetNamedObject("mirror03")
  118.     enigma.SendMessage(mir, "turn", nil)
  119. end
  120.  
  121. set_stone("st-fourswitch",27,25, {action="callback", target="mf04"})
  122. set_attrib (mirrorp ( 5, 3, 1,0,3), "name", "mirror04")
  123. function mf04()
  124.     mir=enigma.GetNamedObject("mirror04")
  125.     enigma.SendMessage(mir, "turn", nil)
  126. end
  127.  
  128. set_stone("st-fourswitch",30,25, {action="callback", target="mf05"})
  129. set_attrib (mirrorp ( 7, 3, 1,0,1), "name", "mirror05")
  130. function mf05()
  131.     mir=enigma.GetNamedObject("mirror05")
  132.     enigma.SendMessage(mir, "turn", nil)
  133. end
  134.  
  135. set_stone("st-fourswitch",32,25, {action="callback", target="mf06"})
  136. set_attrib (mirrorp ( 7, 5, 1,0,3), "name", "mirror06")
  137. function mf06()
  138.     mir=enigma.GetNamedObject("mirror06")
  139.     enigma.SendMessage(mir, "turn", nil)
  140. end
  141.  
  142. set_stone("st-fourswitch",34,25, {action="callback", target="mf07"})
  143. set_attrib (mirrorp ( 9, 5, 1,0,4), "name", "mirror07")
  144. function mf07()
  145.     mir=enigma.GetNamedObject("mirror07")
  146.     enigma.SendMessage(mir, "turn", nil)
  147. end
  148.  
  149. set_stone("st-fourswitch",36,25, {action="callback", target="mf08"})
  150. set_attrib (mirrorp ( 9, 3, 1,0,2), "name", "mirror08")
  151. function mf08()
  152.     mir=enigma.GetNamedObject("mirror08")
  153.     enigma.SendMessage(mir, "turn", nil)
  154. end
  155.  
  156. set_stone("st-laserswitch",11, 3, {action="callback", target="sw1"})
  157. set_stone("st-door",25, 6, {name="door1", type="v"})
  158.  
  159. function sw1()
  160.     doora=enigma.GetNamedObject("door1")
  161.     enigma.SendMessage(doora, "openclose", nil)
  162. end
  163.  
  164. document(22,42, "     5 = E     3 = S     ")
  165. document(24,42, "     1 = W     8 = S     ")
  166. document(26,42, "     4 = E     2 = S     ")
  167. document(28,42, "     7 = N     6 = W     ")
  168. document(12,30, "It's a long way...")
  169.