<?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="Bank-O-Mat" el:subtitle="esprit 26" el:id="ss4"/>
      <el:version el:score="3" el:release="3" el:revision="4" 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="1.10"/>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
ti[" "] = {"fl_pinkbumps"}
ti["#"] = {"st_fake_quake"}
ti["D"] = {"st_death"}
ti["O"] = {"st_oxyd"}
ti["."] = {"it_seed"}
ti["S"] = {"st_switch_black", target="get_money"}
ti["G"] = {"st_lightglass"}
ti["|"] = {"st_door", name="doors#", flavor="c"}
ti["C"] = {"st_coinslot", interval_m=COIN_IGNORE, target="counter", action="signal"}
ti["@"] = {"#ac_marble_black"}

wo(ti, " ", {
    "#######################################",
    "#                GS#                  #",
    "#    C.C C C       #                  #",
    "#                  #                  #",
    "#                  #                  #",
    "#                  |   D              #",
    "# O     @          |   D            O #",
    "#                  |   D              #",
    "#                  #                  #",
    "#                  #                  #",
    "#    C C C C       #                  #",
    "#                  #                  #",
    "#######################################"})

wo:add({"ot_counter", "counter", state=0, target="doors#*", action_8="open"})

local reserve = 8
function get_money()
    if reserve > 0 then
        reserve = reserve -1
        wo[po(16,1)] = {"it_coin_m"}
    else
        wo[po(16,1)] = {"it_document", text="text1"}
    end
end
 ]]></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">Sorry for inconvenience, the Bank-O-Mat is empty.</el:english>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
