View difference between Paste ID: NVsgVJys and jmZHsbN9
SHOW: | | - or go back to the newest paste.
1
local inv = peripheral.wrap("right")
2
3
local suck = turtle.suckUp
4
local drop = inv.drop
5
function fillSlot(slot)
6-
    turtle.suckDown()
6+
7
    suck
8-
  if not inv.dropUp(19, 1) then
8+
9
  return drop(slot, 1)
10
end
11
12
local space = false
13
while true do
14
  local dropped = fillSlot(1) or 
15
                  fillSlot(2) or 
16
                  fillSlot(3)
17
18
  if not dropped then
19
    sleep(2)
20
  end
21
end