Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print(os.getComputerID())
- local p = peripheral.wrap("back")
- mon = peripheral.wrap("top")
- rednet.open("left")
- local bool1 = false
- local bool2 = false
- local bool3 = false
- local bool4 = false
- local bool5 = false
- local bool6 = false
- local bool7 = false
- local bool8 = false
- local CID1 = 45
- local CID2 = 51
- local CID3 = 50
- local CID4 = 46
- local CID5 = 52
- local CID6 = 53
- local CID7 = 1
- local CID8 = 1
- local A = "A1P1"
- local B = "A1P2"
- local C = "A2P1"
- local D = "A2P2"
- local E = "P0P1"
- local F = "P0P2"
- local G = "NotStop"
- local H = "AlleAn"
- local I = "Ve1"
- local J = "Ve2"
- mon.clear()
- while true do
- if bool1 == true and bool2 == true then
- bool5 = true
- bool6 = true
- end
- if bool3 == true and bool4 == true then
- bool5 = true
- bool6 = true
- end
- local input = read()
- if input == I then
- bool7 = true
- rednet.send(CID7, "ON")
- else
- bool7 = false
- rednet.send(CID7, "OFF")
- end
- if input == J then
- bool8 = true
- rednet.send(CID8, "ON")
- else
- bool8 = false
- rednet.send(CID8, "OFF")
- end
- if input == G then
- os.reboot()
- end
- if input == H then
- rednet.send(CID1, "ON")
- rednet.send(CID2, "ON")
- rednet.send(CID3, "ON")
- rednet.send(CID4, "ON")
- rednet.send(CID5, "ON")
- rednet.send(CID6, "ON")
- end
- if input == A then
- if bool1 == false then
- bool1 = true
- print(bool1)
- else
- bool1 = false
- print(bool1)
- end
- end
- if input == B then
- if bool2 == false then
- bool2 = true
- print(bool2)
- else
- bool2 = false
- print(bool2)
- end
- end
- if input == C then
- if bool3 == false then
- bool3 = true
- else
- bool3 = false
- end
- end
- if input == D then
- if bool4 == false then
- bool4 = true
- else
- bool4 = false
- end
- end
- if input == E then
- if bool5 == false then
- bool5 = true
- else
- bool5 = false
- end
- end
- if input == F then
- if bool6 == false then
- bool6 = true
- else
- bool6 = false
- end
- end
- mon.setTextScale(1)
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.yellow)
- mon.write("System Motoren")
- mon.setTextScale(1)
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.white)
- mon.write("Anlage 1")
- mon.setCursorPos(1,3)
- mon.write("Pumpe1 :")
- mon.setCursorPos(1,4)
- mon.write("Pumpe2 :")
- mon.setCursorPos(1,6)
- mon.write("Anlage 2")
- mon.setCursorPos(1,7)
- mon.write("Pumpe1 :")
- mon.setCursorPos(1,8)
- mon.write("Pumpe2 :")
- mon.setCursorPos(1,10)
- mon.write("Speicher")
- mon.setCursorPos(1,11)
- mon.write("Pumpe1 :")
- mon.setCursorPos(1,12)
- mon.write("Pumpe2 :")
- mon.setCursorPos(16,2)
- mon.write("Verarb.")
- mon.setCursorPos(16,3)
- mon.write("A1 :")
- mon.setCursorPos(16,4)
- mon.write("A2 :")
- if bool1 == true then
- mon.setCursorPos(10,3)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool1 == false then
- mon.setCursorPos(10,3)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool2 == true then
- mon.setCursorPos(10,4)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool2 == false then
- mon.setCursorPos(10,4)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool3 == true then
- mon.setCursorPos(10,7)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool3 == false then
- mon.setCursorPos(10,7)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool4 == true then
- mon.setCursorPos(10,8)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool4 == false then
- mon.setCursorPos(10,8)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool5 == true then
- mon.setCursorPos(10,11)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool5 == false then
- mon.setCursorPos(10,11)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool6 == true then
- mon.setCursorPos(10,12)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool6 == false then
- mon.setCursorPos(10,12)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool7 == true then
- mon.setCursorPos(26,3)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool7 == false then
- mon.setCursorPos(26,3)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool8 == true then
- mon.setCursorPos(26,4)
- mon.setTextColor(colors.green)
- mon.write("ON ")
- elseif bool8 == false then
- mon.setCursorPos(26,4)
- mon.setTextColor(colors.red)
- mon.write("OFF")
- end
- if bool1 == true and bool2 == true then
- bool5 = true
- bool6 = true
- end
- if bool1 == true then
- rednet.send(CID1, "ON")
- else
- rednet.send(CID1, "OFF")
- end
- if bool2 == true then
- rednet.send(CID2, "ON")
- else
- rednet.send(CID2, "OFF")
- end
- if bool1 == true and bool2 == true then
- rednet.send(CID5, "ON")
- rednet.send(CID6, "ON")
- end
- if bool3 == true then
- rednet.send(CID3, "ON")
- else
- rednet.send(CID3, "OFF")
- end
- if bool4 == true then
- rednet.send(CID4, "ON")
- else
- rednet.send(CID4, "OFF")
- end
- if bool3 == true and bool4 == true then
- rednet.send(CID5, "ON")
- rednet.send(CID6, "ON")
- end
- if bool5 == true then
- rednet.send(CID5, "ON")
- else
- rednet.send(CID5, "OFF")
- end
- if bool6 == true then
- rednet.send(CID6, "ON")
- else
- rednet.send(CID6, "OFF")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement