<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<el:level xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://enigma-game.org/schema/level/1 level.xsd" xmlns:el="http://enigma-game.org/schema/level/1">
  <el:protected>
    <el:info el:type="level">
      <el:identity el:title="Per.Oxyd 11" el:subtitle="Per.Oxyd 11" el:id="ss_pox11"/>
      <el:version el:score="1" el:release="1" el:revision="0" el:status="released"/>
      <el:author  el:name="Sven Siggelkow" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2003 Sven Siggelkow</el:copyright>
      <el:license el:type="GPL v2.0 or above" el:open="true"/>
      <el:compatibility el:enigma="0.92" el:engine="per.oxyd">
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:comments>
        <el:code>Lua 5.1 and XML converted by Leveladministrators</el:code>
      </el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
levelw = 58
levelh = 37

create_world(levelw, levelh)

oxyd_default_flavor = "a"
fill_floor("fl-metal", 0, 0, levelw,levelh)
set_actor("ac-blackball", 32.5,18.5)

function renderLine( line, pattern)
    for i=1, strlen(pattern) do
      local c = strsub( pattern, i, i)
      if c == "#" then
         set_stone("st-metal",i-1,line)
      elseif c == "D" then                      
     set_stone("st-death", i-1,line)
      elseif c=="d" then
     doorh( i-1,line, {name="door"})
     set_floor("fl-space", i-1,line)
      elseif c == "C" then                      
     set_stone("st-coinslot", i-1,line,{target="door", action="openclose"})
      elseif c=="1" then    
     set_item("it-coin1", i-1,line)
      elseif c=="2" then    
     set_item("it-coin2", i-1,line)
      elseif c=="4" then    
     set_item("it-coin4", i-1,line)
      elseif c=="s" then    
     set_item("it-spring1", i-1,line)
      elseif c=="c" then    
     set_item("it-coffee", i-1,line)
      elseif c=="a" then    
     set_floor("fl-abyss", i-1,line)
      elseif c=="0" then    
     set_floor("fl-space", i-1,line)     
      elseif c=="W" then                                                                
         set_item("it-magnet",i-1,line,{name="magnetW", on=0})
         set_floor("fl-space",i-1,line)     
      elseif c=="X" then                                                                
         set_item("it-magnet",i-1,line,{name="magnetX", on=0})
         set_floor("fl-space",i-1,line)
      elseif c=="Y" then                                                                
         set_item("it-magnet",i-1,line,{name="magnetY", on=0})
         set_floor("fl-space",i-1,line)
      elseif c=="Z" then                                                                
         set_item("it-magnet",i-1,line,{name="magnetZ", on=0})
         set_floor("fl-space",i-1,line)
      elseif c=="w" then
     set_item("it-trigger",i-1,line, {action="onoff", target="magnetW"})         
      elseif c=="x" then
     set_item("it-trigger",i-1,line, {action="onoff", target="magnetX"})   
      elseif c=="y" then
     set_item("it-trigger",i-1,line, {action="onoff", target="magnetY"})          
      elseif c=="z" then
         set_item("it-trigger",i-1,line, {action="onoff", target="magnetZ"})
      elseif c=="n" then
         document(i-1,line,"text1")
      elseif c=="+" then                                                                
         set_item("it-trigger",i-1,line, {invisible=1, action="callback", target="s1"})
         set_floor("fl-light",i-1,line)
      elseif c=="~" then                                                                
         set_item("it-crack0",i-1,line)
      elseif c=="-" then                                                                
         --set_item("it-calculator",i-1,line)
      elseif c == "O" then
         oxyd( i-1, line)
        end
    end
end

--              0123456789012345678901234567890123456789012345678901234567
renderLine(00, "##########################################################")
renderLine(01, "#                                                        #")
renderLine(02, "#                                                        #")
renderLine(03, "#                                                        #")
renderLine(04, "#                                                        #")
renderLine(05, "#                  D######################################")
renderLine(06, "#                  00000000000WwXxYyZz000000000000000000O#")
renderLine(07, "#                  D######################################")
renderLine(08, "#                                                        #")
renderLine(09, "#                                                        #")
renderLine(10, "#                                                        #")
renderLine(11, "#                                                        #")
renderLine(12, "#                  ####################                  #")
renderLine(13, "#                  #                  #                Dd#")
renderLine(14, "#                  #                  #                C0#")
renderLine(15, "#                  #                  #               s#0#")
renderLine(16, "#                  #     +            #                #0#")
renderLine(17, "#                  #                  #                #0#")
renderLine(18, "#                  # -      n         #                #0#")
renderLine(19, "#                  #                  #                #0#")
renderLine(20, "#                  #                  #                #0#")
renderLine(21, "#                  #                  #                #0#")
renderLine(22, "#                  #                  #                #0#")
renderLine(23, "#                  #                  #                #0#")
renderLine(24, "#                  ####################                #0#")
renderLine(25, "#                                                      #0#")
renderLine(26, "#                                                      #0#")
renderLine(27, "#                                                      #0#")
renderLine(28, "#                                                      #0#")
renderLine(29, "# ~                                                    #0#")
renderLine(30, "#  ~  ~                                                #0#")
renderLine(31, "#aaaaaaa                                               #0#")
renderLine(32, "# 4    a                                               #0#")
renderLine(33, "#   c  a                                               #0#")
renderLine(34, "# 1  1 a                                               #0#")
renderLine(35, "#1 2   a                                               #O#")
renderLine(36, "##########################################################")
--              0123456789012345678901234567890123456789012345678901234567

flag = 1
time_old = 3600

function s1()
flag = 1 - flag
time = enigma.date("%S") + enigma.date("%M")*60
a = (time-time_old) * flag -- only when waiting ON the trigger
if a > 60 then
 set_stone("st-metal_hole",19,18)
 document(19,18,"text2")
 end
time_old=time
end

oxyd_shuffle()
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
      <el:string el:key="text1">
        <el:english el:translate="true">Rest on the bright spot for a minute.</el:english>
      </el:string> 
      <el:string el:key="text2">
        <el:english el:translate="true">You'll do anything you're told!</el:english>
      </el:string> 
    </el:i18n>
  </el:protected>
</el:level>
