Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tank = peripheral.wrap("drum_0")
- local info = tank.getTankInfo("unknown")
- -- prints information >>
- print(textutils.serialize(info))
- print(info[1]["contents"]["amount"])
- while true do
- info = tank.getTankInfo("unknown")
- if (info[1]["contents"]["amount"]) / (info[1]["capacity"]) < (0.8) then
- rs.setOutput("top", true)
- else
- rs.setOutput("top", false)
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment