Advertisement
Kaosce

CookingTurtle

May 19th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. //Pour voir le setup : http://image.noelshack.com/fichiers/2016/20/1463694134-2016-05-19-23-38-30.png//
  2.  
  3. local t = turtle
  4. local i = 1
  5. local todrop = 1
  6. local c = 0
  7.  
  8. while true do
  9.     t.turnLeft()
  10.     for i = 1, 5 do
  11.         t.select(i)
  12.         t.suck()
  13.         if t.getItemCount(i) == 0 then
  14.             break
  15.         end
  16.         todrop = i
  17.     end
  18.     t.turnRight()
  19.     for i = 1, todrop do
  20.         t.select(i)
  21.         t.dropUp()
  22.     end
  23.     t.turnRight()
  24.     for i = 1, 5 do
  25.         t.select(i)
  26.         c = t.getItemCount() + c
  27.     end
  28.     if c == 0 then         
  29.         for i = 1, 16 do
  30.             t.select(i)
  31.             t.suckDown()
  32.             t.drop()           
  33.         end
  34.     else
  35.         for i = 6, 16 do               
  36.             t.select(i)
  37.             t.suckDown()
  38.             t.drop()
  39.         end
  40.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement