home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / ss_esp69.lua < prev    next >
Encoding:
Text File  |  2003-09-19  |  3.6 KB  |  94 lines

  1. -- Sven Siggelkow 2003
  2. -- ESPRIT #069
  3.  
  4. levelw = 39
  5. levelh = 13
  6. create_world(levelw, levelh)
  7. oxyd_default_flavor = "b"
  8. set_actor("ac-blackball", 27.5,6.5, {player=0})
  9. display.SetFollowMode(display.FOLLOW_SCROLLING)
  10.  
  11. fill_floor("fl-rough-red",0,0,levelw,levelh)
  12.  
  13. function renderLine( line, pattern)
  14.     for i=1, strlen(pattern) do
  15.       local c = strsub( pattern, i, i)
  16.       if c ==   "#" then
  17.          set_stone("st-stone1", i-1,line)
  18.       elseif c =="m" then
  19.          set_item("it-coin", i-1,line,{value=4})
  20.       elseif c=="w" then
  21.          set_floor("fl-wood",  i-1,  line)
  22.          set_item("it-burnable-ignited", i-1,  line)
  23.       elseif c=="1" then
  24.          set_stone("st-door_c", i-1,line, {name="door1", type="v"})
  25.       elseif c=="2" then
  26.          set_stone("st-door_c", i-1,line, {name="door2", type="v"})
  27.       elseif c=="3" then
  28.          set_stone("st-door_c", i-1,line, {name="door3", type="v"})
  29.       elseif c=="4" then
  30.          set_stone("st-door_c", i-1,line, {name="door4", type="v"})
  31.       elseif c=="5" then
  32.          set_stone("st-door_c", i-1,line, {name="door5", type="v"})
  33.       elseif c=="6" then
  34.          set_stone("st-door_c", i-1,line, {name="door6", type="v"})
  35.       elseif c=="7" then
  36.          set_stone("st-door_c", i-1,line, {name="door7", type="v"})
  37.       elseif c=="9" then
  38.          set_stone("st-door_c", i-1,line, {name="door9", type="v"})
  39.       elseif c =="a" then
  40.          set_item("it-key_a", i-1,line)                  
  41.       elseif c =="b" then
  42.          set_item("it-key_b", i-1,line)
  43.       elseif c =="c" then
  44.          set_item("it-key_c", i-1,line)
  45.       elseif c =="I" then
  46.          set_stone("st-coinslot", i-1,line, {action="openclose", target="door9"})
  47.       elseif c =="E" then
  48.          set_stone("st-coinslot", i-1,line, {action="openclose", target="door5"})
  49.       elseif c =="A" then
  50.          set_stone("st-key_a", i-1, line, {action="openclose", target="door1"})
  51.       elseif c =="B" then
  52.          set_stone("st-key_b", i-1, line, {action="openclose", target="door2"})
  53.       elseif c =="C" then
  54.          set_stone("st-key_c", i-1, line, {action="openclose", target="door3"})
  55.       elseif c=="D" then
  56.      set_stone("st-switch",i-1,line, {action="openclose", target="door4"})         
  57.       elseif c=="F" then
  58.      set_stone("st-switch",i-1,line, {action="openclose", target="door6"})   
  59.       elseif c=="G" then
  60.      set_stone("st-switch",i-1,line, {action="openclose", target="door7"})
  61.       elseif c=="r" then
  62.      set_actor("ac-rotor", i,line+1, {mouseforce=0, range=50, force=70})
  63.       elseif c=="R" then
  64.      set_actor("ac-rotor", i,line+1, {mouseforce=0, range=6, force=20})
  65.       elseif c=="O" then
  66.      oxyd(i-1,line)         
  67.         end
  68.     end  
  69. end
  70. --               012345678901234567890123456789012345678
  71. renderLine(00 , "#######################################")
  72. renderLine(01 , "#m          ###        ###            #")
  73. renderLine(02 , "#m          #O#        #O#            #")
  74. renderLine(03 , "###A        #4#D       #3#C        ####")
  75. renderLine(04 , "#R #                 b             7O##")  
  76. renderLine(05 , "#  1                          m    ####")
  77. renderLine(06 , "####                           m  wGw #")
  78. renderLine(07 , "#r 2                   c          www #")
  79. renderLine(08 , "#  #                                 m#")
  80. renderLine(09 , "###B      #5#E    #6#F    #9#I        #")
  81. renderLine(10 , "#         #O#     #O#     #O#m        #")
  82. renderLine(11 , "#         ###     ###     ###        a#")
  83. renderLine(12 , "#######################################") 
  84. --               012345678901234567890123456789012345678
  85.  
  86. oxyd_shuffle()
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.