Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- monitor = peripheral.wrap("top")
- monitor.setTextScale(1)
- monitor.setTextColor(32768)
- rednet.open("right")
- local pc = 0
- local name = ""
- local menge = 0
- local kapazitaet = 0
- while true do
- pc,name = rednet.receive()
- pc,menge = rednet.receive()
- pc,kapazitaet = rednet.receive()
- term.clear()
- term.setCursorPos(1,1)
- if menge >= kapazitaet/2 then
- monitor.setBackgroundColor(8192)
- end
- if menge < kapazitaet/2 and menge >= kapazitaet/5 then
- monitor.setBackgroundColor(2)
- end
- if menge < kapazitaet/5 then
- monitor.setBackgroundColor(16384)
- end
- term.write("Inhalt: "..name.." ")
- term.setCursorPos(1,2)
- term.write("Fuellstand: "..menge.." / "..kapazitaet)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment