Advertisement
Guest User

miner

a guest
Apr 3rd, 2015
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. local robot = require("robot")
  2. local component = require("component")
  3. local inv = component.inventory_controller
  4.  
  5. function mineDown()
  6.   local result, type = robot.swingDown()
  7.   if result == false and type == "block" then
  8.     print("Bedrock reached")
  9.     return false
  10.   else
  11.     robot.select(1)
  12.     robot.placeDown()
  13.     robot.select(5)
  14.     inv.equip()
  15.     robot.swingDown()
  16.     inv.equip()
  17.     robot.down()
  18.   end
  19. end
  20.  
  21. repeat
  22.   mineDown()
  23. until false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement