Guest User

sort

a guest
Sep 19th, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local t = turtle
  2.  
  3.  
  4. t.select(16)
  5. local hasItem = t.suckDown()
  6.  
  7. local offset = 1
  8.  
  9. local function dropAt(pos)
  10.   for i=1,pos+offset do
  11.     t.forward()
  12.   end
  13.   t.dropDown()
  14.   for i=1,pos+offset do
  15.     t.back()
  16.   end  
  17. end
  18.  
  19. if (hasItem) then
  20.   for i=1,15 do
  21.     if ( t.compareTo(i) ) then
  22.       dropAt(i)
  23.       break
  24.     end
  25.   end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment