Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- tank1 = peripheral.wrap('openblocks_tank_1')
- tank2 = peripheral.wrap('openblocks_tank_2')
- tank3 = peripheral.wrap('openblocks_tank_3')
- tank4 = peripheral.wrap('openblocks_tank_4')
- while true do
- amount = 0
- -- Tank 1
- tank1table = tank1.getTankInfo("right")
- if tank1table[1]["amount"] ~= nil then do
- amount = amount + tank1table[1]["amount"]
- write(tostring(amount))
- end
- end
- -- Tank 2
- tank2table = tank2.getTankInfo("right")
- if tank2table[1]["amount"] ~= nil then do
- amount = amount + tank2table[1]["amount"]
- write(tostring(amount))
- end
- end
- -- Tank 3
- tank3table = tank3.getTankInfo("right")
- if tank3table[1]["amount"] ~= nil then do
- amount = amount + tank3table[1]["amount"]
- write(tostring(amount))
- end
- end
- -- Tank 4
- tank4table = tank4.getTankInfo("right")
- if tank4table[1]["amount"] ~= nil then do
- amount = amount + tank4table[1]["amount"]
- write(tostring(amount))
- end
- end
- --Other Funktions
- rednet.broadcast(amount.."xuutanks")
- os.sleep(10)
- term.clear()
- term.setCursorPos(1,1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement