Quetzi

Auto Enchanter

Apr 6th, 2013
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.59 KB | None | 0 0
  1. x = peripheral.wrap("right")
  2. m = peripheral.wrap("top")
  3. m.setTextScale(1.5)
  4. local enchants = 0
  5. while true do
  6.   x.collect()
  7.   m.clear()
  8.   m.setCursorPos(1,5)
  9.   m.write("Levels stored: " .. x.getLevels() .. "")
  10.   m.setCursorPos(1,6)
  11.   m.write("Enchants completed: " .. enchants .. "")
  12.   if x.getLevels()>29 then
  13.     for i=2,16 do
  14.       if (turtle.getItemCount(i)>0) and (x.getLevels()>29) then
  15.         turtle.select(i)
  16.         turtle.transferTo(1,1)
  17.         turtle.select(1)
  18.         x.enchant(30)
  19.         turtle.drop()
  20.         enchants=enchants+1
  21.       end
  22.     end
  23.   end
  24.   sleep(10)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment