SHOW:
|
|
- or go back to the newest paste.
1 | - | xp = peripheral.wrap("right") |
1 | + | while true do |
2 | - | xp.setAutoCollect(true) |
2 | + | while redstone.getInput("back") do |
3 | - | |
3 | + | turtle.attack() |
4 | - | function enchantBook() |
4 | + | if turtle.getItemCount(15) > 1 then |
5 | - | turtle.select(16) |
5 | + | for i = 1, 16, 1 do |
6 | - | if turtle.getItemCount(16) == 0 then |
6 | + | turtle.select(i) |
7 | - | turtle.suckUp() |
7 | + | turtle.dropDown() |
8 | end | |
9 | - | turtle.transferTo(15, 1) |
9 | + | end |
10 | - | turtle.select(15) |
10 | + | sleep(1) |
11 | - | xp.enchant(30) |
11 | + | |
12 | - | turtle.dropUp() |
12 | + |