Advertisement
MuChT007

Grinder+Xp

Aug 22nd, 2013
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.60 KB | None | 0 0
  1. m = peripheral.wrap("right")
  2. m.setAutoCollect(true)
  3. local currLevel = 0
  4.  
  5. function enchantBook()
  6.     turtle.select(16)
  7.     turtle.turnLeft()
  8.     turtle.suck()
  9.     turtle.drop(turtle.getItemCount(16)-1)
  10.     m.enchant(30)
  11.     turtle.dropDown()
  12.     turtle.turnRight()
  13.     turtle.select(1)
  14.     end
  15.  
  16. turtle.select(1)
  17. while true do
  18.   turtle.attack()
  19.   currLevel = m.getLevels()
  20.   print("Currently Level: "..currLevel)
  21.     if turtle.getItemCount(1) > 0 then
  22.         for i = 15,1,-1 do
  23.             turtle.select(i)
  24.             turtle.dropUp()
  25.         end
  26.     if currLevel >=30 then
  27.     enchantBook()
  28.     end
  29.    
  30. end
  31.  
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement