SHOW:
|
|
- or go back to the newest paste.
1 | function g64(tbl) | |
2 | for i=1,#tbl do | |
3 | local total = 0 | |
4 | repeat | |
5 | local count = peripheral.call("front", "pushItems", "south", 1, 64, tbl[i]) | |
6 | if count == 0 then sleep(0.5) end | |
7 | print(tbl[i], count) | |
8 | total = total + count | |
9 | until total == 64 or turtle.getItemCount(tbl[i]) == 64 | |
10 | end | |
11 | end | |
12 | local function push() | |
13 | peripheral.call("top", "pullItems", "down", 4, 64, 1) | |
14 | end | |
15 | turtle.select(4) | |
16 | - | g64({1,2,3,5,6,7,9,10,11}) |
16 | + | |
17 | - | repeat sleep(0.1) push() until turtle.getItemCount(4) == 0 |
17 | + | g64 {1,2,3,5,6,7,9,10,11} |
18 | push() | |
19 | while turtle.getItemCount(4) > 0 do sleep(0.5) push() end | |
20 | turtle.craft() | |
21 | end |