home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / duffy21.lua < prev    next >
Encoding:
Text File  |  2003-08-27  |  2.0 KB  |  68 lines

  1. levelw=50
  2. levelh=30
  3.  
  4. create_world( levelw, levelh)
  5.  
  6. fill_floor("fl-metal", 0,0,levelw,levelh)
  7.  
  8. function renderLine( line, pattern)
  9.     for i=1, strlen(pattern) do
  10.         local c = strsub( pattern, i, i)
  11.         if c =="#" then
  12.             set_stone( "st-greenbrown", i-1, line)
  13.         elseif c == "o" then
  14.             oxyd( i-1, line)
  15.     elseif c == "D" then
  16.     set_stone( "st-death", i-1, line)
  17.                 elseif c == "!" then
  18. --            abyss(i-1,line)
  19.             fill_floor("fl-water", i-1,line, 1,1)
  20.                 elseif c == " " then
  21.             abyss(i-1,line)
  22.         elseif c=="w" then
  23.             set_actor("ac-whiteball-small", i-.5,line+.5, {player=0, mouseforce=1})
  24.         elseif c=="H" then
  25.            hollow(i-1,line)
  26.         elseif c=="*" then
  27.            set_stone("st-greenbrown",i-1,line)
  28.         elseif c=="r" then
  29.             set_floor("fl-gradient", i-1,line , {type=23})
  30.         elseif c=="l" then
  31.             set_floor("fl-gradient", i-1,line , {type=24})
  32.  
  33.         elseif c=="R" then
  34.             set_floor("fl-gradient", i-1,line , {type=23})
  35. set_actor("ac-whiteball-small", i-.5,line+.5, {player=0, mouseforce=1})
  36.         elseif c=="L" then
  37.             set_floor("fl-gradient", i-1,line , {type=24})
  38.             set_actor("ac-whiteball-small", i-.5,line+.5, {player=0, mouseforce=1})
  39.         elseif c=="x" then
  40.             set_floor("fl-metal", i-1,line)
  41.         elseif c=="X" then
  42.             set_floor("fl-metal", i-1,line)
  43. set_actor("ac-whiteball-small", i-.5,line+.5, {player=0, mouseforce=1})
  44. end
  45.     end    
  46. end
  47.  
  48. -- Floor:  " "
  49. -- Border: "#"
  50. -- Oxyd:   "o"
  51.  
  52. renderLine(00,"   ###    ###       ")
  53. renderLine(01," ###r#o####r#o##### ")
  54. renderLine(02," DrrrrrrrrRrrrrrrr# ")
  55. renderLine(03," ##r##o######o##r## ")
  56. renderLine(04,"  ###    ###   ###  ")
  57. renderLine(05," ##x##o###x##o##### ")
  58. renderLine(06," DxxxxxxxxxxxxxxxxD ")
  59. renderLine(07," #####o###x##o##x## ")
  60. renderLine(08,"  ###    ###   ###  ")
  61. renderLine(09," ##l##o###l##o##### ")
  62. renderLine(10," #llllllllLlllllllD ")
  63. renderLine(11," #####o#l####o##l## ")
  64. renderLine(12,"       ###     ###  ")
  65.  
  66. oxyd_shuffle()
  67.  
  68. set_actor("ac-whiteball-small", 10.5,6.5, {player=0, mouseforce=1})