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

  1. -- Sven Siggelkow 2003
  2. -- Oxyd single player #38
  3.  
  4. levelw = 61
  5. levelh = 61
  6. difficult = (options.Difficulty==2)
  7. hour = enigma.date("%H")
  8.  
  9. create_world(levelw, levelh)
  10.  
  11. oxyd_default_flavor = "d"
  12. fill_floor("fl-wood", 0, 0, levelw,levelh)
  13.  
  14. function renderLine( line, pattern)
  15.     for i=1, strlen(pattern) do
  16.       local c = strsub( pattern, i, i)
  17.       if c == "#" then
  18.          set_stone("st-rock3",i-1,line)
  19.       elseif c == "h" then
  20.          set_stone("st-rock3_hole",i-1,line)
  21.       elseif c == "c" then
  22.          set_stone("st-rock3_break",i-1,line)
  23.       elseif c == "M" then
  24.          set_stone("st-rock3_move",i-1,line)
  25.       elseif c == "H" then
  26.          hammer(i-1,line)
  27.       elseif c == "." then
  28.          set_item("it-extralife",i-1,line)
  29.       elseif c == "0" then
  30.          set_item("it-hollow",i-1,line)
  31.       elseif c == "k" then
  32.          set_item("it-key_b",i-1,line)
  33.       elseif c == "D" then
  34.          set_stone("st-death",i-1,line)
  35.       elseif c == "g" then
  36.          set_stone("st-grate1",i-1,line)
  37.       elseif c=="m" then
  38.      set_item("it-coin", i-1,line, {value=1})
  39.       elseif c == "*" then
  40.          set_item("it-hill",i-1,line)
  41.       elseif c == "+" then
  42.          set_item("it-tinyhill",i-1,line)
  43.       elseif c == "I" then
  44.          set_floor("fl-ice_001",i-1,line)
  45.       elseif c == "j" then
  46.          set_floor("fl-ice_001",i-1,line)
  47.      set_item("it-crack0",i-1,line)
  48.       elseif c == "n" then
  49.          set_floor("fl-normal",  i-1,  line)
  50.       elseif c == ">" then
  51.          set_floor("fl-gradient",  i-1,  line, {type=4})
  52.       elseif c == "<" then
  53.          set_floor("fl-gradient",  i-1,  line, {type=3})
  54.       elseif c == "C" then
  55.          set_stone("st-rock3_break",i-1,line)
  56.      document(i-1,line, "Business hours from 8am to 4pm")
  57.       elseif c == "T" then
  58.          set_stone("st-rock3",i-1,line)
  59.          if (hour >= "08") and (hour < "16") then     -- only open between 8-16
  60.            set_stone("st-rock3_break",i-1,line) end
  61.          if difficult == false then                   -- and while easy mode
  62.            set_stone("st-rock3_break",i-1,line) end
  63.       elseif c == "1" then
  64.          set_item("it-vortex-closed", i-1,line, {name="vortex1", targetx = 33.5, targety =  43.5})
  65.       elseif c == "w" then
  66.          set_stone("st-timeswitch",i-1,line,{target = "vortex1", action = "open"})
  67.       elseif c == "2" then
  68.          set_item("it-vortex-closed", i-1,line, {name="vortex2", targetx = 1.5, targety =  5.5})
  69.          set_floor("fl-ice_001",i-1,line)
  70.       elseif c == "x" then
  71.          set_stone("st-timeswitch",i-1,line,{target = "vortex2", action = "open"})
  72.       elseif c == "3" then
  73.          set_item("it-vortex-closed", i-1,line, {name="vortex3", targetx = 1.5, targety =  59.5})
  74.       elseif c == "y" then
  75.          set_stone("st-timeswitch",i-1,line,{target = "vortex3", action = "open"})
  76.       elseif c == "4" then
  77.          set_item("it-vortex-closed", i-1,line, {name="vortex4", targetx = 59.5, targety =  1.5})
  78.       elseif c == "z" then
  79.          set_stone("st-timeswitch",i-1,line,{target = "vortex4", action = "open"})
  80.       elseif c == "O" then
  81.          oxyd( i-1, line)
  82.       elseif c == "a" then
  83.          set_actor("ac-blackball", i-.5,line+.5, {player=0})
  84.         end
  85.     end
  86. end
  87.  
  88. --              0123456789012345678901234567890123456789012345678901234567890
  89. renderLine(00, "###########################################################y#")
  90. renderLine(01, "#a                    H                                    3#")
  91. renderLine(02, "# ######D ########################################### ##### #")
  92. renderLine(03, "#       #                           #               # #   # #")
  93. renderLine(04, "# ####D # ######################### # ############# # # O # #")
  94. renderLine(05, "#1    #    >nnn<>nnnnnnn<           #                 #   # #")
  95. renderLine(06, "#w #D # #####################c############### ########## ## #")
  96. renderLine(07, "#   # # #                    cccccccccc       #   #   #   # #")
  97. renderLine(08, "# # # # # ###########################c####### # # # # # ### #")
  98. renderLine(09, "# # # #           #     #   #       #c#     # # # # # # #   #")
  99. renderLine(10, "# # # # ## ###### # ### # # # #######c# # # # # # # # # # # #")
  100. renderLine(11, "# # # #         #       # # #       #c# # # #   #   # # # # #")
  101. renderLine(12, "# # # ######### # ##### # # # ##### ### # # # #####   # # # #")
  102. renderLine(13, "# # #             #     # # # #   #     # # #       ### # # #")
  103. renderLine(14, "# # # ########### ### ### # # # O ####### # # ##### # # # # #")
  104. renderLine(15, "# # #           #     #   # # #   #       # #     # #   # # #")
  105. renderLine(16, "# # # ######### # # ### ### # ## ## ##### # # # # # # ### # #")
  106. renderLine(17, "# # # #         # #         # #         # #   # # #   #   # #")
  107. renderLine(18, "# # # # # ##### # ######### # # ### ### # # ### # ##### ### #")
  108. renderLine(19, "# # # # # #  .#           # # # #     # # # #   # #   # # # #")
  109. renderLine(20, "# # # # # # # # ####### # # # # # ### # # # ##### # # # # # #")
  110. renderLine(21, "# #     # # # #   #   # # # # # #   # #     #     # # # #   #")
  111. renderLine(22, "# # ##### # # # # # # # # # # # # # # ######### # # # # # # #")
  112. renderLine(23, "#         # # # # # #   #         # #           # # #     # #")
  113. renderLine(24, "# ##### # # # # # # ############# # ########### # # ####### #")
  114. renderLine(25, "#       #   #   # #       #     # #           #           # #")
  115. renderLine(26, "####### # ##### #k####### ##### # ########### ##### ####### #")
  116. renderLine(27, "# #       #####       0       # #         #       #       # #")
  117. renderLine(28, "# ##### # ##### ############# # ######### # ##### ####### # #")
  118. renderLine(29, "#     # #   ### #           # #           #     #         # #")
  119. renderLine(30, "### # # ####### # ######### # #################### ######## #")
  120. renderLine(31, "#   # # ####### # hhhhhhhhh #                               #")
  121. renderLine(32, "# # # # ####### # #h####### # ###### ###################### #")
  122. renderLine(33, "# # # # #         #hhhhh*   #                             # #")
  123. renderLine(34, "# # # # ############# # ################################# # #")
  124. renderLine(35, "# # # D #   #       # # #                                 # #")
  125. renderLine(36, "# # # ### # # ##### # # # ################################# #")
  126. renderLine(37, "#   #       # #     #                  ++++++++++        O# #")
  127. renderLine(38, "#######g### # ### # ### ################################### #")
  128. renderLine(39, "# #    g  #  M    #   #                       #           # #")
  129. renderLine(40, "# # #m#g  # # ##### # ################# ##### # #######D# D #")
  130. renderLine(41, "#   # #g    #       # # IIIIIIIIIjIIIIIIIIII# # #       # # #")
  131. renderLine(42, "# ### #g    # ### ### # # #################I# # # ### # # # #")
  132. renderLine(43, "#     #ggggg# #   #   # #IIIIIIII2IIIIIIIIII# # #   # # # # #")
  133. renderLine(44, "# #########g# # ### ### # #######x########### # # # # # # # #")
  134. renderLine(45, "#     #ggggg    #   #   #             #         # # # # # # #")
  135. renderLine(46, "##### # ######### # # # # # ######### # ##### # # # # # # # #")
  136. renderLine(47, "#   #   #           # # # # #       # #     # #   # # # # # #")
  137. renderLine(48, "# # # # # ########### # # # # ##### # # ### # ### # # # # # #")
  138. renderLine(49, "# # # #               # # #   #   # # #   #     #+++++# # # #")
  139. renderLine(50, "# # # # ############### # # # # # # # # # # ### ##### # # # #")
  140. renderLine(51, "# #   # #             # # # # # # # #   # #   #       # # # #")
  141. renderLine(52, "# ### # # ########### # # # # # # # # ### # # ####### # # # #")
  142. renderLine(53, "#     #             # # # # # D # #   #             D #   #H#")
  143. renderLine(54, "##### # ########### # # # # D # # # ### # ### ### #########c#")
  144. renderLine(55, "#   #             # # # # # # # # # #   #   #   #     #ccc#c#")
  145. renderLine(56, "# # ############# # # # # # # # # # # ##### # # ##### #cOc#c#")
  146. renderLine(57, "# #               # # #   #   # # # #   #   # #       #ccc#c#")
  147. renderLine(58, "# ############ #### # ### ##### # # D # # # # ##########T##c#")
  148. renderLine(59, "z4                  #                 # # # #         ccCccc#")
  149. renderLine(60, "#############################################################")
  150. --              0123456789012345678901234567890123456789012345678901234567890
  151.  
  152.  
  153. oxyd_shuffle()
  154.  
  155.