Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local tank = peripheral.wrap("left")
- local tankVolume = tank.getTankInfo()[1].capacity
- local volumeThreshold = 60000
- rednet.open("top")
- while true do
- os.sleep(1)
- local contents = tank.getTankInfo()[1].contents
- if contents ~= nil then
- if contents.amount < (tankVolume - volumeThreshold) then
- rednet.broadcast("xp30")
- print("meow")
- end
- else
- rednet.broadcast("xp30")
- print("Oh shit the tank is empty :(")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement