Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local wmod = peripheral.wrap("top")
- wmod.closeAll()
- wmod.open(2)
- term.clear()
- term.setTextColor(colors.white)
- term.setCursorPos(1,1)
- print("Liquid status:")
- local event, modemSide, senderChannel, replyChannel, message, senderDistance = os.pullEvent("modem_message")
- while true do
- while redstone.testBundledInput("front", colors.orange) == true do
- if message["water"] > 30 then
- term.setTextColor(colors.white)
- term.setCursorPos(1,2)
- print("Water :")
- term.setTextColor(colors.green)
- term.setCursorPos(8,2)
- print( message["water"] .."%")
- end
- if message["water"] < 30 then
- term.setTextColor(colors.white)
- term.setCursorPos(1,2)
- print("Water :")
- term.setCursorPos(8,2)
- term.setTextColor(colors.red)
- print(message["water"] .."%")
- end
- end
- while redstone.testBundledInput("front", colors.orange) == false do
- term.clear()
- shell.run("menu")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment