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

  1. levelw=40
  2. levelh=13
  3.  
  4. create_world( levelw, levelh)
  5.  
  6. fill_floor("fl-leaves", 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 == "g" then
  16.             draw_stones("st-grate1",{i-1,line}, {1,1}, 1)
  17.         elseif c == "U" then
  18.             set_stone("st-bolder", i-1,line, {direction=NORTH})
  19.         elseif c == "R" then
  20.             set_stone("st-bolder", i-1,line, {direction=EAST})
  21.         elseif c == "L" then
  22.             set_stone("st-bolder", i-1,line, {direction=WEST})
  23.          elseif c == "D" then
  24.             set_stone("st-bolder", i-1,line, {direction=SOUTH})
  25.         elseif c == "m" then
  26.             set_item( "it-magicwand", i-1,line)
  27.         elseif c == "z" then
  28.             set_actor("ac-blackball", i-1,line, {player=0})
  29.          elseif c == "s" then
  30.                 set_stone("st-stoneimpulse",i-1,line)
  31.         elseif c == "," then
  32.             set_item("it-trigger", i-1,line, {action="openclose", target="door6"})
  33.         elseif c == "<" then
  34.                         set_stone("st-door_b", i-1,line, {name="door6", type="v"})
  35.         elseif c == "." then
  36.             set_item("it-trigger", i-1,line, {action="openclose", target="door7"})
  37.         elseif c == ">" then
  38.                         set_stone("st-door_b", i-1,line, {name="door7", type="v"})
  39.         elseif c == "/" then
  40.             set_item("it-trigger", i-1,line, {action="openclose", target="door8"})
  41.         elseif c == "?" then
  42.                         set_stone("st-door_b", i-1,line, {name="door8", type="v"})
  43.         elseif c == ";" then
  44.             set_item("it-trigger", i-1,line, {action="openclose", target="door9"})
  45.         elseif c == ":" then
  46.                         set_stone("st-door_b", i-1,line, {name="door9", type="v"})
  47.         elseif c == "!" then
  48.            -- bolders now fall into abyss, replaced abyss by water [ralf]
  49.             set_floor("fl-water",i-1,line)
  50.             --abyss(i-1,line)
  51.         end
  52.     end
  53. end
  54.  
  55. -- Floor:  " "
  56. -- Border: "#"
  57. -- Oxyd:   "o"
  58.  
  59.  
  60. renderLine(00,"#######################################")
  61. renderLine(01,"# Ds!          #  !!! .          <>?:o#")
  62. renderLine(02,"#;#!!       #L! R#!sD    !#!!!   ######")
  63. renderLine(03,"#           !s! s !!#!!! ! Ds!        #")
  64. renderLine(04,"# !!!       !!!    !!! # !/#!! !!! #L!#")
  65. renderLine(05,"# Ds!    m   DL    !R#L! !!!   !sD !s!#")
  66. renderLine(06,"# g!! z     !RU    !sD     #!  #L#!!!!#")
  67. renderLine(07,"#!!         !!s#!  !!#    !Us  !!!s!  #")
  68. renderLine(08,"#s!        !!s#U!   #!!   !!!    #L!  #") -- renderLine(08,"#s!        !!ssU!   #!!   !!!    #L!  #")
  69. renderLine(09,"#R#        !oR#!!   Us!          !!#  #")
  70. renderLine(10,"#          !!!       !!          !sU  #")
  71. renderLine(11,"#L                          ,   R#    #")
  72. renderLine(12,"#######################################")
  73.  
  74. oxyd_shuffle()
  75.  
  76. -- bolders now fall into abyss, replaced abyss by water [ralf]
  77. --abyss(13,6)
  78. --abyss(14,6)
  79. --abyss(22,5)
  80. set_floor("fl-water",13,6)
  81. set_floor("fl-water",14,6)
  82. set_floor("fl-water",22,5)
  83.