Advertisement
pepeknamornik

Setting 7 Nuclear

Jun 11th, 2019
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 19.53 KB | None | 0 0
  1. local function prc(text, y)
  2.   local w = term.getSize()
  3.   local _, cy = term.getCursorPos()
  4.   term.setCursorPos(math.ceil((w-#text)/2), y or cy)
  5.   write(text)
  6. end
  7.  
  8. function start ()
  9.     term.setBackgroundColor(colors.magenta)
  10.     term.setTextColor(colors.white)
  11.     term.clear ()
  12.     if not fs.exists (".core/Ikon.nft") then
  13.     shell.run("pastebin get cwfciQxe .core/Ikon.nft")
  14.     start()
  15.     end
  16.     local image = paintutils.loadImage(".core/Ikon.nft")
  17.     paintutils.drawImage(image, 18, 4)
  18.     prc ("Setting", 16)
  19.     sleep (1)
  20.     setupmenu ()
  21. end
  22.  
  23. function setupmenu ()
  24.     local myWindow = window.create(term.current(),16,1,37,19)
  25.     myWindow.setBackgroundColor(colors.white)
  26.     myWindow.clear()
  27.     if not fs.exists (".core/logo.nft") then
  28.     shell.run("pastebin get u5hbXtBq .core/logo.nft")
  29.     setupmenu()
  30.     end
  31.     local image = paintutils.loadImage(".core/logo.nft")
  32.     paintutils.drawImage(image, 22, 5)
  33.     term.setBackgroundColor(colors.white)
  34.     term.setTextColor(colors.blue)
  35.     myWindow.setCursorPos(20,17)
  36.     print"  Pepek"
  37.     myWindow.setCursorPos(28,17)
  38.     print"Soft  "
  39.     myWindow.setCursorPos(22,18)
  40.     term.setTextColor(colors.black)
  41.     print"2014-2019"
  42.     myWindow.setCursorPos(27,17)
  43.     myWindow.setTextColor(colors.lime)
  44.     print"@"
  45.     local myWindow = window.create(term.current(),1,1,16,19)
  46.     myWindow.setBackgroundColor(colors.gray)
  47.     myWindow.clear()
  48.     local myWindow = window.create(term.current(),1,1,15,19)
  49.     myWindow.setBackgroundColor(colors.green)
  50.     myWindow.clear()
  51.     term.setBackgroundColor (colors.green)
  52.     term.setTextColor(colors.lime)
  53.     term.setCursorPos(2,3)
  54.     print "Setting"
  55.     term.setTextColor(colors.white)
  56.     term.setCursorPos(2,5)
  57.     print "Info"
  58.     term.setCursorPos(2,7)
  59.     print ""
  60.     term.setCursorPos(2,9)
  61.     print "Network"
  62.     term.setCursorPos(2,11)
  63.     print ""
  64.     term.setCursorPos(2,13)
  65.     print "Updates"
  66.     term.setCursorPos(2,15)
  67.     print ""
  68.     term.setCursorPos(2,17)
  69.     print ""
  70.    
  71.       while true do
  72.     local event, button, x, y = os.pullEvent("mouse_click")
  73.     xy = x..","..y
  74.      
  75.     if x >= 2 and x <= 16 and y == 5 and button == 1 then
  76.     info ()
  77.     elseif x >= 2 and x <= 16 and y == 7 and button == 1 then
  78.     elseif x >= 2 and x <= 16 and y == 9 and button == 1 then
  79.     network ()
  80.     elseif x >= 2 and x <= 16 and y == 11 and button == 1 then
  81.     elseif x >= 2 and x <= 16 and y == 13 and button == 1 then
  82.     elseif x >= 2 and x <= 16 and y == 15 and button == 1 then
  83.     elseif x >= 2 and x <= 16 and y == 17 and button == 1 then
  84.     else
  85.     paintutils.drawLine(1, 1, 51, 1, colors.black)
  86.     paintutils.drawPixel (51,1, colors.red)
  87.     term.setCursorPos (51,1)
  88.     print "*"
  89.              while true do
  90.         local event, button, x, y = os.pullEvent("mouse_click")
  91.         xy = x..","..y
  92.        
  93.         if x == 51 and y == 1 then
  94.             plocha ()
  95.         else
  96.         setupmenu ()
  97.             end
  98.             end
  99.     break
  100.     end
  101.     end
  102. end
  103.  
  104. function info ()
  105. local myWindow = window.create(term.current(),16,1,37,19)
  106.     myWindow.setBackgroundColor(colors.white)
  107.     myWindow.clear()
  108.         local myWindow = window.create(term.current(),1,1,16,19)
  109.     myWindow.setBackgroundColor(colors.gray)
  110.     myWindow.clear()
  111. local myWindow = window.create(term.current(),1,1,15,19)
  112.     myWindow.setBackgroundColor(colors.green)
  113.     myWindow.clear()
  114.     term.setBackgroundColor (colors.green)
  115.     term.setTextColor(colors.lime)
  116.     print "< Info"
  117.     term.setCursorPos(2,3)
  118.         local myWindow = window.create(term.current(),17,1,37,19)
  119.     myWindow.setBackgroundColor(colors.white)
  120.     myWindow.clear()
  121.     term.setBackgroundColor(colors.green)
  122.        term.setCursorPos(1,1)
  123.        print "               "
  124.        paintutils.drawPixel(16, 1, colors.gray)
  125.        term.setBackgroundColor(colors.white)
  126.        term.setCursorPos(17,1)
  127.        print "                                   "
  128.        myWindow.setTextColor(colors.blue)
  129.     myWindow.setCursorPos(9, 18)
  130.     print "Pepek@Soft"
  131.     term.setTextColor(colors.black)
  132.     myWindow.setCursorPos(20, 18)
  133.     print "Software"
  134.     myWindow.setTextColor(colors.lime)
  135.     myWindow.setCursorPos(14, 18)
  136.     print "@"
  137.     myWindow.setTextColor(colors.black)
  138.     myWindow.setCursorPos(2, 3)
  139.     print "Pepdroll 7"
  140.     myWindow.setCursorPos(12, 3)
  141.     myWindow.setTextColor(colors.green)
  142.     print " Nuclear Edition"
  143.     myWindow.setTextColor(colors.black)
  144.     myWindow.setCursorPos(2, 6)
  145.     print "Nuclear edition for easy control  "
  146.     myWindow.setCursorPos(2, 7)
  147.     print "for IC2 reactor with project red  "
  148.     myWindow.setCursorPos(2, 8)
  149.     print "Bundled Cable.                    "
  150.     myWindow.setCursorPos(2, 11)
  151.     print ("Current version "..verze)
  152.     internetcon = ""
  153.     myWindow.setCursorPos(2, 13)
  154.     if fs.exists ("/online") then
  155.     myWindow.setTextColor(colors.black)
  156.     internetcon = "Internet access"
  157.     else
  158.     myWindow.setTextColor(colors.red)
  159.     internetcon = "No internet access"
  160.     end
  161.     myWindow.setCursorPos(12, 13)
  162.     print (internetcon)
  163.     myWindow.setTextColor(colors.black)
  164.     myWindow.setCursorPos(2, 13)
  165.     print ("Network : ")
  166.     myWindow.setCursorPos(2, 14)
  167.     if os.getComputerLabel() == nil then
  168.         print ("Label   : None")
  169.         else
  170.     print ("Label   : "..(os.getComputerLabel()))
  171.     end
  172.     term.setBackgroundColor (colors.green)
  173.     term.setTextColor(colors.lime)
  174.     term.setCursorPos(2,3)
  175.     print "< Info"
  176. term.setTextColor(colors.white)
  177.    
  178.       while true do
  179.     local event, button, x, y = os.pullEvent("mouse_click")
  180.     xy = x..","..y
  181.      
  182.     if x >= 2 and x <= 16 and y == 3 and button == 1 then
  183.     setupmenu ()
  184.     elseif x >= 2 and x <= 16 and y == 5 and button == 1 then
  185.     else
  186.     paintutils.drawLine(1, 1, 51, 1, colors.black)
  187.     paintutils.drawPixel (51,1, colors.red)
  188.     term.setCursorPos (51,1)
  189.     print "*"
  190.     paintutils.drawPixel (50,1, colors.lightGray)
  191.     term.setCursorPos (50,1)
  192.     print "<"
  193.              while true do
  194.         local event, button, x, y = os.pullEvent("mouse_click")
  195.         xy = x..","..y
  196.        
  197.         if x == 51 and y == 1 then
  198.             plocha ()
  199.         elseif x == 50 and y == 1 then
  200.             setupmenu ()
  201.         else
  202.         info ()
  203.             end
  204.             end
  205. end
  206. end
  207. end
  208.  
  209. function network ()
  210.     if not fs.exists (".core/network.nfp") then
  211.     shell.run("pastebin get 8zkYBLPE .core/network.nfp")
  212.     network()
  213.     end
  214.     local image = paintutils.loadImage(".core/network.nfp")
  215.     paintutils.drawImage(image, 17, 1)
  216.     local myWindow = window.create(term.current(),1,1,16,19)
  217.     myWindow.setBackgroundColor(colors.gray)
  218.     myWindow.clear()
  219.     local myWindow = window.create(term.current(),1,1,15,19)
  220.     myWindow.setBackgroundColor(colors.green)
  221.     myWindow.clear()
  222.     term.setBackgroundColor (colors.green)
  223.     term.setTextColor(colors.lime)
  224.     term.setCursorPos(2,3)
  225.     print "< Network"
  226.     term.setTextColor(colors.white)
  227.     term.setCursorPos(2,5)
  228.     print "Modem"
  229.     term.setCursorPos(2,7)
  230.     print "Label"
  231.    
  232.       while true do
  233.     local event, button, x, y = os.pullEvent("mouse_click")
  234.     xy = x..","..y
  235.      
  236.     if x >= 2 and x <= 16 and y == 3 and button == 1 then
  237.     setupmenu ()
  238.     elseif x >= 2 and x <= 16 and y == 5 and button == 1 then
  239.     modem ()
  240.     elseif x >= 2 and x <= 16 and y == 7 and button == 1 then
  241.     label ()
  242.     else
  243.     paintutils.drawLine(1, 1, 51, 1, colors.black)
  244.     paintutils.drawPixel (51,1, colors.red)
  245.     term.setCursorPos (51,1)
  246.     print "*"
  247.     paintutils.drawPixel (50,1, colors.lightGray)
  248.     term.setCursorPos (50,1)
  249.     print "<"
  250.              while true do
  251.         local event, button, x, y = os.pullEvent("mouse_click")
  252.         xy = x..","..y
  253.        
  254.         if x == 51 and y == 1 then
  255.             plocha ()
  256.         elseif x == 50 and y == 1 then
  257.             setupmenu ()
  258.         else
  259.         network ()
  260.             end
  261.             end
  262.         end
  263.         end
  264.     end
  265.  
  266. function modem ()
  267.    
  268.     term.setBackgroundColor(colors.green)
  269.        term.setCursorPos(1,1)
  270.        print "               "
  271.        paintutils.drawPixel(16, 1, colors.gray)
  272.     local myWindow = window.create(term.current(),17,1,37,19)
  273.     myWindow.setBackgroundColor(colors.white)
  274.     myWindow.clear()
  275.         if not fs.exists (".core/modem") then
  276.         back = "0"
  277.         left = "0"
  278.         right = "0"
  279.         top = "1"
  280.         bottom = "0"
  281.         else
  282.     data = fs.open (".core/modem", "r")
  283.         back = data.readLine ()
  284.         left = data.readLine ()
  285.         right = data.readLine ()
  286.         top = data.readLine ()
  287.         bottom = data.readLine ()
  288.         data.close ()
  289.         end
  290.        
  291.     if back == "1" then
  292. local function openRednet()
  293.   for _,side in ipairs({"back"}) do
  294.         if peripheral.isPresent(side) and peripheral.getType(side) == "modem" then
  295.           rednet.open(side)
  296.           return side
  297.         end
  298.   end
  299.   back = "0"
  300. end
  301.  
  302. modemSide = openRednet()
  303. if modemSide == nil then
  304.   back = "0"
  305. else
  306.   print("Opened modem on "..modemSide)
  307. end
  308.     end
  309.    
  310.     if left == "1" then
  311. local function openRednet()
  312.   for _,side in ipairs({"left"}) do
  313.         if peripheral.isPresent(side) and peripheral.getType(side) == "modem" then
  314.           rednet.open(side)
  315.           return side
  316.         end
  317.   end
  318.   left = "0"
  319. end
  320.  
  321. modemSide = openRednet()
  322. if modemSide == nil then
  323.   left = "0"
  324. else
  325.   print("Opened modem on "..modemSide)
  326. end
  327.     end
  328.    
  329.     if right == "1" then
  330. local function openRednet()
  331.   for _,side in ipairs({"right"}) do
  332.         if peripheral.isPresent(side) and peripheral.getType(side) == "modem" then
  333.           rednet.open(side)
  334.           return side
  335.         end
  336.   end
  337.   right = "0"
  338. end
  339.  
  340. modemSide = openRednet()
  341. if modemSide == nil then
  342.   right = "0"
  343. else
  344.   print("Opened modem on "..modemSide)
  345. end
  346.  
  347.     end
  348.    
  349.     if top == "1" then
  350. local function openRednet()
  351.   for _,side in ipairs({"top"}) do
  352.         if peripheral.isPresent(side) and peripheral.getType(side) == "modem" then
  353.           rednet.open(side)
  354.           return side
  355.         end
  356.   end
  357.   top = "0"
  358. end
  359.  
  360. modemSide = openRednet()
  361. if modemSide == nil then
  362.   top = "0"
  363. else
  364.   print("Opened modem on "..modemSide)
  365. end
  366.  
  367.     end
  368.    
  369.     if bottom == "1" then
  370. local function openRednet()
  371.   for _,side in ipairs({"bottom"}) do
  372.         if peripheral.isPresent(side) and peripheral.getType(side) == "modem" then
  373.           rednet.open(side)
  374.           return side
  375.         end
  376.   end
  377.   bottom = "0"
  378. end
  379.  
  380. modemSide = openRednet()
  381. if modemSide == nil then
  382.   bottom = "0"
  383. else
  384.   print("Opened modem on "..modemSide)
  385. end
  386.  
  387.     end
  388.    
  389.     term.setTextColor(colors.blue)
  390.     term.setBackgroundColor(colors.white)
  391.     myWindow.setCursorPos (2,2)
  392.     print "Modem connection"
  393.     term.setCursorPos(22, 7)
  394.     term.setTextColor(colors.black)
  395.     print ("Back")
  396.     term.setCursorPos(37, 7)
  397.          if back == "0" then
  398.         stavback = "No"
  399.         else
  400.         stavback = "Yes"
  401.         end
  402.        
  403.         term.setBackgroundColor(colors.lightGray)
  404.         term.setTextColor(colors.white)
  405.     print ("  "..stavback.."  ")
  406.         if stavback == "Yes" then
  407.             paintutils.drawPixel (37, 7, colors.lime)
  408.         elseif stavback == "No" then
  409.             paintutils.drawPixel (43, 7, colors.red)
  410.             paintutils.drawPixel (37, 7, colors.lightGray)
  411.        end
  412.        term.setBackgroundColor(colors.white)
  413.        term.setTextColor(colors.black)
  414.        term.setCursorPos(22, 9)
  415.     print ("Left")
  416.     term.setCursorPos(37, 9)
  417.          if left == "0" then
  418.         stavleft = "No"
  419.         else
  420.         stavleft = "Yes"
  421.         end
  422.        
  423.         term.setBackgroundColor(colors.lightGray)
  424.         term.setTextColor(colors.white)
  425.     print ("  "..stavleft.."  ")
  426.         if stavleft == "Yes" then
  427.             paintutils.drawPixel (37, 9, colors.lime)
  428.         elseif stavleft == "No" then
  429.             paintutils.drawPixel (43, 9, colors.red)
  430.             paintutils.drawPixel (37, 9, colors.lightGray)
  431.        end
  432.        term.setBackgroundColor(colors.white)
  433.        term.setTextColor(colors.black)
  434.        term.setCursorPos(22, 11)
  435.     print ("Right")
  436.     term.setCursorPos(37, 11)
  437.          if right == "0" then
  438.         stavright = "No"
  439.         else
  440.         stavright = "Yes"
  441.         end
  442.        
  443.         term.setBackgroundColor(colors.lightGray)
  444.         term.setTextColor(colors.white)
  445.     print ("  "..stavright.."  ")
  446.         if stavright == "Yes" then
  447.             paintutils.drawPixel (37, 11, colors.lime)
  448.         elseif stavright == "No" then
  449.             paintutils.drawPixel (43, 11, colors.red)
  450.             paintutils.drawPixel (37, 11, colors.lightGray)
  451.        end
  452.        term.setBackgroundColor(colors.white)
  453.        term.setTextColor(colors.black)
  454.        term.setCursorPos(22, 13)
  455.     print ("Top")
  456.     term.setCursorPos(37, 13)
  457.          if top == "0" then
  458.         stavtop = "No"
  459.         else
  460.         stavtop = "Yes"
  461.         end
  462.        
  463.         term.setBackgroundColor(colors.lightGray)
  464.         term.setTextColor(colors.white)
  465.     print ("  "..stavtop.."  ")
  466.         if stavtop == "Yes" then
  467.             paintutils.drawPixel (37, 13, colors.lime)
  468.         elseif stavtop == "No" then
  469.             paintutils.drawPixel (43, 13, colors.red)
  470.             paintutils.drawPixel (37, 13, colors.lightGray)
  471.        end
  472.        term.setBackgroundColor(colors.white)
  473.        term.setTextColor(colors.black)
  474.        term.setCursorPos(22, 15)
  475.     print ("Bottom")
  476.     term.setCursorPos(37, 15)
  477.          if bottom == "0" then
  478.         stavbottom = "No"
  479.         else
  480.         stavbottom = "Yes"
  481.         end
  482.        
  483.         term.setBackgroundColor(colors.lightGray)
  484.         term.setTextColor(colors.white)
  485.     print ("  "..stavbottom.."  ")
  486.         if stavbottom == "Yes" then
  487.             paintutils.drawPixel (37, 15, colors.lime)
  488.         elseif stavbottom == "No" then
  489.             paintutils.drawPixel (43, 15, colors.red)
  490.             paintutils.drawPixel (37, 15, colors.lightGray)
  491.        end
  492.     local myWindow = window.create(term.current(),1,1,16,19)
  493.     myWindow.setBackgroundColor(colors.gray)
  494.     myWindow.clear()
  495.     local myWindow = window.create(term.current(),1,1,15,19)
  496.     myWindow.setBackgroundColor(colors.green)
  497.     myWindow.clear()
  498.     term.setBackgroundColor (colors.green)
  499.     term.setTextColor(colors.lime)
  500.     term.setCursorPos(2,3)
  501.     print "< Network"
  502.     term.setTextColor(colors.white)
  503.     term.setCursorPos(2,5)
  504.     print "Modem"
  505.     term.setCursorPos(2,7)
  506.     print "Label"  
  507.    
  508.     while true do
  509.         local event, button, x, y = os.pullEvent("mouse_click")
  510.         xy = x..","..y
  511.  
  512.     if x >= 37 and x <= 43 and y == 7 and button == 1 then
  513.     if back == "1" then
  514.     back = "0"
  515.     rednet.close ("back")
  516.     elseif back == "0" then
  517.     back = "1"
  518.     end
  519.            data = fs.open (".core/modem", "w")
  520.            data.writeLine (back)
  521.            data.writeLine (left)
  522.            data.writeLine (right)
  523.            data.writeLine (top)
  524.            data.writeLine (bottom)
  525.            data.close ()
  526.         modem ()
  527.     elseif x >= 37 and x <= 43 and y == 9 and button == 1 then
  528.     if left == "1" then
  529.     left = "0"
  530.     rednet.close ("left")
  531.     elseif left == "0" then
  532.     left = "1"
  533.     end
  534.            data = fs.open (".core/modem", "w")
  535.            data.writeLine (back)
  536.            data.writeLine (left)
  537.            data.writeLine (right)
  538.            data.writeLine (top)
  539.            data.writeLine (bottom)
  540.            data.close ()
  541.         modem ()
  542.     elseif x >= 37 and x <= 43 and y == 11 and button == 1 then
  543.     if right == "1" then
  544.     right = "0"
  545.     rednet.close ("right")
  546.     elseif right == "0" then
  547.     right = "1"
  548.     end
  549.            data = fs.open (".core/modem", "w")
  550.            data.writeLine (back)
  551.            data.writeLine (left)
  552.            data.writeLine (right)
  553.            data.writeLine (top)
  554.            data.writeLine (bottom)
  555.            data.close ()
  556.         modem ()
  557.     elseif x >= 37 and x <= 43 and y == 13 and button == 1 then
  558.     if top == "1" then
  559.     top = "0"
  560.     rednet.close ("top")
  561.     elseif top == "0" then
  562.     top = "1"
  563.     end
  564.            data = fs.open (".core/modem", "w")
  565.            data.writeLine (back)
  566.            data.writeLine (left)
  567.            data.writeLine (right)
  568.            data.writeLine (top)
  569.            data.writeLine (bottom)
  570.            data.close ()
  571.         modem ()
  572.     elseif x >= 37 and x <= 43 and y == 15 and button == 1 then
  573.     if bottom == "1" then
  574.     bottom = "0"
  575.     rednet.close ("bottom")
  576.     elseif bottom == "0" then
  577.     bottom = "1"
  578.     end
  579.            data = fs.open (".core/modem", "w")
  580.            data.writeLine (back)
  581.            data.writeLine (left)
  582.            data.writeLine (right)
  583.            data.writeLine (top)
  584.            data.writeLine (bottom)
  585.            data.close ()
  586.         modem ()
  587.     elseif x >= 2 and x <= 16 and y == 3 and button == 1 then
  588.     setupmenu ()
  589.     elseif x >= 2 and x <= 16 and y == 5 and button == 1 then
  590.     modem ()
  591.     elseif x >= 2 and x <= 16 and y == 7 and button == 1 then
  592.     label ()
  593.     else
  594.     paintutils.drawLine(1, 1, 51, 1, colors.black)
  595.     paintutils.drawPixel (51,1, colors.red)
  596.     term.setTextColor(colors.white)
  597.     term.setCursorPos (51,1)
  598.     print "*"
  599.     paintutils.drawPixel (50,1, colors.lightGray)
  600.     term.setCursorPos (50,1)
  601.     print "<"
  602.              while true do
  603.         local event, button, x, y = os.pullEvent("mouse_click")
  604.         xy = x..","..y
  605.        
  606.         if x == 51 and y == 1 then
  607.             plocha ()
  608.         elseif x == 50 and y == 1 then
  609.             network ()
  610.         else
  611.         modem ()
  612.             end
  613.             end
  614. end
  615. end
  616. end
  617.  
  618. function label ()
  619.         local myWindow = window.create(term.current(),17,1,37,19)
  620.     myWindow.setBackgroundColor(colors.white)
  621.     myWindow.clear()
  622.     term.setBackgroundColor(colors.green)
  623.        term.setCursorPos(1,1)
  624.        print "               "
  625.        paintutils.drawPixel(16, 1, colors.gray)
  626.        term.setBackgroundColor(colors.white)
  627.        term.setCursorPos(17,1)
  628.        print "                                   "
  629.      myWindow.setTextColor(colors.black)
  630.     myWindow.setCursorPos(2, 9)
  631.     print("Set label: ")
  632.     myWindow.setCursorPos(2, 11)
  633.     print("Label clear: ")
  634.     term.setBackgroundColor(colors.lightGray)
  635.     myWindow.setTextColor(colors.black)
  636.     myWindow.setCursorPos(14, 9)
  637.     print "          "
  638.     myWindow.setCursorPos(14, 9)
  639.     if os.getComputerLabel() == nil then
  640.         print "None"
  641.         else
  642.     print(os.getComputerLabel())
  643.     end
  644.     term.setBackgroundColor(colors.gray)
  645.     myWindow.setCursorPos(15, 11)
  646.     print " Clear "
  647.    
  648.    
  649.         while true do
  650.         local event, button, x, y = os.pullEvent("mouse_click")
  651.         xy = x..","..y
  652.    
  653.     if x >= 29 and x <= 39 and y == 9 and button == 1 then
  654.         term.setBackgroundColor(colors.gray)
  655.         myWindow.setCursorPos(14, 9)
  656.         print "          "
  657.         myWindow.setCursorPos(14, 9)
  658.         propojeni = read ()
  659.         os.setComputerLabel(propojeni)
  660.         label ()
  661.     elseif x >= 30 and x <= 37 and y == 11 and button == 1 then
  662.         myWindow.setCursorPos(14, 9)
  663.         shell.run ("label clear")
  664.         label ()
  665.     elseif x >= 2 and x <= 16 and y == 3 and button == 1 then
  666.     setupmenu ()
  667.     elseif x >= 2 and x <= 16 and y == 5 and button == 1 then
  668.     modem ()
  669.     elseif x >= 2 and x <= 16 and y == 7 and button == 1 then
  670.     label ()
  671.     else
  672.     paintutils.drawLine(1, 1, 51, 1, colors.black)
  673.     paintutils.drawPixel (51,1, colors.red)
  674.     term.setTextColor(colors.white)
  675.     term.setCursorPos (51,1)
  676.     print "*"
  677.     paintutils.drawPixel (50,1, colors.lightGray)
  678.     term.setCursorPos (50,1)
  679.     print "<"
  680.              while true do
  681.         local event, button, x, y = os.pullEvent("mouse_click")
  682.         xy = x..","..y
  683.        
  684.         if x == 51 and y == 1 then
  685.             plocha ()
  686.         elseif x == 50 and y == 1 then
  687.             network ()
  688.         else
  689.         label ()
  690.             end
  691.             end
  692. end
  693. end
  694. end
  695.  
  696. function plocha()
  697. nuclear()
  698. end
  699. start()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement