<?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="Stinker" el:subtitle="Per.Oxyd 13" el:id="martin18"/>
      <el:version el:score="1" el:release="1" el:revision="0" el:status="released"/>
      <el:author  el:name="Martin Hawlisch" el:email="" el:homepage=""/>
      <el:copyright>Copyright © 2003 Martin Hawlisch</el:copyright>
      <el:license el:type="GPL version 2" 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 = 20
levelh = 13

stone="st-greenbrown"

create_world( levelw, levelh)
fill_floor("fl-sand", 0,0,levelw,levelh)

draw_border( stone)
draw_stones( stone, {6,1}, {0,1}, 6)
draw_stones( stone, {4,6}, {0,1}, 6)
draw_stones( stone, {11,5}, {1,0}, 8)
draw_stones( stone, {11,6}, {1,0}, 8)
draw_stones( stone, {11,7}, {1,0}, 8)
draw_stones( stone, {13,1}, {0,1}, 3)
draw_stones( stone, {13,9}, {0,1}, 3)

set_stone( "st-wood", 6, 7)
set_item( "it-hammer", 6, 7)
set_item( "it-magicwand", 8, 8)
set_stone( "st-stoneimpulse", 5,8)

mytimer=0
function timer_action()
    if mytimer == 0 then
        SendMessage("fart", "trigger")
        SendMessage("door1", "open")
        SendMessage("door2", "close")
    elseif mytimer == 1 then
        SendMessage("fart", "trigger")
        SendMessage("door1", "close")
        SendMessage("door2", "open")
    end
    mytimer = mytimer + 1
    if mytimer == 2 then
        mytimer = 0
    end
end

set_stone( "st-fart", 6, 3, {name="fart"})
doorv( 13, 4, {name="door1"})
doorv( 13, 8, {name="door2"})
set_stone( "st-timer", 13,6, { action="callback", target="timer_action", interval=5})

oxyd(1,1)
oxyd(1,11)
oxyd(18,1)
oxyd(18,11)
oxyd_shuffle()

set_actor("ac-blackball", 9, 8)
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="false"/>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>
