Advertisement
barad3eey

Auto Enchanting Turtle

Apr 1st, 2013
1,529
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.46 KB | None | 0 0
  1. ##http://www.youtube.com/user/iDotHelper
  2.  
  3.  
  4. m = peripheral.wrap("right")
  5.  m.setAutoCollect(true)
  6. local currLevel = 0
  7.  
  8.  function enchantBook()
  9.    turtle.select(1)
  10.      turtle.suckUp()
  11.       turtle.dropUp(turtle.getItemCount(1)-1)
  12.         m.enchant(30)
  13.        turtle.dropUp()
  14. end
  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(5)
  23.   end
  24.       end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement