Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- enchant = peripheral.wrap("right")
- book = turtle.getItemCount(1)
- enchant.setAutoCollect(true)
- while true do
- for a = 1,4 do
- turtle.attack()
- end
- write("I have ")
- write(enchant.get())
- print(" experience.")
- if enchant.getLevels() > 30 then
- if book > 1 then
- turtle.turnLeft()
- for a = 2,16 do
- turtle.select(a)
- turtle.drop()
- end
- turtle.select(book)
- enchant.enchant(30)
- turtle.select(2)
- turtle.drop()
- turtle.turnRight()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement