Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- e = peripheral.wrap("left")
- e.setAutoCollect(true)
- function unload()
- turtle.turnRight()
- for i = 2, 16 do
- turtle.select(i)
- turtle.drop()
- end
- turtle.select(1)
- turtle.turnLeft()
- end
- function checkFull()
- if turtle.getItemCount(16) > 0 then
- unload()
- end
- end
- function depositBook()
- turtle.turnLeft()
- turtle.drop()
- turtle.turnRight()
- end
- function enchant()
- if e.getLevels() >= 30 then
- turtle.select(1)
- e.enchant(30)
- depositBook()
- turtle.suckDown(1)
- end
- end
- while true do
- enchant()
- checkFull()
- turtle.attack()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement