poke5555

enchanter

Mar 27th, 2013
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. m = peripheral.wrap("right")
  2. m.setAutoCollect(true)
  3. local currLevel = 0
  4.  
  5. function enchantBook()
  6. turtle.select(1)
  7. turtle.suckUp()
  8. turtle.drop(turtle.getItemCount(1)-1)
  9. m.enchant(30)
  10. turtle.dropUp()
  11. end
  12.  
  13. --print(m.getLevels())
  14. --enchantBook()
  15.  
  16. while true do
  17. currLevel = m.getLevels()
  18. print("Currently Level: "..currLevel)
  19. if currLevel >=30 then
  20. enchantBook()
  21. else
  22. sleep(10)
  23. end
  24. end
Advertisement
Add Comment
Please, Sign In to add comment