Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- screen = peripheral.wrap("monitor_0")
- rednet.open("left")
- while true do
- screen.clear()
- id,msg,dist = rednet.receive()
- rms = "Null"
- screen.setCursorPos(10,1)
- screen.write("Power Status")
- runningms = string.sub(msg, 0, 1)
- print(runningms)
- if runningms == "0" then
- print("seton")
- rms = "ON"
- elseif runningms == "1" then
- print("setoff")
- rms = "OFF"
- end
- print(rms)
- rf = string.sub(msg, (string.len(msg) - 1) * -1)
- screen.setCursorPos(2,3)
- screen.write("RF Storage: ")
- screen.setTextColor(colors.blue)
- screen.write(rf.." ")
- screen.setTextColor((tonumber(rf)>(4000000*.2)) and colors.green or colors.red)
- screen.write("("..math.floor((rf/4000000) * 100).."%)")
- screen.setTextColor(colors.white)
- screen.setCursorPos(2,4)
- screen.write("Fuel Engines are ")
- screen.setTextColor(colors.blue)
- screen.write(rms)
- screen.setTextColor(colors.white)
- print(rf..tonumber(rf))
- if tonumber(rf) < 250000 then
- redstone.setOutput("top", true)
- end
- sleep(1)
- redstone.setOutput("top", false)
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement