Advertisement
Guest User

startup

a guest
Mar 30th, 2013
1,370
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1. enchant = peripheral.wrap("right")
  2. book = turtle.getItemCount(1)
  3. enchant.setAutoCollect(true)
  4.  
  5. while true do
  6.  for a = 1,4 do
  7.   turtle.attack()
  8.  end
  9.  
  10.  write("I have ")
  11.  write(enchant.get())
  12.  print(" experience.")
  13.  
  14.  if enchant.getLevels() > 30 then
  15.   if book > 1 then
  16.    turtle.turnLeft()
  17.     for a = 2,16 do
  18.      turtle.select(a)
  19.      turtle.drop()
  20.     end
  21.    turtle.select(book)
  22.    enchant.enchant(30)
  23.    turtle.select(2)
  24.    turtle.drop()
  25.    turtle.turnRight()
  26.   end
  27.  end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement