Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.loadAPI('ocs/apis/sensor')
- modem = peripheral.wrap('top')
- scan = sensor.wrap('front')
- local channel = {11,21,31, 12,22,32, 13,23,33, 14,24,34}
- local coords = {'2,-8,2','2,-7,2','2,-6,2', '1,-8,4','1,-7,4','1,-6,4', '-2,-8,4','-2,-7,4','-2,-6,4', '-3,-8,2','-3,-7,2','-3,-6,2',}
- while rs.getInput('right') == false do
- for i = 1, 12 do
- local stackSum = 0
- chest = chest.getTargetDetails(coords[i])
- for slotNumber = 0,27 do
- local slot = chest.Slots[slotNumber]
- if slot ~= nil then
- stackSum = stackSum + (slot.Size)
- end
- end
- modem.transmit(channel[i], 1, stackSum)
- print('Sent Data to Channel '..channel[i] .. "Amount: " ..stackSum)
- end
- print('Completed Round. Waiting 5 Seconds')
- sleep(5)
- term.clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement