Guest User

Untitled

a guest
Dec 18th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. function selectNotEmptySlot() do
  2. -- suc=false
  3.  for i=1, 9, 1 do
  4.   turtle.select(i)
  5.   if turtle.getItemCount()>0 then
  6.    i=10
  7.   -- suc=true
  8.   end
  9.  end
  10. -- return suc
  11. end
  12.  
  13. function placeDown() do
  14.  selectNotEmptySlot()  
  15.  turtle.placeDown()
  16. -- return suc
  17. end
  18.  
  19. for i=1, 8,1 do
  20.  for j=1, 2, 1 do
  21.   for k=1, 16, 1 do
  22.    placeDown()
  23.    turtle.forward()
  24.   end
  25.   turtle.turnRight()
  26.   turtle.forward()
  27.   turtle.turnRight()
  28.   for k=1, 16, 1 do
  29.    placeDown()
  30.    turtle.forward()
  31.   end
  32.   turtle.turnLeft()
  33.   turtle.forward()
  34.   turtle.turnLeft()
  35.  end
  36.  turtle.turnRight()
  37.  turtle.forward()
  38.  turtle.forward()
  39.  turtle.turnLeft()
  40. end
Add Comment
Please, Sign In to add comment