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

  1. -- Sven Siggelkow 2003
  2. -- ESPRIT #088
  3. -- little bug: ac-whiteball-small can also insert and remove the keys
  4.  
  5.  
  6. levelw = 39
  7. levelh = 13
  8. create_world(levelw, levelh)
  9.  
  10. set_actor("ac-blackball", 2.5,10.5, {player=0})
  11.  
  12. fill_floor("fl-bluegray", 0,0, level_width,level_height)
  13.  
  14.  
  15. function renderLine( line, pattern)
  16.     for i=1, strlen(pattern) do
  17.       local c = strsub( pattern, i, i)
  18.       if c ==   "#" then
  19.          set_stone("st-door_b", i-1,line, {type="v"})
  20.       elseif c=="A" then
  21.          abyss(i-1,line)
  22.       elseif c=="x" then
  23.          set_item("it-key_a", i-1,line)
  24.       elseif c=="y" then
  25.          set_item("it-key_b", i-1,line)
  26.       elseif c=="z" then
  27.          set_item("it-key_c", i-1,line)
  28.       elseif c=="1" then
  29.          set_stone("st-key_a", i-1, line, {action="openclose", target="a"})
  30.       elseif c=="2" then
  31.          set_stone("st-key_b", i-1, line, {action="openclose", target="b"})
  32.       elseif c=="3" then
  33.          set_stone("st-key_a", i-1, line, {action="openclose", target="c"})
  34.       elseif c=="4" then
  35.          set_stone("st-key_c", i-1, line, {action="openclose", target="d"})
  36.       elseif c=="5" then
  37.          set_stone("st-key_b", i-1, line, {action="openclose", target="e"})
  38.       elseif c=="6" then
  39.          set_stone("st-key_c", i-1, line, {action="openclose", target="f"})
  40.       elseif c=="7" then
  41.          set_stone("st-key_b", i-1, line, {action="openclose", target="g"})
  42.       elseif c=="8" then
  43.          set_stone("st-key_c", i-1, line, {action="openclose", target="h"})
  44.       elseif c=="9" then
  45.          set_stone("st-key_a", i-1, line, {action="openclose", target="i"})
  46.       elseif c=="a" then
  47.          set_stone("st-door_c", i-1, line, {name="a"})
  48.       elseif c=="b" then
  49.          set_stone("st-door_c", i-1, line, {name="b"})
  50.       elseif c=="c" then
  51.          set_stone("st-door_c", i-1, line, {name="c"})
  52.       elseif c=="d" then
  53.          set_stone("st-door_c", i-1, line, {name="d"})
  54.       elseif c=="e" then
  55.          set_stone("st-door_c", i-1, line, {name="e"})
  56.       elseif c=="f" then
  57.          set_stone("st-door_c", i-1, line, {name="f"})
  58.       elseif c=="g" then
  59.          set_stone("st-door_c", i-1, line, {name="g"})
  60.       elseif c=="h" then
  61.          set_stone("st-door_c", i-1, line, {name="h"})
  62.       elseif c=="i" then
  63.          set_stone("st-door_c", i-1, line, {name="i"})
  64.       elseif c=="o" then
  65.          set_stone("st-key_a", i-1, line)
  66.       elseif c=="p" then
  67.          set_stone("st-key_b", i-1, line)
  68.       elseif c=="q" then
  69.          set_stone("st-key_c", i-1, line)
  70.       elseif c=="O" then 
  71.      oxyd(i-1,line)  
  72.         end
  73.     end
  74. end
  75. --              012345678901234567890123456789012345678 
  76. renderLine(00, "#########AA####A#######A####AA#########")
  77. renderLine(01, "#O  g  O#AA#x #A# y#  #A# z#AA#O  c  O#")
  78. renderLine(02, "#   #   #AA#  #A#  #  #A#  #AA#   #   #")
  79. renderLine(03, "#   #   #AA#  #A#  #  #A#  #AA#   #   #")
  80. renderLine(04, "##e######AA#  #A#  #  #A#  #AA##h##bd##")  
  81. renderLine(05, "#O  a  O#AA#  #A#  #  #A#  #AA#O  f  O#")
  82. renderLine(06, "#   #   #AA#  #A#  #  #A#  #AA#   #   #")
  83. renderLine(07, "#   #   #AA#  #A#  #  #A#  #AA#   i   #")
  84. renderLine(08, "#p1o2qoq34p#  ###  #  ###  #5o6p7q89qp#")
  85. renderLine(09, "#                                     #")
  86. renderLine(10, "#                                     #")
  87. renderLine(11, "#                                     #")
  88. renderLine(12, "#######################################")
  89. --              012345678901234567890123456789012345678
  90.  
  91. set_actor("ac-whiteball-small", 2.5, 2.5, {controllers=1})
  92. set_actor("ac-whiteball-small",36.5, 2.5, {controllers=1})
  93.  
  94. oxyd_shuffle()
  95.