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

  1. --Sven Siggelkow 2003
  2. -- Per.Oxyd 11
  3.  
  4. levelw = 58
  5. levelh = 37
  6.  
  7. create_world(levelw, levelh)
  8.  
  9. oxyd_default_flavor = "a"
  10. fill_floor("fl-metal", 0, 0, levelw,levelh)
  11. set_actor("ac-blackball", 32.5,18.5, {player=0})
  12.  
  13. function renderLine( line, pattern)
  14.     for i=1, strlen(pattern) do
  15.       local c = strsub( pattern, i, i)
  16.       if c == "#" then
  17.          set_stone("st-rock2",i-1,line)
  18.       elseif c == "D" then                      
  19.      set_stone("st-death", i-1,line)
  20.       elseif c=="d" then
  21.      doorh( i-1,line, {name="door"})
  22.      set_floor("fl-space", i-1,line)
  23.       elseif c == "C" then                      
  24.      set_stone("st-coinslot", i-1,line,{target="door", action="openclose"})
  25.       elseif c=="1" then    
  26.      set_item("it-coin", i-1,line,{value=1})
  27.       elseif c=="2" then    
  28.      set_item("it-coin", i-1,line,{value=2})
  29.       elseif c=="4" then    
  30.      set_item("it-coin", i-1,line,{value=4})
  31.       elseif c=="s" then    
  32.      set_item("it-spring1", i-1,line)
  33.       elseif c=="c" then    
  34.      set_item("it-coffee", i-1,line)
  35.       elseif c=="a" then    
  36.      set_floor("fl-abyss", i-1,line)
  37.       elseif c=="0" then    
  38.      set_floor("fl-space", i-1,line)     
  39.       elseif c=="W" then                                                                
  40.          set_item("it-magnet",i-1,line,{name="magnetW", on=0})
  41.          set_floor("fl-space",i-1,line)     
  42.       elseif c=="X" then                                                                
  43.          set_item("it-magnet",i-1,line,{name="magnetX", on=0})
  44.          set_floor("fl-space",i-1,line)
  45.       elseif c=="Y" then                                                                
  46.          set_item("it-magnet",i-1,line,{name="magnetY", on=0})
  47.          set_floor("fl-space",i-1,line)
  48.       elseif c=="Z" then                                                                
  49.          set_item("it-magnet",i-1,line,{name="magnetZ", on=0})
  50.          set_floor("fl-space",i-1,line)
  51.       elseif c=="w" then
  52.      set_item("it-trigger",i-1,line, {action="onoff", target="magnetW"})         
  53.       elseif c=="x" then
  54.      set_item("it-trigger",i-1,line, {action="onoff", target="magnetX"})   
  55.       elseif c=="y" then
  56.      set_item("it-trigger",i-1,line, {action="onoff", target="magnetY"})          
  57.       elseif c=="z" then
  58.          set_item("it-trigger",i-1,line, {action="onoff", target="magnetZ"})
  59.       elseif c=="n" then
  60.          document(i-1,line,"Rest on the bright spot for a minute")
  61.       elseif c=="+" then                                                                
  62.          set_item("it-trigger",i-1,line, {invisible=1, action="callback", target="s1"})
  63.          set_floor("fl-light",i-1,line)
  64.       elseif c=="~" then                                                                
  65.          set_item("it-crack0",i-1,line)
  66.       elseif c=="-" then                                                                
  67.          --set_item("it-calculator",i-1,line)
  68.       elseif c == "O" then
  69.          oxyd( i-1, line)
  70.         end
  71.     end
  72. end
  73.  
  74. --              0123456789012345678901234567890123456789012345678901234567
  75. renderLine(00, "##########################################################")
  76. renderLine(01, "#                                                        #")
  77. renderLine(02, "#                                                        #")
  78. renderLine(03, "#                                                        #")
  79. renderLine(04, "#                                                        #")
  80. renderLine(05, "#                  D######################################")
  81. renderLine(06, "#                  00000000000WwXxYyZz000000000000000000O#")
  82. renderLine(07, "#                  D######################################")
  83. renderLine(08, "#                                                        #")
  84. renderLine(09, "#                                                        #")
  85. renderLine(10, "#                                                        #")
  86. renderLine(11, "#                                                        #")
  87. renderLine(12, "#                  ####################                  #")
  88. renderLine(13, "#                  #                  #                Dd#")
  89. renderLine(14, "#                  #                  #                C0#")
  90. renderLine(15, "#                  #                  #               s#0#")
  91. renderLine(16, "#                  #     +            #                #0#")
  92. renderLine(17, "#                  #                  #                #0#")
  93. renderLine(18, "#                  # -      n         #                #0#")
  94. renderLine(19, "#                  #                  #                #0#")
  95. renderLine(20, "#                  #                  #                #0#")
  96. renderLine(21, "#                  #                  #                #0#")
  97. renderLine(22, "#                  #                  #                #0#")
  98. renderLine(23, "#                  #                  #                #0#")
  99. renderLine(24, "#                  ####################                #0#")
  100. renderLine(25, "#                                                      #0#")
  101. renderLine(26, "#                                                      #0#")
  102. renderLine(27, "#                                                      #0#")
  103. renderLine(28, "#                                                      #0#")
  104. renderLine(29, "# ~                                                    #0#")
  105. renderLine(30, "#  ~  ~                                                #0#")
  106. renderLine(31, "#aaaaaaa                                               #0#")
  107. renderLine(32, "# 4    a                                               #0#")
  108. renderLine(33, "#   c  a                                               #0#")
  109. renderLine(34, "# 1  1 a                                               #0#")
  110. renderLine(35, "#1 2   a                                               #O#")
  111. renderLine(36, "##########################################################")
  112. --              0123456789012345678901234567890123456789012345678901234567
  113.  
  114. flag = 1
  115. time_old = 3600
  116.  
  117. function s1()
  118. flag = 1 - flag
  119. time = enigma.date("%S") + enigma.date("%M")*60
  120. a = (time-time_old) * flag -- only when waiting ON the trigger
  121. if a > 60 then
  122.  set_stone("st-rock2_hole",19,18)
  123.  document(19,18,"You'll do anything you're told!")
  124.  end
  125. time_old=time
  126. end
  127.  
  128. oxyd_shuffle()
  129.