Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- A simple item enchanter
- by Alphanumeric Sheep Pig
- The turtle will collect XP and wait.
- Whenever it reaches level 30, it
- will enchant a book and place it in
- a chest on its left. If it is out of
- books, it will take a stack from a
- chest on its right.
- ]]
- p = peripheral.wrap("right")
- p.setAutoCollect(true)
- while true do
- sleep(5)
- print("At level ",p.getLevels())
- if p.getLevels()>= 30 then
- if turtle.getItemCount(16)==0 then
- turtle.select(16)
- turtle.turnRight()
- if not turtle.suck() then
- exit()
- end
- turtle.turnLeft()
- end
- turtle.select(16)
- turtle.transferTo(1,1)
- turtle.select(1)
- p.enchant(30)
- turtle.turnLeft()
- turtle.drop()
- turtle.turnRight()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment