Advertisement
Plazter

Enchant turtle

Jun 17th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. m = peripheral.wrap("right")
  2. m.setAutoCollect(true)
  3.  
  4. function Drop() -- u can allways rename this :D/>/>
  5.   for i = 1,16 do
  6.     if turtle.getItemCount(i) > 0 then
  7.         turtle.select(i)
  8.         turtle.drop()
  9.     end
  10.   end
  11. end
  12.  
  13. function enchantcheck()
  14.  for i = 61, 1, -1 do
  15.   if m.getLevels() >= 30 then
  16.     turtle.suckUp()
  17.     turtle.dropUp(63)
  18.      m.enchant(30)
  19.     turtle.turnRight()
  20.     turtle.drop()
  21.     turtle.turnLeft()
  22.    end
  23.   end
  24. end
  25.  
  26.  
  27. while true do
  28.  enchantcheck()
  29.   turtle.attack()
  30.   Drop()
  31.   sleep(0.5)
  32. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement