Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("right")
- m.setAutoCollect(true)
- local currLevel = 0
- function enchantBook()
- turtle.select(16)
- turtle.turnLeft()
- turtle.suck()
- turtle.drop(turtle.getItemCount(16)-1)
- m.enchant(30)
- turtle.dropDown()
- turtle.turnRight()
- turtle.select(1)
- end
- turtle.select(1)
- while true do
- turtle.attack()
- currLevel = m.getLevels()
- print("Currently Level: "..currLevel)
- if turtle.getItemCount(1) > 0 then
- for i = 15,1,-1 do
- turtle.select(i)
- turtle.dropUp()
- end
- if currLevel >=30 then
- enchantBook()
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement