home *** CD-ROM | disk | FTP | other *** search
/ GameStar Special 2004 August / GSSH0804.iso / Geschicklichkeit / Enigma / Enigma-081.exe / data / levels / duffy7.lua < prev    next >
Text File  |  2003-01-31  |  5KB  |  115 lines

  1. levelw = 100
  2. levelh = 100
  3.  
  4. create_world(levelw, levelh)
  5.  
  6. draw_border("st-brownie")
  7. fill_floor("fl-hay", 0,0, level_width,level_height)
  8.  
  9.  
  10.  
  11. function renderLine( line, pattern)
  12.     for i=1, strlen(pattern) do
  13.         local c = strsub( pattern, i, i)
  14.         if c =="#" then
  15.             abyss(i-1,line)
  16.         elseif c == "o" then
  17.             oxyd( i-1, line)
  18.         elseif c == "s" then
  19.             set_item("it-spring1",i-1,line)
  20.         elseif c == "m" then
  21.             fill_floor("fl-metal", i-1,line, 1,1)
  22.         elseif c == "i" then
  23.             set_stone( "st-invisible", i-1, line)
  24.         elseif c == "h" then
  25.             set_item("it-trigger", i-1,line, {action="openclose",target="door1"})
  26.         elseif c == "H" then
  27.             set_stone("st-door", i-1, line , {name="door1", type="v"})
  28.         elseif c == "*" then
  29.             set_stone("st-brownie", i-1, line)
  30.         elseif c == "g" then
  31.             draw_stones("st-grate1",{i-1,line}, {1,1}, 1)
  32.                 elseif c == "u" then
  33.             set_floor("fl-gradient",  i-1,  line, {type=2})
  34.         elseif c == "r" then
  35.             set_floor("fl-gradient",  i-1,  line, {type=3})
  36.         elseif c == "b" then
  37.             set_floor("fl-gradient",  i-1,  line, {type=1})
  38.         elseif c == "l" then
  39.             set_floor("fl-gradient",  i-1,  line, {type=4})
  40.          elseif c == "d" then
  41.             set_stone("st-death", i-1,line)
  42.                 elseif c == "1" then
  43.             oneway(i-1,line, enigma.NORTH)
  44.                 elseif c == "4" then
  45.             oneway(i-1,line, enigma.SOUTH)
  46.                 elseif c == "3" then
  47.             oneway(i-1,line, enigma.WEST)
  48.          elseif c == "2" then
  49.             oneway(i-1,line, enigma.EAST)
  50.         elseif c == "~" then
  51.             fill_floor("fl-water", i-1,line, 1,1)
  52.                 elseif c == "!" then
  53.             abyss(i-1,line)
  54.                 elseif c == "@" then
  55.             document(i-1,line,"I'ts a race!")
  56.                 elseif c == "+" then
  57.                 set_stone("st-greenbrown",i-1,line)
  58.          elseif c == "f" then
  59.                 fakeoxyd(i-1,line)
  60.         elseif c == "v" then
  61.                 oneway(i-1,line, enigma.WEST)
  62.         elseif c == "y" then
  63.                 oneway(i-1,line, enigma.NORTH)
  64.         elseif c == "z" then    
  65.             set_actor("ac-blackball" ,i-1, line, {player=0})
  66.                 end
  67.     end
  68. end
  69.  
  70. -- Floor:  " "
  71. -- Border: "#"
  72. -- Oxyd:   "o"
  73.  
  74.  
  75. renderLine(00,"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddd")
  76. renderLine(01,"d########################+###########++++++++++++++######d")
  77. renderLine(02,"d#o    ##################+o####                    ######d")
  78. renderLine(03,"d#     ##    ############+###########              ######d")
  79. renderLine(04,"d#  z  ##    ############+###########              ######d")
  80. renderLine(05,"d# s   ##   ###  ########ddd#########              ######d")
  81. renderLine(06,"d#     ##   ###     #######+#########              ######d")
  82. renderLine(07,"d##############      ######+#########++##########++######d")
  83. renderLine(08,"d#######+########    ####################################d")
  84. renderLine(09,"d######+##   ############################################d")
  85. renderLine(10,"d#####+###   ############################################d")
  86. renderLine(11,"d####+####   ##    ######################################d")
  87. renderLine(12,"d###+##########   #######m########d########  ############d")
  88. renderLine(13,"d#########  ##   ####mmmmm########d########  ############d")
  89. renderLine(14,"d########    #    ###mmmmmmmm+#############  ############d")
  90. renderLine(15,"d#######    ##    vvvmmmmm#################  ############d")
  91. renderLine(16,"d#######  #####################d###########  ############d")
  92. renderLine(17,"d###########+++########     ###d###########  ############d")
  93. renderLine(18,"d###########+f+########     ###d###########  ############d")
  94. renderLine(19,"d######################     ##+d###########  ############d")
  95. renderLine(20,"d###########   ########yyoyy##+############  ############d")
  96. renderLine(21,"d###########        ###      #+############  ############d")
  97. renderLine(22,"dd ######            #       #+############  ############d")
  98. renderLine(23,"dd ######       ######       #+d####   #         #  +  ##d")
  99. renderLine(24,"dd ###################     ####d####   #         #     ##d")
  100. renderLine(25,"d# ########    ################d#### f ###########     ##d")
  101. renderLine(26,"d# #######    ########rrrrrbb#######iii###########     ##d")
  102. renderLine(27,"d#           #########rrrrrbb#######iii###########     ##d")
  103. renderLine(28,"d#######    ##########uu###bb############################d")
  104. renderLine(29,"d#####################uu###bb############################d")
  105. renderLine(30,"d#####################uu###bb###           ### ##### ####d")
  106. renderLine(31,"d####    #############uulllll##            ### ##### ####d")
  107. renderLine(32,"d###    ##############uulllll##              #       ####d")
  108. renderLine(33,"d##    ############################################# ####d")
  109. renderLine(34,"d#o   ############################################## ####d")
  110. renderLine(35,"d########################################################d")
  111. renderLine(36,"dddddddddddddddddddddddddddddddddddddddddddddddddddddddddd")
  112.  
  113. oxyd_shuffle()
  114. display.SetFollowMode(display.FOLLOW_SCROLLING)
  115.