Advertisement
Aixler

Road

Sep 22nd, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.45 KB | None | 0 0
  1. turtle.select(1)
  2. slot = 1
  3. placed = 0
  4. print ("Turtle can move "..turtle.getFuelLevel().." blocks")
  5.  
  6. function inventory()
  7.   if turtle.getItemCount(slot) == 0 then
  8.     slot = slot + 1
  9.     turtle.select(slot)
  10.   end
  11. end
  12.  
  13. while turtle.getItemCount(slot) > 0 do
  14.   if turtle.placeDown() then
  15.     placed = placed + 1
  16.   end
  17.   turtle.forward()
  18.   inventory()
  19. end
  20.  
  21. print ("Placed "..placed.." blocks")
  22. print ("Fuel remaining: "..turtle.getFuelLevel().."")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement