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

  1. --Siegfried Fennig 18.12.2002
  2. enigma.ConserveLevel=FALSE                  -- \dh\
  3.  
  4. levelw = 39
  5. levelh = 25
  6.  
  7. create_world(levelw, levelh)
  8. draw_border("st-greenbrown")
  9. fill_floor("fl-marble", 0,0, level_width,level_height)
  10.  
  11. oxyd(35,1)
  12. oxyd(35,21)
  13.  
  14. puzzle( 16,17,PUZ_0000)
  15. puzzle( 17,19,PUZ_0000)
  16. puzzle( 16,19,PUZ_0010)
  17. puzzle( 17,20,PUZ_1010)
  18. puzzle( 17,22,PUZ_1000)
  19.  
  20. draw_stones("st-greenbrown", {5,1}, {1,0}, 2)
  21. draw_stones("st-greenbrown", {6,2}, {1,0}, 2)
  22. draw_stones("st-greenbrown", {7,3}, {1,0}, 2)
  23. draw_stones("st-greenbrown", {8,4}, {1,0}, 4)
  24. draw_stones("st-greenbrown", {11,3}, {1,0}, 2)
  25. draw_stones("st-greenbrown", {12,2}, {1,0}, 2)
  26. draw_stones("st-greenbrown", {13,1}, {1,0}, 2)
  27. draw_stones("st-greenbrown", {5,11}, {1,0}, 2)
  28. draw_stones("st-greenbrown", {6,10}, {1,0}, 2)
  29. draw_stones("st-greenbrown", {7,9}, {1,0}, 2)
  30. draw_stones("st-greenbrown", {8,8}, {1,0}, 4)
  31. draw_stones("st-greenbrown", {11,9}, {1,0}, 2)
  32. draw_stones("st-greenbrown", {12,10}, {1,0}, 2)
  33. draw_stones("st-greenbrown", {13,11}, {1,0}, 2)
  34. draw_stones("st-greenbrown", {1,12}, {1,0}, 5)
  35. draw_stones("st-greenbrown", {14,12}, {1,0}, 23)
  36. draw_stones("st-greenbrown", {5,13}, {1,0}, 2)
  37. draw_stones("st-greenbrown", {6,14}, {1,0}, 2)
  38. draw_stones("st-greenbrown", {7,15}, {1,0}, 2)
  39. draw_stones("st-greenbrown", {8,16}, {1,0}, 4)
  40. draw_stones("st-greenbrown", {11,15}, {1,0}, 2)
  41. draw_stones("st-greenbrown", {12,14}, {1,0}, 2)
  42. draw_stones("st-greenbrown", {13,13}, {1,0}, 2)
  43. draw_stones("st-greenbrown", {5,23}, {1,0}, 2)
  44. draw_stones("st-greenbrown", {6,22}, {1,0}, 2)
  45. draw_stones("st-greenbrown", {7,21}, {1,0}, 2)
  46. draw_stones("st-greenbrown", {8,20}, {1,0}, 4)
  47. draw_stones("st-greenbrown", {11,21}, {1,0}, 2)
  48. draw_stones("st-greenbrown", {12,22}, {1,0}, 2)
  49. draw_stones("st-greenbrown", {13,23}, {1,0}, 2)
  50. draw_stones("st-invisible", {6,0}, {1,0}, 8)
  51. draw_stones("st-invisible", {6,24}, {1,0}, 8)
  52. draw_stones("st-greenbrown", {19,16}, {0,1}, 2)
  53. draw_stones("st-greenbrown", {19,20}, {0,1}, 4)
  54. draw_stones("st-greenbrown", {27,2}, {1,0}, 1)
  55. draw_stones("st-greenbrown", {20,3}, {1,0}, 11)
  56. draw_stones("st-greenbrown", {20,8}, {1,0}, 12)
  57. draw_stones("st-greenbrown", {20,4}, {0,1}, 2)
  58. draw_stones("st-greenbrown", {20,7}, {1,0}, 1)
  59. draw_stones("st-greenbrown", {31,1}, {0,1}, 5)
  60. draw_stones("st-greenbrown", {31,7}, {1,0}, 1)
  61. draw_stones("st-greenbrown", {16,1}, {0,1}, 5)
  62. draw_stones("st-greenbrown", {16,7}, {0,1}, 5)
  63.  
  64. fill_floor("fl-abyss", 6,0, 8,1)
  65. fill_floor("fl-abyss", 7,1, 6,1)
  66. fill_floor("fl-abyss", 8,2, 4,1)
  67. fill_floor("fl-abyss", 9,3, 2,1)
  68. fill_floor("fl-abyss", 9,9, 2,1)
  69. fill_floor("fl-abyss", 8,10, 4,1)
  70. fill_floor("fl-abyss", 7,11, 6,1)
  71. fill_floor("fl-abyss", 6,12, 8,1)
  72. fill_floor("fl-abyss", 7,13, 6,1)
  73. fill_floor("fl-abyss", 8,14, 4,1)
  74. fill_floor("fl-abyss", 9,15, 2,1)
  75. fill_floor("fl-abyss", 9,21, 2,1)
  76. fill_floor("fl-abyss", 8,22, 4,1)
  77. fill_floor("fl-abyss", 7,23, 6,1)
  78. fill_floor("fl-abyss", 6,24, 8,1)
  79. fill_floor("fl-abyss", 7,18, 6,1)
  80. fill_floor("fl-abyss", 32,1, 2,9)
  81. fill_floor("fl-abyss", 20,1, 3,2)
  82. fill_floor("fl-abyss", 21,4, 10,4)
  83.  
  84. set_stone( "st-timer", 24, 5, {action="callback", target="t_h1"})
  85. set_stone( "st-timer", 25, 5, {action="callback", target="t_h2"})
  86. set_stone( "st-timer", 26, 5, {action="callback", target="t_h3"})
  87. set_stone( "st-timer", 27, 5, {action="callback", target="t_h4"})
  88.  
  89. timer = 0
  90.  
  91. function t_h1()
  92.     bridgea=enigma.GetNamedObject("bridge1")
  93.     bridgeb=enigma.GetNamedObject("bridge2")
  94.     bridgec=enigma.GetNamedObject("bridge3")
  95.     bridged=enigma.GetNamedObject("bridge4")
  96.  
  97.     if timer == 0 then
  98.         enigma.SendMessage(bridgea, "close", nil)
  99.      end
  100.     if timer == 1 then
  101.         enigma.SendMessage(bridgea, "open", nil)
  102.     end
  103.     if timer == 2 then
  104.         enigma.SendMessage(bridgec, "close", nil)
  105.     end
  106.     if timer == 3 then
  107.         enigma.SendMessage(bridgec, "open", nil)
  108.     end
  109.     if timer == 4 then
  110.         enigma.SendMessage(bridgeb, "close", nil)
  111.         enigma.SendMessage(bridged, "close", nil)
  112.     end
  113.     if timer == 5 then
  114.         enigma.SendMessage(bridgeb, "open", nil)
  115.     end
  116.     if timer == 6 then
  117.         enigma.SendMessage(bridged, "open", nil)
  118.     end
  119.     if timer == 7 then
  120.         enigma.SendMessage(bridgec, "close", nil)
  121.      end
  122.     if timer == 8 then
  123.         enigma.SendMessage(bridgea, "close", nil)
  124.     end
  125.     if timer == 9 then
  126.         enigma.SendMessage(bridgec, "open", nil)
  127.     end
  128.     if timer == 10 then
  129.         enigma.SendMessage(bridgea, "open", nil)
  130.     end
  131.     if timer == 11 then
  132.         enigma.SendMessage(bridgeb, "close", nil)
  133.         enigma.SendMessage(bridged, "close", nil)
  134.     end
  135.     if timer == 13 then
  136.         enigma.SendMessage(bridgeb, "open", nil)
  137.     end
  138.     if timer == 14 then
  139.         enigma.SendMessage(bridged, "open", nil)
  140.     end
  141.     if timer == 22 then
  142.         enigma.SendMessage(bridgea, "close", nil)
  143.      end
  144.     if timer == 23 then
  145.         enigma.SendMessage(bridgea, "open", nil)
  146.     end
  147. end
  148.  
  149. function t_h2()
  150.     bridgea=enigma.GetNamedObject("bridge5")
  151.     bridgeb=enigma.GetNamedObject("bridge6")
  152.     bridgec=enigma.GetNamedObject("bridge7")
  153.     bridged=enigma.GetNamedObject("bridge8")
  154.  
  155.     if timer == 7 then
  156.         enigma.SendMessage(bridgea, "close", nil)
  157.      end
  158.     if timer == 8 then
  159.         enigma.SendMessage(bridgea, "open", nil)
  160.     end
  161.     if timer == 9 then
  162.         enigma.SendMessage(bridgec, "close", nil)
  163.     end
  164.     if timer == 10 then
  165.         enigma.SendMessage(bridgec, "open", nil)
  166.     end
  167.     if timer == 11 then
  168.         enigma.SendMessage(bridgeb, "close", nil)
  169.         enigma.SendMessage(bridged, "close", nil)
  170.     end
  171.     if timer == 12 then
  172.         enigma.SendMessage(bridgeb, "open", nil)
  173.     end
  174.     if timer == 13 then
  175.         enigma.SendMessage(bridged, "open", nil)
  176.     end
  177.     if timer == 14 then
  178.         enigma.SendMessage(bridgec, "close", nil)
  179.      end
  180.     if timer == 15 then
  181.         enigma.SendMessage(bridgea, "close", nil)
  182.     end
  183.     if timer == 16 then
  184.         enigma.SendMessage(bridgec, "open", nil)
  185.     end
  186.     if timer == 17 then
  187.         enigma.SendMessage(bridgea, "open", nil)
  188.     end
  189.     if timer == 18 then
  190.         enigma.SendMessage(bridgeb, "close", nil)
  191.         enigma.SendMessage(bridged, "close", nil)
  192.     end
  193.     if timer == 19 then
  194.         enigma.SendMessage(bridgeb, "open", nil)
  195.     end
  196.     if timer == 20 then
  197.         enigma.SendMessage(bridged, "open", nil)
  198.     end
  199.  
  200.     if timer == 30 then
  201.         enigma.SendMessage(bridgea, "close", nil)
  202.         enigma.SendMessage(bridgeb, "close", nil)
  203.         enigma.SendMessage(bridgec, "close", nil)
  204.         enigma.SendMessage(bridged, "close", nil)
  205.     end
  206.     if timer == 32 then
  207.         enigma.SendMessage(bridgea, "open", nil)
  208.         enigma.SendMessage(bridgeb, "open", nil)
  209.         enigma.SendMessage(bridgec, "open", nil)
  210.         enigma.SendMessage(bridged, "open", nil)
  211.     end
  212. end
  213.  
  214. function t_h3()
  215.     bridgea=enigma.GetNamedObject("bridge9")
  216.     bridgeb=enigma.GetNamedObject("bridge10")
  217.     bridgec=enigma.GetNamedObject("bridge11")
  218.     bridged=enigma.GetNamedObject("bridge12")
  219.  
  220.     if timer == 3 then
  221.         enigma.SendMessage(bridgea, "close", nil)
  222.      end
  223.     if timer == 4 then
  224.         enigma.SendMessage(bridgea, "open", nil)
  225.     end
  226.     if timer == 8 then
  227.         enigma.SendMessage(bridgec, "close", nil)
  228.     end
  229.     if timer == 11 then
  230.         enigma.SendMessage(bridgec, "open", nil)
  231.     end
  232.     if timer == 15 then
  233.         enigma.SendMessage(bridgea, "close", nil)
  234.      end
  235.     if timer == 16 then
  236.         enigma.SendMessage(bridgea, "open", nil)
  237.     end
  238.     if timer == 17 then
  239.         enigma.SendMessage(bridgec, "close", nil)
  240.     end
  241.     if timer == 18 then
  242.         enigma.SendMessage(bridgec, "open", nil)
  243.     end
  244.     if timer == 191 then
  245.         enigma.SendMessage(bridgeb, "close", nil)
  246.         enigma.SendMessage(bridged, "close", nil)
  247.     end
  248.     if timer == 20 then
  249.         enigma.SendMessage(bridgeb, "open", nil)
  250.     end
  251.     if timer == 21 then
  252.         enigma.SendMessage(bridged, "open", nil)
  253.     end
  254.     if timer == 22 then
  255.         enigma.SendMessage(bridgec, "close", nil)
  256.      end
  257.     if timer == 23 then
  258.         enigma.SendMessage(bridgea, "close", nil)
  259.     end
  260.     if timer == 24 then
  261.         enigma.SendMessage(bridgec, "open", nil)
  262.     end
  263.     if timer == 25 then
  264.         enigma.SendMessage(bridgea, "open", nil)
  265.     end
  266.     if timer == 26 then
  267.         enigma.SendMessage(bridgeb, "close", nil)
  268.         enigma.SendMessage(bridged, "close", nil)
  269.     end
  270.     if timer == 27 then
  271.         enigma.SendMessage(bridgeb, "open", nil)
  272.     end
  273.     if timer == 28 then
  274.         enigma.SendMessage(bridged, "open", nil)
  275.     end
  276. end
  277.  
  278. function t_h4()
  279.     bridgea=enigma.GetNamedObject("bridge15")
  280.     bridgeb=enigma.GetNamedObject("bridge16")
  281.  
  282.     if timer == 8 then
  283.         enigma.SendMessage(bridgea, "close", nil)
  284.     end
  285.     if timer == 9 then
  286.         enigma.SendMessage(bridgea, "open", nil)
  287.     end
  288.     if timer == 15 then
  289.         enigma.SendMessage(bridgeb, "close", nil)
  290.     end
  291.     if timer == 16 then
  292.         enigma.SendMessage(bridgeb, "open", nil)
  293.     end
  294.     timer = timer + 1
  295.     if timer == 33 then
  296.         timer = 0
  297.     end
  298. end
  299.  
  300. set_floor("fl-bridge", 8,5, {name="bridge1"})
  301. set_floor("fl-bridge", 9,5, {name="bridge2"})
  302. set_floor("fl-bridge", 10,5, {name="bridge3"})
  303. set_floor("fl-bridge", 11,5, {name="bridge4"})
  304. set_floor("fl-bridge", 8,6, {name="bridge5"})
  305. set_floor("fl-bridge", 9,6, {name="bridge6"})
  306. set_floor("fl-bridge", 10,6, {name="bridge7"})
  307. set_floor("fl-bridge", 11,6, {name="bridge8"})
  308. set_floor("fl-bridge", 8,7, {name="bridge9"})
  309. set_floor("fl-bridge", 9,7, {name="bridge10"})
  310. set_floor("fl-bridge", 10,7, {name="bridge11"})
  311. set_floor("fl-bridge", 11,7, {name="bridge12"})
  312. set_floor("fl-bridge", 10,17, {name="bridge15"})
  313. set_floor("fl-bridge", 10,19, {name="bridge16"})
  314.  
  315. set_stone("st-bolder", 20,17, {direction=EAST})
  316. set_stone("st-stoneimpulse", 23,17)
  317. set_stone("st-stoneimpulse", 21,18)
  318.  
  319. oneway(22,18, enigma.NORTH)
  320. oneway(27,1, enigma.EAST)
  321.  
  322. set_stones("st-glass", {{1,6},{1,12},{34,1},{34,2},{35,2},{36,1},{36,2}})
  323. set_stones("st-glass", {{3,19},{3,12},{1,18},{2,18},{2,19},{1,20},{2,20}})
  324.  
  325. --draw_stones("st-greenbrown_hole", {23,18}, {1,0}, 1)
  326. draw_stones("st-greenbrown", {23,18}, {1,0}, 15)
  327. draw_stones("st-greenbrown", {21,19}, {0,1}, 4)
  328. draw_stones("st-greenbrown", {23,20}, {1,0}, 13)
  329. draw_stones("st-greenbrown", {22,22}, {1,0}, 14)
  330. draw_stones("st-greenbrown", {36,20}, {0,1}, 3)
  331. draw_stones("st-greenbrown", {19,15}, {1,0}, 19)
  332. draw_stones("st-greenbrown", {19,18}, {1,0}, 2)
  333. draw_stones("st-greenbrown", {4,18}, {1,0}, 2)
  334. draw_stones("st-greenbrown", {14,18}, {1,0}, 2)
  335. draw_stones("st-greenbrown", {15,20}, {1,0}, 2)
  336. draw_stones("st-greenbrown", {20,10}, {1,0}, 18)
  337. draw_stones("st-greenbrown", {15,16}, {1,0}, 2)
  338. draw_stones("st-greenbrown_hole", {3,16}, {1,0}, 2)
  339. draw_stones("st-greenbrown", {4,18}, {1,0}, 2)
  340. draw_stones("st-greenbrown", {3,20}, {1,0}, 2)
  341.  
  342. set_item("it-spring1",4,2)
  343. set_item("it-spring1",30,17)
  344.  
  345. doorv(19,19, {name="door1"})
  346. set_item("it-trigger", 24,16, {invisible=1,action="open", target="door1"})
  347. set_item("it-trigger", 37,16, {invisible=1,action="close", target="door1"})
  348.  
  349. set_attrib(laser(1,1, FALSE, SOUTH), "name", "laser")
  350. set_stone("st-switch", 29,2, {action="onoff", target="laser"})
  351.  
  352. set_floor("fl-bridge", 9,17, {name="bridge13"})
  353. set_item("it-trigger", 12,16, {target="bridge13", action="openclose"})
  354. set_floor("fl-bridge", 9,19, {name="bridge14"})
  355. set_item("it-trigger", 12,20, {target="bridge14", action="openclose"})
  356. doorh(37,12, {name="door2"})
  357. set_item("it-trigger", 12,18, {action="open", target="door2"})
  358. set_item("it-trigger", 35,11, {invisible=1,target="door2", action="close"})
  359.  
  360. mirrorp(4,2,TRUE,FALSE, 1)
  361. mirrorp(16,22,TRUE,FALSE, 3)
  362. mirrorp(24,14,TRUE,FALSE, 1)
  363. mirrorp(36,4,TRUE,FALSE, 1)
  364. mirrorp(4,14,TRUE,FALSE, 3)
  365. mirrorp(1,19,TRUE,FALSE, 2)
  366.  
  367. document(13,18, "Watch your step!")
  368. document(35,17, "F3")
  369. set_actor("ac-blackball", 32.5, 21.5, {player=0})
  370.