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

  1. -- Smutty Smurf 2003
  2.  
  3. levelw = 39
  4. levelh = 13
  5. display.SetFollowMode(display.FOLLOW_SCROLLING)
  6. create_world(levelw, levelh)
  7. oxyd_default_flavor = "c"
  8. set_actor("ac-blackball", 2.5,6.5, {player=0})
  9.  
  10. fill_floor("fl-black", 0,0, levelw,levelh)
  11. fill_items( "it-burnable", 0, 0, 24, 13)
  12. draw_floor("fl-metal",{24,0},{0,1},13)
  13.  
  14. function renderLine( line, pattern)
  15.     for i=1, strlen(pattern) do
  16.       local c = strsub( pattern, i, i)
  17.       if c ==   "#" then
  18.          set_stone("st-plain", i-1,line)
  19.       elseif c =="G" then
  20.          set_stone("st-grate2", i-1,line)
  21.       elseif c =="b" then
  22.          set_item("it-brush", i-1,line)
  23.       elseif c =="s" then
  24.          set_item("it-spade", i-1,line)
  25.       elseif c =="d" then
  26.          set_item("it-dynamite", i-1,line) 
  27.       elseif c =="f" then
  28.          set_item("it-extinguisher", i-1,line)
  29.       elseif c =="~" then
  30.          set_item("it-burnable", i-1,line, {name="burnable1"})    
  31.       elseif c =="+" then
  32.          set_item("it-burnable", i-1,line, {name="burnable2"})                
  33.       elseif c =="t" then
  34.          set_item("it-trigger", i-1,line, {invisible=1, action="callback", target="s1"})
  35.       elseif c =="k" then
  36.          set_item("it-key_a", i-1,line)
  37.       elseif c =="B" then
  38.          set_stone("st-key_a", i-1, line, {action="openclose", target="door1"})
  39.       elseif c =="D" then
  40.          set_stone("st-key_a", i-1, line, {action="openclose", target="door2"})
  41.       elseif c =="A" then
  42.          set_stone("st-door_c", i-1, line,  {name="door1"})
  43.       elseif c =="C" then
  44.          set_stone("st-door_c", i-1, line,  {name="door2"})
  45.       elseif c =="e" then
  46.          set_stone("st-door_c", i-1, line,  {name="door3"})
  47.       elseif c =="E" then
  48.          set_stone("st-coinslot", i-1,line, {action="openclose", target="door3"})
  49.       elseif c=="m" then    
  50.          set_item("it-coin", i-1,line,{value=3})
  51.       elseif c =="1" then
  52.          set_item("it-extralife", i-1,line)
  53.       elseif c =="2" then
  54.          set_item("it-magicwand", i-1,line)
  55.       elseif c =="3" then
  56.          set_item("it-document", i-1,line)
  57.       elseif c =="4" then
  58.          set_item("it-cherry", i-1,line)
  59.       elseif c =="5" then
  60.          set_item("it-weight", i-1,line)
  61.       elseif c =="6" then
  62.          set_item("it-hammer", i-1,line)
  63.       elseif c =="7" then
  64.          set_item("it-sword", i-1,line)
  65.       elseif c =="8" then
  66.          set_item("it-wrench", i-1,line)
  67.       elseif c =="9" then
  68.          set_item("it-seed", i-1,line)
  69.       elseif c =="0" then
  70.          set_item("it-brake", i-1,line)   
  71.       elseif c =="u" then              
  72.          set_item("it-umbrella", i-1,line)
  73.                                                                          
  74.       elseif c=="O" then                                                               
  75.      oxyd(i-1,line)         
  76.         end
  77.     end  
  78. end
  79. --               012345678901234567890123456789012345678
  80. renderLine(00 , "#######################################")
  81. renderLine(01 , "#bbb#uuuu#ffff#12 3#76 3#             #")
  82. renderLine(02 , "#bbb#uuuu#ffff#4564#2 18# O    O    O #")
  83. renderLine(03 , "#bbb#uuuu#ffff#8907#8907#             #")
  84. renderLine(04 , "#bbb#uuuu#ffff# 4mm# 666#             #")  
  85. renderLine(05 , "#   #AB###CD###GGGG#GGGG#             #")
  86. renderLine(06 , "#   t     ~             E             #")
  87. renderLine(07 , "#k  #GGGG#GGGG#         e             #")
  88. renderLine(08 , "#sss#dddd#    #         #             #")
  89. renderLine(09 , "#sss#dddd#    #         #             #")
  90. renderLine(10 , "#sss#dddd#    #         # O    O    O #")
  91. renderLine(11 , "#sss#dddd#    #        +#             #")
  92. renderLine(12 , "#######################################") 
  93. --               012345678901234567890123456789012345678
  94.  
  95. function s1()
  96. enigma.SendMessage(enigma.GetNamedObject("burnable1"), "ignite", nil)
  97. enigma.SendMessage(enigma.GetNamedObject("burnable2"), "ignite", nil)
  98. end
  99.  
  100.