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

  1. -- Sven Siggelkow 2003
  2. -- Esprit #43
  3.  
  4. levelw = 58
  5. levelh = 13
  6. create_world(levelw, levelh)
  7. oxyd_default_flavor = "a"
  8. set_actor("ac-blackball", 7.5,7.5, {player=0})
  9.  
  10. fill_floor("fl-hay", 0,0, levelw,levelh)
  11.  
  12. function renderLine( line, pattern)
  13.     for i=1, strlen(pattern) do
  14.       local c = strsub( pattern, i, i)
  15.       if c ==   "#" then
  16.          set_stone("st-greenbrown", i-1,line)
  17.       elseif c =="h" then
  18.          set_stone("st-greenbrown_move", i-1,line)
  19.      hammer(i-1,line)
  20.       elseif c=="w" then    
  21.          set_stone("st-volcano", i-1,line,{name="vulcano2"})
  22.       elseif c =="t" then
  23.          set_stone("st-grate1", i-1,line)
  24.          set_item("it-trigger", i-1,line, {invisible=1, action="callback", target="s1"})
  25.       elseif c=="v" then    
  26.          set_stone("st-volcano", i-1,line,{name="vulcano1"})
  27.       elseif c=="m" then    
  28.          set_stone("st-greenbrown_move", i-1,line)
  29.       elseif c =="1" then
  30.          set_item("it-coffee", i-1,line)
  31.       elseif c =="2" then
  32.          set_item("it-cherry", i-1,line)
  33.       elseif c =="3" then
  34.          set_item("it-coin", i-1,line,{value=4})
  35.       elseif c =="4" then
  36.          set_item("it-spade", i-1,line)
  37.       elseif c =="5" then
  38.          set_item("it-extinguisher", i-1,line)
  39.       elseif c =="6" then
  40.          set_item("it-extralife", i-1,line)
  41.       elseif c =="7" then
  42.          set_item("it-key_b", i-1,line)
  43.       elseif c =="8" then
  44.          set_item("it-coin", i-1,line,{value=1})
  45.       elseif c =="9" then
  46.          set_item("it-flagblack", i-1,line)
  47.       elseif c =="0" then
  48.          set_item("it-brush", i-1,line)   
  49.       elseif c =="f" then              
  50.          set_item("it-floppy", i-1,line)
  51.       elseif c =="." then              
  52.          set_item("it-seed", i-1,line)                                                                         
  53.       elseif c=="O" then                                                               
  54.      oxyd(i-1,line)         
  55.         end
  56.     end  
  57. end
  58. --               0123456789012345678901234567890123456789012345678901234567
  59. renderLine(00 , "##########################################################")
  60. renderLine(01 , "#1233456781190     #                  #                  #")
  61. renderLine(02 , "#f################ #                  #                  #")
  62. renderLine(03 , "# #              # #                  #              m   #")
  63. renderLine(04 , "# #              # #           .   .  #                m #")  
  64. renderLine(05 , "# #              # m                  t .     m          #")
  65. renderLine(06 , "#                 vm    O    ...O     t .      wh O  O m #")
  66. renderLine(07 , "#O  O              #         ... .    t .     m          #")
  67. renderLine(08 , "#                  #         ......   #                m #")
  68. renderLine(09 , "#                  #            ...   # . .              #")
  69. renderLine(10 , "#                  #                  #              m   #")
  70. renderLine(11 , "#                  #                  #                  #")
  71. renderLine(12 , "##########################################################") 
  72. --               0123456789012345678901234567890123456789012345678901234567
  73.  
  74. oxyd_shuffle()
  75.  
  76. function s1()
  77. enigma.SendMessage(enigma.GetNamedObject("vulcano1"), "trigger", nil)
  78. enigma.SendMessage(enigma.GetNamedObject("vulcano2"), "trigger", nil)
  79. end
  80.  
  81.