Advertisement
Kiliandeca

DecaMiner2: Break - main

Jan 19th, 2017
652
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.42 KB | None | 0 0
  1. if peripheral.getType("right") == "modem" then
  2.     rednet.open("right")
  3. elseif peripheral.getType("left") == "modem" then
  4.     rednet.open("left")
  5. else
  6.     error("Error: no modem detected")
  7. end
  8.  
  9. shell.run("label set Break")
  10.  
  11. while true do
  12.  
  13.     while turtle.getItemCount() ~= 0 do
  14.         if turtle.inspectDown() then
  15.             turtle.dropDown()
  16.         else
  17.             sleep(1)
  18.         end
  19.     end
  20.  
  21.     rednet.receive("break")
  22.     turtle.dig()
  23.  
  24. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement