Advertisement
jonnathonchristopher

server

Feb 28th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 24.21 KB | None | 0 0
  1. --[[
  2.  
  3. Rail Cart elevator monitor By Jonnathon Clayton (AKA THC Butterz) V2.5.1
  4. Note: For a great comptercraft controlled elevator check out Ominous Penguin's tutorial here:  
  5. https://www.youtube.com/watch?v=OiMmMBS5e_s#t=756
  6.  
  7. Special Thanks and Credit:
  8. Credit to ben657 for his config file API
  9. Special thanks to Ominous Penguin for tips and coding advice.
  10.  
  11. -- Maximum of 16 floors, floors must have unique color wire
  12. -- Floors must be wired in color order per Color API
  13. -- Refer to the Color API here:  http://computercraft.info/wiki/Colors_%28API%29
  14. -- floor 1 = white, floor 2 = orange, floor 16 = black etc...
  15.  
  16. --]]
  17.  
  18.  
  19. -- Start Program
  20. os.loadAPI("req/config")
  21. fs.delete("/req/github")
  22. fs.delete("github")
  23. fs.delete("/req/menuApi")
  24. fs.delete("/req/wget")
  25. fs.delete("/setupParts")
  26. fs.delete("/setup")
  27. fs.delete("/setup2")
  28. fs.delete("/downloads")
  29. fs.delete("/req/req")
  30. fs.delete("/configs/configs")
  31.  
  32. while true do
  33.  
  34. config.load("configs","server")
  35.    
  36.     -- Variables modify to your needs
  37.    
  38.     -- Set number of floors up to 16
  39.     floors = tonumber(config.readVal("floors"))
  40.     -- Set monitor background color in decimal
  41.     background = tonumber(config.readVal("bcol"))
  42.     -- Set monitor text color in decimal
  43.     text = tonumber(config.readVal("tcol"))
  44.     -- Set monitor text scale
  45.     scale = tonumber(config.readVal("scal"))
  46.     -- Set the side the sensors are connected too
  47.     sensors = "bottom"
  48.     -- Set floor names every floor you have must be named
  49.     Floor_1 = config.readVal("f1")
  50.     Floor_2 = config.readVal("f2")
  51.     Floor_3 = config.readVal("f3")
  52.     Floor_4 = config.readVal("f4")
  53.     Floor_5 = config.readVal("f5")
  54.     Floor_6 = config.readVal("f6")
  55.     Floor_7 = config.readVal("f7")
  56.     Floor_8 = config.readVal("f8")
  57.     Floor_9 = config.readVal("f9")
  58.     Floor_10 = config.readVal("f10")
  59.     Floor_11 = config.readVal("f11")
  60.     Floor_12 = config.readVal("f12")
  61.     Floor_13 = config.readVal("f13")
  62.     Floor_14 = config.readVal("f14")
  63.     Floor_15 = config.readVal("f15")
  64.     Floor_16 = config.readVal("f16")
  65.    
  66.     -- Connect Monitors every floor must have a monitor (use your brain here)
  67.     f1 = peripheral.wrap('monitor_'..config.readVal("m1"))
  68.     f2 = peripheral.wrap('monitor_'..config.readVal("m2"))
  69.     f3 = peripheral.wrap('monitor_'..config.readVal("m3"))
  70.     f4 = peripheral.wrap('monitor_'..config.readVal("m4"))
  71.     f5 = peripheral.wrap('monitor_'..config.readVal("m5"))
  72.     f6 = peripheral.wrap('monitor_'..config.readVal("m6"))
  73.     f7 = peripheral.wrap('monitor_'..config.readVal("m7"))
  74.     f8 = peripheral.wrap('monitor_'..config.readVal("m8"))
  75.     f9 = peripheral.wrap('monitor_'..config.readVal("m9"))
  76.     f10 = peripheral.wrap('monitor_'..config.readVal("m10"))
  77.     f11 = peripheral.wrap('monitor_'..config.readVal("m11"))
  78.     f12 = peripheral.wrap('monitor_'..config.readVal("m12"))
  79.     f13 = peripheral.wrap('monitor_'..config.readVal("m13"))
  80.     f14 = peripheral.wrap('monitor_'..config.readVal("m14"))
  81.     f15 = peripheral.wrap('monitor_'..config.readVal("m15"))
  82.     f16 = peripheral.wrap('monitor_'..config.readVal("m16"))
  83.    
  84.     -- monitor static text
  85.     line_1 = "Cart Is"
  86.     line_2 = "Currently"
  87.     line_3 = "on"
  88.     line_5 = "Floor ="
  89.    
  90.     -- End of variables  no user input beyond this point
  91.    
  92.     -- Connect Sensors
  93.     redstone = peripheral.wrap(sensors)
  94.     rs = redstone
  95.    
  96.     -- Clear The Computer Screen
  97.     term.clear()
  98.    
  99.     -- Set up the monitors
  100.     if floors >= 1 then
  101.         f1.setBackgroundColor(background)
  102.         f1.setTextColor(text)
  103.         f1.setTextScale(scale)
  104.         f1.clear()
  105.         f1.setCursorPos(1, 1)
  106.         f1.write(line_1)
  107.         f1.setCursorPos(1, 2)
  108.         f1.write(line_2)
  109.         f1.setCursorPos(1, 3)
  110.         f1.write(line_3)
  111.         f1.setCursorPos(1, 5)
  112.         f1.write(line_5)
  113.         f1.setCursorPos(1, 6)
  114.     end
  115.    
  116.     if floors >= 2 then
  117.         f2.setBackgroundColor(background)
  118.         f2.setTextColor(text)
  119.         f2.setTextScale(scale)
  120.         f2.clear()
  121.         f2.setCursorPos(1, 1)
  122.         f2.write(line_1)
  123.         f2.setCursorPos(1, 2)
  124.         f2.write(line_2)
  125.         f2.setCursorPos(1, 3)
  126.         f2.write(line_3)
  127.         f2.setCursorPos(1, 5)
  128.         f2.write(line_5)
  129.         f2.setCursorPos(1, 6)
  130.     end
  131.    
  132.     if floors >= 3 then
  133.         f3.setBackgroundColor(background)
  134.         f3.setTextColor(text)
  135.         f3.setTextScale(scale)
  136.         f3.clear()
  137.         f3.setCursorPos(1, 1)
  138.         f3.write(line_1)
  139.         f3.setCursorPos(1, 2)
  140.         f3.write(line_2)
  141.         f3.setCursorPos(1, 3)
  142.         f3.write(line_3)
  143.         f3.setCursorPos(1, 5)
  144.         f3.write(line_5)
  145.         f3.setCursorPos(1, 6)
  146.     end
  147.    
  148.     if floors >= 4 then
  149.         f4.setBackgroundColor(background)
  150.         f4.setTextColor(text)
  151.         f4.setTextScale(scale)
  152.         f4.clear()
  153.         f4.setCursorPos(1, 1)
  154.         f4.write(line_1)
  155.         f4.setCursorPos(1, 2)
  156.         f4.write(line_2)
  157.         f4.setCursorPos(1, 3)
  158.         f4.write(line_3)
  159.         f4.setCursorPos(1, 5)
  160.         f4.write(line_5)
  161.         f4.setCursorPos(1, 6)
  162.     end
  163.    
  164.     if floors >= 5 then
  165.         f5.setBackgroundColor(background)
  166.         f5.setTextColor(text)
  167.         f5.setTextScale(scale)
  168.         f5.clear()
  169.         f5.setCursorPos(1, 1)
  170.         f5.write(line_1)
  171.         f5.setCursorPos(1, 2)
  172.         f5.write(line_2)
  173.         f5.setCursorPos(1, 3)
  174.         f5.write(line_3)
  175.         f5.setCursorPos(1, 5)
  176.         f5.write(line_5)
  177.         f5.setCursorPos(1, 6)
  178.     end
  179.    
  180.     if floors >= 6 then
  181.         f6.setBackgroundColor(background)
  182.         f6.setTextColor(text)
  183.         f6.setTextScale(scale)
  184.         f6.clear()
  185.         f6.setCursorPos(1, 1)
  186.         f6.write(line_1)
  187.         f6.setCursorPos(1, 2)
  188.         f6.write(line_2)
  189.         f6.setCursorPos(1, 3)
  190.         f6.write(line_3)
  191.         f6.setCursorPos(1, 5)
  192.         f6.write(line_5)
  193.         f6.setCursorPos(1, 6)
  194.     end
  195.    
  196.     if floors >= 7 then
  197.         f7.setBackgroundColor(background)
  198.         f7.setTextColor(text)
  199.         f7.setTextScale(scale)
  200.         f7.clear()
  201.         f7.setCursorPos(1, 1)
  202.         f7.write(line_1)
  203.         f7.setCursorPos(1, 2)
  204.         f7.write(line_2)
  205.         f7.setCursorPos(1, 3)
  206.         f7.write(line_3)
  207.         f7.setCursorPos(1, 5)
  208.         f7.write(line_5)
  209.         f7.setCursorPos(1, 6)
  210.     end
  211.    
  212.     if floors >= 8 then
  213.         f8.setBackgroundColor(background)
  214.         f8.setTextColor(text)
  215.         f8.setTextScale(scale)
  216.         f8.clear()
  217.         f8.setCursorPos(1, 1)
  218.         f8.write(line_1)
  219.         f8.setCursorPos(1, 2)
  220.         f8.write(line_2)
  221.         f8.setCursorPos(1, 3)
  222.         f8.write(line_3)
  223.         f8.setCursorPos(1, 5)
  224.         f8.write(line_5)
  225.         f8.setCursorPos(1, 6)
  226.     end
  227.    
  228.     if floors >= 9 then
  229.         f9.setBackgroundColor(background)
  230.         f9.setTextColor(text)
  231.         f9.setTextScale(scale)
  232.         f9.clear()
  233.         f9.setCursorPos(1, 1)
  234.         f9.write(line_1)
  235.         f9.setCursorPos(1, 2)
  236.         f9.write(line_2)
  237.         f9.setCursorPos(1, 3)
  238.         f9.write(line_3)
  239.         f9.setCursorPos(1, 5)
  240.         f9.write(line_5)
  241.         f9.setCursorPos(1, 6)
  242.     end
  243.    
  244.     if floors >= 10 then
  245.         f10.setBackgroundColor(background)
  246.         f10.setTextColor(text)
  247.         f10.setTextScale(scale)
  248.         f10.clear()
  249.         f10.setCursorPos(1, 1)
  250.         f10.write(line_1)
  251.         f10.setCursorPos(1, 2)
  252.         f10.write(line_2)
  253.         f10.setCursorPos(1, 3)
  254.         f10.write(line_3)
  255.         f10.setCursorPos(1, 5)
  256.         f10.write(line_5)
  257.         f10.setCursorPos(1, 6)
  258.     end
  259.    
  260.     if floors >= 11 then
  261.         f11.setBackgroundColor(background)
  262.         f11.setTextColor(text)
  263.         f11.setTextScale(scale)
  264.         f11.clear()
  265.         f11.setCursorPos(1, 1)
  266.         f11.write(line_1)
  267.         f11.setCursorPos(1, 2)
  268.         f11.write(line_2)
  269.         f11.setCursorPos(1, 3)
  270.         f11.write(line_3)
  271.         f11.setCursorPos(1, 5)
  272.         f11.write(line_5)
  273.         f11.setCursorPos(1, 6)
  274.     end
  275.    
  276.     if floors >= 12 then
  277.         f12.setBackgroundColor(background)
  278.         f12.setTextColor(text)
  279.         f12.setTextScale(scale)
  280.         f12.clear()
  281.         f12.setCursorPos(1, 1)
  282.         f12.write(line_1)
  283.         f12.setCursorPos(1, 2)
  284.         f12.write(line_2)
  285.         f12.setCursorPos(1, 3)
  286.         f12.write(line_3)
  287.         f12.setCursorPos(1, 5)
  288.         f12.write(line_5)
  289.         f12.setCursorPos(1, 6)
  290.     end
  291.    
  292.     if floors >= 13 then
  293.         f13.setBackgroundColor(background)
  294.         f13.setTextColor(text)
  295.         f13.setTextScale(scale)
  296.         f13.clear()
  297.         f13.setCursorPos(1, 1)
  298.         f13.write(line_1)
  299.         f13.setCursorPos(1, 2)
  300.         f13.write(line_2)
  301.         f13.setCursorPos(1, 3)
  302.         f13.write(line_3)
  303.         f13.setCursorPos(1, 5)
  304.         f13.write(line_5)
  305.         f13.setCursorPos(1, 6)
  306.     end
  307.    
  308.     if floors >= 14 then
  309.         f14.setBackgroundColor(background)
  310.         f14.setTextColor(text)
  311.         f14.setTextScale(scale)
  312.         f14.clear()
  313.         f14.setCursorPos(1, 1)
  314.         f14.write(line_1)
  315.         f14.setCursorPos(1, 2)
  316.         f14.write(line_2)
  317.         f14.setCursorPos(1, 3)
  318.         f14.write(line_3)
  319.         f14.setCursorPos(1, 5)
  320.         f14.write(line_5)
  321.         f14.setCursorPos(1, 6)
  322.     end
  323.    
  324.     if floors >= 15 then
  325.         f15.setBackgroundColor(background)
  326.         f15.setTextColor(text)
  327.         f15.setTextScale(scale)
  328.         f15.clear()
  329.         f15.setCursorPos(1, 1)
  330.         f15.write(line_1)
  331.         f15.setCursorPos(1, 2)
  332.         f15.write(line_2)
  333.         f15.setCursorPos(1, 3)
  334.         f15.write(line_3)
  335.         f15.setCursorPos(1, 5)
  336.         f15.write(line_5)
  337.         f15.setCursorPos(1, 6)
  338.     end
  339.    
  340.     if floors >= 16 then
  341.         f16.setBackgroundColor(background)
  342.         f16.setTextColor(text)
  343.         f16.setTextScale(scale)
  344.         f16.clear()
  345.         f16.setCursorPos(1, 1)
  346.         f16.write(line_1)
  347.         f16.setCursorPos(1, 2)
  348.         f16.write(line_2)
  349.         f16.setCursorPos(1, 3)
  350.         f16.write(line_3)
  351.         f16.setCursorPos(1, 5)
  352.         f16.write(line_5)
  353.         f16.setCursorPos(1, 6)
  354.     end
  355.  
  356.     -- Set computer cursor position
  357.     term.setCursorPos(1, 1)
  358.    
  359.     -- Line 1 on computer
  360.     print("Butterz Elevator Monitor V2.5.1")
  361.    
  362.     -- Set computer cursor position
  363.     term.setCursorPos(1, 2)
  364.    
  365.     -- testing the connection
  366.     test = rs.getBundledInput(sensors)
  367.    
  368.     -- Line 2 on computer
  369.     print("floors = ", floors)
  370.        
  371.     -- Set computer cursor position
  372.     term.setCursorPos(1, 3)
  373.        
  374.         -- Floor 1 logic
  375.         if test == 1 then
  376.             print(Floor_1)
  377.             if floors >= 1 then
  378.                 f1.write(Floor_1)
  379.             end
  380.             if floors >= 2 then
  381.                 f2.write(Floor_1)
  382.             end
  383.             if floors >= 3 then
  384.                 f3.write(Floor_1)
  385.             end
  386.             if floors >= 4 then
  387.                 f4.write(Floor_1)
  388.             end
  389.             if floors >= 5 then
  390.                 f5.write(Floor_1)
  391.             end
  392.             if floors >= 6 then
  393.                 f6.write(Floor_1)
  394.             end
  395.             if floors >= 7 then
  396.                 f7.write(Floor_1)
  397.             end
  398.             if floors >= 8 then
  399.                 f8.write(Floor_1)
  400.             end
  401.             if floors >= 9 then
  402.                 f9.write(Floor_1)
  403.             end
  404.             if floors >= 10 then
  405.                 f10.write(Floor_1)
  406.             end
  407.             if floors >= 11 then
  408.                 f11.write(Floor_1)
  409.             end
  410.             if floors >= 12 then
  411.                 f12.write(Floor_1)
  412.             end
  413.             if floors >= 13 then
  414.                 f13.write(Floor_1)
  415.             end
  416.             if floors >= 14 then
  417.                 f14.write(Floor_1)
  418.             end
  419.             if floors >= 15 then
  420.                 f15.write(Floor_1)
  421.             end
  422.             if floors >= 16 then
  423.                 f16.write(Floor_1)
  424.             end
  425.         end
  426.        
  427.         -- Floor 2 logic
  428.         if test == 2 then
  429.             print(Floor_2)
  430.             if floors >= 1 then
  431.                 f1.write(Floor_2)
  432.             end
  433.             if floors >= 2 then
  434.                 f2.write(Floor_2)
  435.             end
  436.             if floors >= 3 then
  437.                 f3.write(Floor_2)
  438.             end
  439.             if floors >= 4 then
  440.                 f4.write(Floor_2)
  441.             end
  442.             if floors >= 5 then
  443.                 f5.write(Floor_2)
  444.             end
  445.             if floors >= 6 then
  446.                 f6.write(Floor_2)
  447.             end
  448.             if floors >= 7 then
  449.                 f7.write(Floor_2)
  450.             end
  451.             if floors >= 8 then
  452.                 f8.write(Floor_2)
  453.             end
  454.             if floors >= 9 then
  455.                 f9.write(Floor_2)
  456.             end
  457.             if floors >= 10 then
  458.                 f10.write(Floor_2)
  459.             end
  460.             if floors >= 11 then
  461.                 f11.write(Floor_2)
  462.             end
  463.             if floors >= 12 then
  464.                 f12.write(Floor_2)
  465.             end
  466.             if floors >= 13 then
  467.                 f13.write(Floor_2)
  468.             end
  469.             if floors >= 14 then
  470.                 f14.write(Floor_2)
  471.             end
  472.             if floors >= 15 then
  473.                 f15.write(Floor_2)
  474.             end
  475.             if floors >= 16 then
  476.                 f16.write(Floor_2)
  477.             end
  478.         end
  479.        
  480.         -- Floor 3 logic
  481.         if test == 4 then
  482.             print(Floor_3)
  483.             if floors >= 1 then
  484.                 f1.write(Floor_3)
  485.             end
  486.             if floors >= 2 then
  487.                 f2.write(Floor_3)
  488.             end
  489.             if floors >= 3 then
  490.                 f3.write(Floor_3)
  491.             end
  492.             if floors >= 4 then
  493.                 f4.write(Floor_3)
  494.             end
  495.             if floors >= 5 then
  496.                 f5.write(Floor_3)
  497.             end
  498.             if floors >= 6 then
  499.                 f6.write(Floor_3)
  500.             end
  501.             if floors >= 7 then
  502.                 f7.write(Floor_3)
  503.             end
  504.             if floors >= 8 then
  505.                 f8.write(Floor_3)
  506.             end
  507.             if floors >= 9 then
  508.                 f9.write(Floor_3)
  509.             end
  510.             if floors >= 10 then
  511.                 f10.write(Floor_3)
  512.             end
  513.             if floors >= 11 then
  514.                 f11.write(Floor_3)
  515.             end
  516.             if floors >= 12 then
  517.                 f12.write(Floor_3)
  518.             end
  519.             if floors >= 13 then
  520.                 f13.write(Floor_3)
  521.             end
  522.             if floors >= 14 then
  523.                 f14.write(Floor_3)
  524.             end
  525.             if floors >= 15 then
  526.                 f15.write(Floor_3)
  527.             end
  528.             if floors >= 16 then
  529.                 f16.write(Floor_3)
  530.             end
  531.         end
  532.        
  533.         --Floor 4 logic
  534.         if test == 8 then
  535.             print(Floor_4)
  536.             if floors >= 1 then
  537.                 f1.write(Floor_4)
  538.             end
  539.             if floors >= 2 then
  540.                 f2.write(Floor_4)
  541.             end
  542.             if floors >= 3 then
  543.                 f3.write(Floor_4)
  544.             end
  545.             if floors >= 4 then
  546.                 f4.write(Floor_4)
  547.             end
  548.             if floors >= 5 then
  549.                 f5.write(Floor_4)
  550.             end
  551.             if floors >= 6 then
  552.                 f6.write(Floor_4)
  553.             end
  554.             if floors >= 7 then
  555.                 f7.write(Floor_4)
  556.             end
  557.             if floors >= 8 then
  558.                 f8.write(Floor_4)
  559.             end
  560.             if floors >= 9 then
  561.                 f9.write(Floor_4)
  562.             end
  563.             if floors >= 10 then
  564.                 f10.write(Floor_4)
  565.             end
  566.             if floors >= 11 then
  567.                 f11.write(Floor_4)
  568.             end
  569.             if floors >= 12 then
  570.                 f12.write(Floor_4)
  571.             end
  572.             if floors >= 13 then
  573.                 f13.write(Floor_4)
  574.             end
  575.             if floors >= 14 then
  576.                 f14.write(Floor_4)
  577.             end
  578.             if floors >= 15 then
  579.                 f15.write(Floor_4)
  580.             end
  581.             if floors >= 16 then
  582.                 f16.write(Floor_4)
  583.             end
  584.         end
  585.        
  586.         --Floor 5 logic
  587.         if test == 16 then
  588.             print(Floor_5)
  589.             if floors >= 1 then
  590.                 f1.write(Floor_5)
  591.             end
  592.             if floors >= 2 then
  593.                 f2.write(Floor_5)
  594.             end
  595.             if floors >= 3 then
  596.                 f3.write(Floor_5)
  597.             end
  598.             if floors >= 4 then
  599.                 f4.write(Floor_5)
  600.             end
  601.             if floors >= 5 then
  602.                 f5.write(Floor_5)
  603.             end
  604.             if floors >= 6 then
  605.                 f6.write(Floor_5)
  606.             end
  607.             if floors >= 7 then
  608.                 f7.write(Floor_5)
  609.             end
  610.             if floors >= 8 then
  611.                 f8.write(Floor_5)
  612.             end
  613.             if floors >= 9 then
  614.                 f9.write(Floor_5)
  615.             end
  616.             if floors >= 10 then
  617.                 f10.write(Floor_5)
  618.             end
  619.             if floors >= 11 then
  620.                 f11.write(Floor_5)
  621.             end
  622.             if floors >= 12 then
  623.                 f12.write(Floor_5)
  624.             end
  625.             if floors >= 13 then
  626.                 f13.write(Floor_5)
  627.             end
  628.             if floors >= 14 then
  629.                 f14.write(Floor_5)
  630.             end
  631.             if floors >= 15 then
  632.                 f15.write(Floor_5)
  633.             end
  634.             if floors >= 16 then
  635.                 f16.write(Floor_5)
  636.             end
  637.         end
  638.        
  639.         --Floor 6
  640.         if test == 32 then
  641.             print(Floor_6)
  642.             if floors >= 1 then
  643.                 f1.write(Floor_6)
  644.             end
  645.             if floors >= 2 then
  646.                 f2.write(Floor_6)
  647.             end
  648.             if floors >= 3 then
  649.                 f3.write(Floor_6)
  650.             end
  651.             if floors >= 4 then
  652.                 f4.write(Floor_6)
  653.             end
  654.             if floors >= 5 then
  655.                 f5.write(Floor_6)
  656.             end
  657.             if floors >= 6 then
  658.                 f6.write(Floor_6)
  659.             end
  660.             if floors >= 7 then
  661.                 f7.write(Floor_6)
  662.             end
  663.             if floors >= 8 then
  664.                 f8.write(Floor_6)
  665.             end
  666.             if floors >= 9 then
  667.                 f9.write(Floor_6)
  668.             end
  669.             if floors >= 10 then
  670.                 f10.write(Floor_6)
  671.             end
  672.             if floors >= 11 then
  673.                 f11.write(Floor_6)
  674.             end
  675.             if floors >= 12 then
  676.                 f12.write(Floor_6)
  677.             end
  678.             if floors >= 13 then
  679.                 f13.write(Floor_6)
  680.             end
  681.             if floors >= 14 then
  682.                 f14.write(Floor_6)
  683.             end
  684.             if floors >= 15 then
  685.                 f15.write(Floor_6)
  686.             end
  687.             if floors >= 16 then
  688.                 f16.write(Floor_6)
  689.             end
  690.         end
  691.        
  692.         --Floor 7
  693.         if test == 64 then
  694.             print(Floor_7)
  695.             if floors >= 1 then
  696.                 f1.write(Floor_7)
  697.             end
  698.             if floors >= 2 then
  699.                 f2.write(Floor_7)
  700.             end
  701.             if floors >= 3 then
  702.                 f3.write(Floor_7)
  703.             end
  704.             if floors >= 4 then
  705.                 f4.write(Floor_7)
  706.             end
  707.             if floors >= 5 then
  708.                 f5.write(Floor_7)
  709.             end
  710.             if floors >= 6 then
  711.                 f6.write(Floor_7)
  712.             end
  713.             if floors >= 7 then
  714.                 f7.write(Floor_7)
  715.             end
  716.             if floors >= 8 then
  717.                 f8.write(Floor_7)
  718.             end
  719.             if floors >= 9 then
  720.                 f9.write(Floor_7)
  721.             end
  722.             if floors >= 10 then
  723.                 f10.write(Floor_7)
  724.             end
  725.             if floors >= 11 then
  726.                 f11.write(Floor_7)
  727.             end
  728.             if floors >= 12 then
  729.                 f12.write(Floor_7)
  730.             end
  731.             if floors >= 13 then
  732.                 f13.write(Floor_7)
  733.             end
  734.             if floors >= 14 then
  735.                 f14.write(Floor_7)
  736.             end
  737.             if floors >= 15 then
  738.                 f15.write(Floor_7)
  739.             end
  740.             if floors >= 16 then
  741.                 f16.write(Floor_7)
  742.             end
  743.         end
  744.        
  745.         --Floor 8
  746.         if test == 128 then
  747.             print(Floor_8)
  748.             if floors >= 1 then
  749.                 f1.write(Floor_8)
  750.             end
  751.             if floors >= 2 then
  752.                 f2.write(Floor_8)
  753.             end
  754.             if floors >= 3 then
  755.                 f3.write(Floor_8)
  756.             end
  757.             if floors >= 4 then
  758.                 f4.write(Floor_8)
  759.             end
  760.             if floors >= 5 then
  761.                 f5.write(Floor_8)
  762.             end
  763.             if floors >= 6 then
  764.                 f6.write(Floor_8)
  765.             end
  766.             if floors >= 7 then
  767.                 f7.write(Floor_8)
  768.             end
  769.             if floors >= 8 then
  770.                 f8.write(Floor_8)
  771.             end
  772.             if floors >= 9 then
  773.                 f9.write(Floor_8)
  774.             end
  775.             if floors >= 10 then
  776.                 f10.write(Floor_8)
  777.             end
  778.             if floors >= 11 then
  779.                 f11.write(Floor_8)
  780.             end
  781.             if floors >= 12 then
  782.                 f12.write(Floor_8)
  783.             end
  784.             if floors >= 13 then
  785.                 f13.write(Floor_8)
  786.             end
  787.             if floors >= 14 then
  788.                 f14.write(Floor_8)
  789.             end
  790.             if floors >= 15 then
  791.                 f15.write(Floor_8)
  792.             end
  793.             if floors >= 16 then
  794.                 f16.write(Floor_8)
  795.             end
  796.         end
  797.        
  798.         --Floor 9
  799.         if test == 256 then
  800.             print(Floor_9)
  801.             if floors >= 1 then
  802.                 f1.write(Floor_9)
  803.             end
  804.             if floors >= 2 then
  805.                 f2.write(Floor_9)
  806.             end
  807.             if floors >= 3 then
  808.                 f3.write(Floor_9)
  809.             end
  810.             if floors >= 4 then
  811.                 f4.write(Floor_9)
  812.             end
  813.             if floors >= 5 then
  814.                 f5.write(Floor_9)
  815.             end
  816.             if floors >= 6 then
  817.                 f6.write(Floor_9)
  818.             end
  819.             if floors >= 7 then
  820.                 f7.write(Floor_9)
  821.             end
  822.             if floors >= 8 then
  823.                 f8.write(Floor_9)
  824.             end
  825.             if floors >= 9 then
  826.                 f9.write(Floor_9)
  827.             end
  828.             if floors >= 10 then
  829.                 f10.write(Floor_9)
  830.             end
  831.             if floors >= 11 then
  832.                 f11.write(Floor_9)
  833.             end
  834.             if floors >= 12 then
  835.                 f12.write(Floor_9)
  836.             end
  837.             if floors >= 13 then
  838.                 f13.write(Floor_9)
  839.             end
  840.             if floors >= 14 then
  841.                 f14.write(Floor_9)
  842.             end
  843.             if floors >= 15 then
  844.                 f15.write(Floor_9)
  845.             end
  846.             if floors >= 16 then
  847.                 f16.write(Floor_9)
  848.             end
  849.         end
  850.        
  851.         --Floor 10
  852.         if test == 512 then
  853.             print(Floor_10)
  854.             if floors >= 1 then
  855.                 f1.write(Floor_10)
  856.             end
  857.             if floors >= 2 then
  858.                 f2.write(Floor_10)
  859.             end
  860.             if floors >= 3 then
  861.                 f3.write(Floor_10)
  862.             end
  863.             if floors >= 4 then
  864.                 f4.write(Floor_10)
  865.             end
  866.             if floors >= 5 then
  867.                 f5.write(Floor_10)
  868.             end
  869.             if floors >= 6 then
  870.                 f6.write(Floor_10)
  871.             end
  872.             if floors >= 7 then
  873.                 f7.write(Floor_10)
  874.             end
  875.             if floors >= 8 then
  876.                 f8.write(Floor_10)
  877.             end
  878.             if floors >= 9 then
  879.                 f9.write(Floor_10)
  880.             end
  881.             if floors >= 10 then
  882.                 f10.write(Floor_10)
  883.             end
  884.             if floors >= 11 then
  885.                 f11.write(Floor_10)
  886.             end
  887.             if floors >= 12 then
  888.                 f12.write(Floor_10)
  889.             end
  890.             if floors >= 13 then
  891.                 f13.write(Floor_10)
  892.             end
  893.             if floors >= 14 then
  894.                 f14.write(Floor_10)
  895.             end
  896.             if floors >= 15 then
  897.                 f15.write(Floor_10)
  898.             end
  899.             if floors >= 16 then
  900.                 f16.write(Floor_10)
  901.             end
  902.         end
  903.        
  904.         --Floor 11
  905.         if test == 1024 then
  906.             print(Floor_11)
  907.             if floors >= 1 then
  908.                 f1.write(Floor_11)
  909.             end
  910.             if floors >= 2 then
  911.                 f2.write(Floor_11)
  912.             end
  913.             if floors >= 3 then
  914.                 f3.write(Floor_11)
  915.             end
  916.             if floors >= 4 then
  917.                 f4.write(Floor_11)
  918.             end
  919.             if floors >= 5 then
  920.                 f5.write(Floor_11)
  921.             end
  922.             if floors >= 6 then
  923.                 f6.write(Floor_11)
  924.             end
  925.             if floors >= 7 then
  926.                 f7.write(Floor_11)
  927.             end
  928.             if floors >= 8 then
  929.                 f8.write(Floor_11)
  930.             end
  931.             if floors >= 9 then
  932.                 f9.write(Floor_11)
  933.             end
  934.             if floors >= 10 then
  935.                 f10.write(Floor_11)
  936.             end
  937.             if floors >= 11 then
  938.                 f11.write(Floor_11)
  939.             end
  940.             if floors >= 12 then
  941.                 f12.write(Floor_11)
  942.             end
  943.             if floors >= 13 then
  944.                 f13.write(Floor_11)
  945.             end
  946.             if floors >= 14 then
  947.                 f14.write(Floor_11)
  948.             end
  949.             if floors >= 15 then
  950.                 f15.write(Floor_11)
  951.             end
  952.             if floors >= 16 then
  953.                 f16.write(Floor_11)
  954.             end
  955.         end
  956.        
  957.         --Floor 12
  958.         if test == 2048 then
  959.             print(Floor_12)
  960.             if floors >= 1 then
  961.                 f1.write(Floor_12)
  962.             end
  963.             if floors >= 2 then
  964.                 f2.write(Floor_12)
  965.             end
  966.             if floors >= 3 then
  967.                 f3.write(Floor_12)
  968.             end
  969.             if floors >= 4 then
  970.                 f4.write(Floor_12)
  971.             end
  972.             if floors >= 5 then
  973.                 f5.write(Floor_12)
  974.             end
  975.             if floors >= 6 then
  976.                 f6.write(Floor_12)
  977.             end
  978.             if floors >= 7 then
  979.                 f7.write(Floor_12)
  980.             end
  981.             if floors >= 8 then
  982.                 f8.write(Floor_12)
  983.             end
  984.             if floors >= 9 then
  985.                 f9.write(Floor_12)
  986.             end
  987.             if floors >= 10 then
  988.                 f10.write(Floor_12)
  989.             end
  990.             if floors >= 11 then
  991.                 f11.write(Floor_12)
  992.             end
  993.             if floors >= 12 then
  994.                 f12.write(Floor_12)
  995.             end
  996.             if floors >= 13 then
  997.                 f13.write(Floor_12)
  998.             end
  999.             if floors >= 14 then
  1000.                 f14.write(Floor_12)
  1001.             end
  1002.             if floors >= 15 then
  1003.                 f15.write(Floor_12)
  1004.             end
  1005.             if floors >= 16 then
  1006.                 f16.write(Floor_12)
  1007.             end
  1008.         end
  1009.        
  1010.         --Floor 13
  1011.         if test == 4096 then
  1012.             print(Floor_13)
  1013.             if floors >= 1 then
  1014.                 f1.write(Floor_13)
  1015.             end
  1016.             if floors >= 2 then
  1017.                 f2.write(Floor_13)
  1018.             end
  1019.             if floors >= 3 then
  1020.                 f3.write(Floor_13)
  1021.             end
  1022.             if floors >= 4 then
  1023.                 f4.write(Floor_13)
  1024.             end
  1025.             if floors >= 5 then
  1026.                 f5.write(Floor_13)
  1027.             end
  1028.             if floors >= 6 then
  1029.                 f6.write(Floor_13)
  1030.             end
  1031.             if floors >= 7 then
  1032.                 f7.write(Floor_13)
  1033.             end
  1034.             if floors >= 8 then
  1035.                 f8.write(Floor_13)
  1036.             end
  1037.             if floors >= 9 then
  1038.                 f9.write(Floor_13)
  1039.             end
  1040.             if floors >= 10 then
  1041.                 f10.write(Floor_13)
  1042.             end
  1043.             if floors >= 11 then
  1044.                 f11.write(Floor_13)
  1045.             end
  1046.             if floors >= 12 then
  1047.                 f12.write(Floor_13)
  1048.             end
  1049.             if floors >= 13 then
  1050.                 f13.write(Floor_13)
  1051.             end
  1052.             if floors >= 14 then
  1053.                 f14.write(Floor_13)
  1054.             end
  1055.             if floors >= 15 then
  1056.                 f15.write(Floor_13)
  1057.             end
  1058.             if floors >= 16 then
  1059.                 f16.write(Floor_13)
  1060.             end
  1061.         end
  1062.        
  1063.         --Floor 14
  1064.         if test == 8192 then
  1065.             print(Floor_14)
  1066.             if floors >= 1 then
  1067.                 f1.write(Floor_14)
  1068.             end
  1069.             if floors >= 2 then
  1070.                 f2.write(Floor_14)
  1071.             end
  1072.             if floors >= 3 then
  1073.                 f3.write(Floor_14)
  1074.             end
  1075.             if floors >= 4 then
  1076.                 f4.write(Floor_14)
  1077.             end
  1078.             if floors >= 5 then
  1079.                 f5.write(Floor_14)
  1080.             end
  1081.             if floors >= 6 then
  1082.                 f6.write(Floor_14)
  1083.             end
  1084.             if floors >= 7 then
  1085.                 f7.write(Floor_14)
  1086.             end
  1087.             if floors >= 8 then
  1088.                 f8.write(Floor_14)
  1089.             end
  1090.             if floors >= 9 then
  1091.                 f9.write(Floor_14)
  1092.             end
  1093.             if floors >= 10 then
  1094.                 f10.write(Floor_14)
  1095.             end
  1096.             if floors >= 11 then
  1097.                 f11.write(Floor_14)
  1098.             end
  1099.             if floors >= 12 then
  1100.                 f12.write(Floor_14)
  1101.             end
  1102.             if floors >= 13 then
  1103.                 f13.write(Floor_14)
  1104.             end
  1105.             if floors >= 14 then
  1106.                 f14.write(Floor_14)
  1107.             end
  1108.             if floors >= 15 then
  1109.                 f15.write(Floor_14)
  1110.             end
  1111.             if floors >= 16 then
  1112.                 f16.write(Floor_14)
  1113.             end
  1114.         end
  1115.        
  1116.         --Floor 15
  1117.         if test == 16384 then
  1118.             print(Floor_15)
  1119.             if floors >= 1 then
  1120.                 f1.write(Floor_15)
  1121.             end
  1122.             if floors >= 2 then
  1123.                 f2.write(Floor_15)
  1124.             end
  1125.             if floors >= 3 then
  1126.                 f3.write(Floor_15)
  1127.             end
  1128.             if floors >= 4 then
  1129.                 f4.write(Floor_15)
  1130.             end
  1131.             if floors >= 5 then
  1132.                 f5.write(Floor_15)
  1133.             end
  1134.             if floors >= 6 then
  1135.                 f6.write(Floor_15)
  1136.             end
  1137.             if floors >= 7 then
  1138.                 f7.write(Floor_15)
  1139.             end
  1140.             if floors >= 8 then
  1141.                 f8.write(Floor_15)
  1142.             end
  1143.             if floors >= 9 then
  1144.                 f9.write(Floor_15)
  1145.             end
  1146.             if floors >= 10 then
  1147.                 f10.write(Floor_15)
  1148.             end
  1149.             if floors >= 11 then
  1150.                 f11.write(Floor_15)
  1151.             end
  1152.             if floors >= 12 then
  1153.                 f12.write(Floor_15)
  1154.             end
  1155.             if floors >= 13 then
  1156.                 f13.write(Floor_15)
  1157.             end
  1158.             if floors >= 14 then
  1159.                 f14.write(Floor_15)
  1160.             end
  1161.             if floors >= 15 then
  1162.                 f15.write(Floor_15)
  1163.             end
  1164.             if floors >= 16 then
  1165.                 f16.write(Floor_15)
  1166.             end
  1167.         end
  1168.        
  1169.         --Floor 16
  1170.         if test == 32768 then
  1171.             print(Floor_16)
  1172.             if floors >= 1 then
  1173.                 f1.write(Floor_16)
  1174.             end
  1175.             if floors >= 2 then
  1176.                 f2.write(Floor_16)
  1177.             end
  1178.             if floors >= 3 then
  1179.                 f3.write(Floor_16)
  1180.             end
  1181.             if floors >= 4 then
  1182.                 f4.write(Floor_16)
  1183.             end
  1184.             if floors >= 5 then
  1185.                 f5.write(Floor_16)
  1186.             end
  1187.             if floors >= 6 then
  1188.                 f6.write(Floor_16)
  1189.             end
  1190.             if floors >= 7 then
  1191.                 f7.write(Floor_16)
  1192.             end
  1193.             if floors >= 8 then
  1194.                 f8.write(Floor_16)
  1195.             end
  1196.             if floors >= 9 then
  1197.                 f9.write(Floor_16)
  1198.             end
  1199.             if floors >= 10 then
  1200.                 f10.write(Floor_16)
  1201.             end
  1202.             if floors >= 11 then
  1203.                 f11.write(Floor_16)
  1204.             end
  1205.             if floors >= 12 then
  1206.                 f12.write(Floor_16)
  1207.             end
  1208.             if floors >= 13 then
  1209.                 f13.write(Floor_16)
  1210.             end
  1211.             if floors >= 14 then
  1212.                 f14.write(Floor_16)
  1213.             end
  1214.             if floors >= 15 then
  1215.                 f15.write(Floor_16)
  1216.             end
  1217.             if floors >= 16 then
  1218.                 f16.write(Floor_16)
  1219.             end
  1220.         end
  1221.    
  1222.     --Prevent script loop crash
  1223.     sleep(0)
  1224. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement