home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / ss14.lua < prev    next >
Text File  |  2003-09-24  |  3KB  |  93 lines

  1. -- Sven Siggelkow 2003
  2.  
  3. levelw = 20
  4. levelh = 13
  5. create_world(levelw, levelh)
  6.  
  7. if (options.Difficulty==2) then -- hard
  8.   fill_floor("fl-dunes")
  9. else                            -- easy
  10.   fill_floor("fl-concrete")
  11. end
  12.  
  13. local laser=laser(12,3, FALSE, SOUTH)
  14. function renderLine( line, pattern)
  15.     for i=1, strlen(pattern) do
  16.       local c = strsub( pattern, i, i)
  17.       if c ==   "#" then
  18.          set_stone("st-greenbrown",i-1,line)
  19.       elseif c=="t" then               
  20.          set_stone("st-door-v",i-1,line, {name="door1"})
  21.       elseif c=="b" then               
  22.          set_stone("st-door-h",i-1,line, {name="door2"})
  23.       elseif c=="a" then                
  24.          set_floor("fl-water",i-2,line)
  25.          set_floor("fl-water",i-1,line)
  26.          set_floor("fl-water",i-1,line+1)
  27.       elseif c=="." then                
  28.          set_item("it-extralife",i-1,line)
  29.       elseif c=="-" then                
  30.          set_item("it-hstrip",i-1,line)
  31.       elseif c=="|" then                
  32.          set_item("it-vstrip",i-1,line)
  33.       elseif c=="i" then                
  34.          set_floor("fl-ice_001",i-1,line)
  35.       elseif c=="F" then                
  36.          set_stone("st-fakeoxyd",i-1,line)
  37.       elseif c=="I" then                
  38.          set_stone("st-actorimpulse_invisible",i-1,line)
  39.          set_floor("fl-ice_001",i-1,line)
  40.       elseif c=="c" then                
  41.          set_stone("st-actorimpulse_invisible",i-1,line)
  42.          --set_floor("fl-ice_001",i-1,line)
  43.       elseif c=="h" then                
  44.          hollow(i-1,line)
  45.          set_floor("fl-ice_001",i-1,line)
  46.       elseif c=="k" then
  47.        set_stone("st-knight",i-1,line)
  48.       elseif c=="<" then
  49.        set_stone("st-oneway-w",i-1,line)
  50.       elseif c=="v" then
  51.        set_stone("st-oneway-s",i-1,line)
  52.       elseif c=="g" then
  53.        set_stone("st-grate1",i-1,line)
  54.       elseif c=="w" then
  55.        set_stone("st-swap",i-1,line)
  56.       elseif c=="W" then
  57.        set_stone("st-brownie",i-1,line)
  58.       elseif c=="D" then                
  59.          document(i-1,line,"Alfred Nobel says: This is definitely a meditation landscape!")
  60.       elseif c=="d" then
  61.          dynamite(i-1,line)
  62.       elseif c=="1" then
  63.      set_stone("st-switch",i-1,line, {action="openclose", target="door1"})
  64.       elseif c=="2" then
  65.      set_stone("st-switch",i-1,line, {action="openclose", target="door2"})
  66.       elseif c=="3" then
  67.      set_stone("st-switch",i-1,line, {action="callback", target="s1"})
  68.       elseif c=="x" then
  69.          set_actor("ac-whiteball-small", i,line+1, {player=0})
  70.       elseif c=="O" then                                                                        
  71.      oxyd(i-1,line)      
  72.         end
  73.     end
  74. end
  75. --              01234567890123456789
  76. renderLine(00, "##################I#")
  77. renderLine(01, "F c2dD <#iiiiiiiiii3")
  78. renderLine(02, "# c#b#vv#g########i#")
  79. renderLine(03, "#         W      #i#")
  80. renderLine(04, "#                #h#")  
  81. renderLine(05, "#                #i#")
  82. renderLine(06, "###   x   w  x   #i#")
  83. renderLine(07, "#.t              #i#")
  84. renderLine(08, "###      kk      #i#")
  85. renderLine(09, "#       OFk      #i#")
  86. renderLine(10, "#|a      kk    ##IiI")
  87. renderLine(11, "#1-            #FiiI")
  88. renderLine(12, "##################II")
  89. --              01234567890123456789
  90.  
  91. function s1()
  92.  enigma.SendMessage(%laser, "signal", nil)
  93. end