Advertisement
ThomasLp

xp turtle

Mar 3rd, 2013
1,307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1.     xp = peripheral.wrap("right")
  2.     xp.setAutoCollect(true)
  3.     local Level = 0
  4.      
  5.     function enchant()
  6.        turtle.select(1)
  7.        turtle.suck()
  8.        turtle.drop(turtle.getItemCount(1)-1)   
  9.        xp.enchant(30)
  10.        turtle.drop()  
  11.        end
  12.            
  13.     while true do
  14.        Level = xp.getLevels()
  15.        print("XP Level: "..Level)
  16.        if Level >=30 then
  17.           enchant()
  18.        else
  19.           sleep(10)
  20.        end
  21.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement