<?xml version="1.0" encoding="windows-1252" 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="Riverside" el:subtitle="" el:id="johann02"/>
      <el:version el:score="2" el:release="2" el:revision="1" el:status="released"/>
      <el:author  el:name="Johann Freymuth" el:email="-" el:homepage="-"/>
      <el:copyright>Copyright © 2007 Johann Freymuth</el:copyright>
      <el:license el:type="GPL version 2" el:open="true"/>
      <el:compatibility el:enigma="1.0">
         <el:dependency el:path="lib/ant" el:id="lib/ant" el:release="1" el:preload="true"/>
      </el:compatibility>
      <el:modes el:easy="false" el:single="true" el:network="false"/>
      <el:comments>
        <el:code>Created with EnigmaEdit</el:code>
      </el:comments>
      <el:score el:easy="-" el:difficult="-"/>
    </el:info>
    <el:luamain><![CDATA[
levelw=39
levelh=25

local flag = {0,0,0,0,0,0,0,0}
local var = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
create_world( levelw, levelh)
enigma.ConserveLevel=TRUE


-- RENDER STONES
function RenderStones( line, pattern)
    for i=1, strlen(pattern) do
        local c = strsub( pattern, i, i)
        if     c == "A" then set_stone("st-camouflage",i-1,line)
        elseif c == "B" then set_stone("st-wood",i-1,line)
        elseif c == "C" then set_stone("st-stoneimpulse",i-1,line)
        elseif c == "D" then set_stone("st-camouflage_move",i-1,line)
        elseif c == "E" then set_stone("st-rock1",i-1,line)
        elseif c == "F" then set_stone("st-key_a",i-1,line)
        elseif c == "G" then set_stone("st-door-h",i-1,line)
        elseif c == "H" then set_stone("st-key_b",i-1,line)
        end
    end
end

-- RENDER STONES NOW
RenderStones(000, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderStones(001, "A  A     D         A                  A")
RenderStones(002, "A  B                                  A")
RenderStones(003, "AABAB                                 A")
RenderStones(004, "A  B                                  A")
RenderStones(005, "A                                     A")
RenderStones(006, "A                  A                 DA")
RenderStones(007, "A    A A           A                  A")
RenderStones(008, "A   AA A           A                  A")
RenderStones(009, "A   A  AA          A                  A")
RenderStones(010, "A   A              A                  A")
RenderStones(011, "A   A              A        A A       A")
RenderStones(012, "AACCCAAA    AAAAAAAAAAAAAAAAA AAAAAAAAA")
RenderStones(013, "A BBB              A        A A       A")
RenderStones(014, "A                  A                  A")
RenderStones(015, "A DAD              A                  A")
RenderStones(016, "A                  A            DDDD  A")
RenderStones(017, "A                  A            EGGE  A")
RenderStones(018, "A                  AAAAADAAAAEEFEGGEHEE")
RenderStones(019, "A                  A        AE  EGGE  E")
RenderStones(020, "A        D         A AAA AA AE        E")
RenderStones(021, "A                  A A AAAA AE        E")
RenderStones(022, "A                  A AAAAAA AEEEEEE EEE")
RenderStones(023, "A                  A        AE        E")
RenderStones(024, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAEEEEEEEEEE")

-- RENDER FLOOR
function RenderFloors( line, pattern)
    for i=1, strlen(pattern) do
        local c = strsub( pattern, i, i)
        if     c == "A" then set_floor("fl-leavesb",i-1,line)
        elseif c == "B" then set_floor("fl-water",i-1,line)
        elseif c == "C" then set_floor("fl-sand",i-1,line)
        elseif c == "D" then set_floor("fl-ice",i-1,line)
        end
    end
end

-- RENDER FLOORS NOW
RenderFloors(000, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(001, "AAAAAAAAAAAAAAAAAAAAAABBBBBAAAAAAAAAAAA")
RenderFloors(002, "AAAAAAAAAAAAAAAAADDDDDBBBBBAAAAAAAAAAAA")
RenderFloors(003, "AAAAAAAAAAAAAAABBBDDDDDBBBBAAAAAAAAAAAA")
RenderFloors(004, "AAAAAAAAAAAAABBBBBBBDDDDBBAAAAAAAAAAAAA")
RenderFloors(005, "AAAAAAAAAAABBBBBBBBBBDDDAAAAAAAAAAAAAAA")
RenderFloors(006, "AAAAAAAAAABBBBBBBAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(007, "AAAAAAAAABBBBBBAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(008, "AAAAAAAAABBBBBAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(009, "AAAAAAAABBBBBAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(010, "AAAAAAAABBBBAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(011, "AAAAAAAABBBBAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(012, "AAAAAAAABBBBAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(013, "AAAAAAAABBBBAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(014, "AAAAAAAABBBBAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(015, "AAAAAABBBBBBAAAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(016, "AAAAABBBBBBBBBAAAAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(017, "AAAABBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAAAA")
RenderFloors(018, "AAAABBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAA")
RenderFloors(019, "AAAABBBBBCCBBBBBBBBAAAAAAAAAAAAAAAAAAAA")
RenderFloors(020, "AAAABBBCCACBBBBBBBBAAAAAAAAAAAAAAAAAAAA")
RenderFloors(021, "AAABBBBBCCCBBBBBBBBAAAAAAAAAAAAAAAAAAAA")
RenderFloors(022, "AABBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAA")
RenderFloors(023, "ABBBBBBBBBBBBBBBBBBAAAAAAAAAAAAAAAAAAAA")
RenderFloors(024, "ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")

-- RENDER ITEMS
function RenderItems( line, pattern)
    for i=1, strlen(pattern) do
        local c = strsub( pattern, i, i)
        if     c == "A" then set_item("it-key_a",i-1,line)
        elseif c == "B" then set_item("it-dynamite",i-1,line)
        elseif c == "C" then set_item("it-puller-n",i-1,line)
        elseif c == "D" then set_item("it-document",i-1,line)
        elseif c == "E" then set_item("it-wormhole",i-1,line)
        elseif c == "F" then set_item("it-rubberband",i-1,line)
        elseif c == "G" then set_item("it-key_b",i-1,line)
        end
    end
end

-- RENDER ITEMS NOW
RenderItems(000, "                                       ")
RenderItems(001, "         A CCCC                        ")
RenderItems(002, "                                       ")
RenderItems(003, "                                       ")
RenderItems(004, "                                       ")
RenderItems(005, "                                       ")
RenderItems(006, "                                     G ")
RenderItems(007, "                                       ")
RenderItems(008, "                                       ")
RenderItems(009, "                                       ")
RenderItems(010, "                D                      ")
RenderItems(011, "                                       ")
RenderItems(012, "                                       ")
RenderItems(013, "                                       ")
RenderItems(014, "                                       ")
RenderItems(015, "                                       ")
RenderItems(016, "                                       ")
RenderItems(017, "                                       ")
RenderItems(018, "                                       ")
RenderItems(019, "                                       ")
RenderItems(020, "         B                             ")
RenderItems(021, "                      E                ")
RenderItems(022, "                                       ")
RenderItems(023, "                        F              ")
RenderItems(024, "                                       ")

set_actor("ac-blackball", 01.5, 01.5, {player=0, essential=1})
set_actor("ac-whiteball-small", 30.5, 23.5, {name="AC30-23", player=1, mouseforce=0, essential=1})
set_floor("fl-leavesb", 30, 23, {name="FL30-23"})
set_floor("fl-leavesb", 33, 17, {name="FL33-17"})
set_floor("fl-leavesb", 33, 18, {name="FL33-18"})
set_floor("fl-leavesb", 33, 19, {name="FL33-19"})
set_floor("fl-leavesb", 34, 17, {name="FL34-17"})
set_floor("fl-leavesb", 34, 18, {name="FL34-18"})
set_floor("fl-leavesb", 34, 19, {name="FL34-19"})
set_stone("st-key_a", 31, 18, {target="fn01", action="callback"})
set_stone("st-door-h", 33, 17, {name="ST33-17"})
set_stone("st-door-h", 33, 18, {name="ST33-18"})
set_stone("st-door-h", 33, 19, {name="ST33-19"})
set_stone("st-door-h", 34, 17, {name="ST34-17"})
set_stone("st-door-h", 34, 18, {name="ST34-18"})
set_stone("st-door-h", 34, 19, {name="ST34-19"})
set_stone("st-key_b", 36, 18, {target="fn02", action="callback"})
set_item("it-document", 16, 10, {text="text1"})
set_item("it-wormhole", 22, 21, {on=1, strength=10, range=5})
set_item("it-rubberband", 24, 23, {target="AC30-23", length=1, strength=100})

function fn01()
    if flag[1] == 1 then flag[1] = 0
    end
    if flag[1] == 0 then
        enigma.SendMessage(enigma.GetNamedObject("ST33-17"), "openclose", "nil");
        enigma.SendMessage(enigma.GetNamedObject("ST34-18"), "openclose", "nil");
        enigma.SendMessage(enigma.GetNamedObject("ST33-19"), "openclose", "nil");
    end
    flag[1] = flag[1] + 1
end

function fn02()
    if flag[2] == 1 then flag[2] = 0
    end
    if flag[2] == 0 then
        enigma.SendMessage(enigma.GetNamedObject("ST34-17"), "openclose", "nil");
        enigma.SendMessage(enigma.GetNamedObject("ST33-18"), "openclose", "nil");
        enigma.SendMessage(enigma.GetNamedObject("ST34-19"), "openclose", "nil");
    end
    flag[2] = flag[2] + 1
end
    ]]></el:luamain>
    <el:i18n>
      <el:string el:key="title">
        <el:english el:translate="true"/>
    <el:translation el:lang="de">Am Fluss</el:translation>
      </el:string>
      <el:string el:key="text1">
        <el:english el:translate="true">Wrong side!                   F3</el:english>
    <el:translation el:lang="de">Falsche Seite!                  F3</el:translation>
      </el:string>
    </el:i18n>
  </el:protected>
</el:level>

