Advertisement
Guest User

frame

a guest
Jan 24th, 2015
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.47 KB | None | 0 0
  1. shell.run("clear")
  2.  
  3. i = 1
  4.  
  5. function moveFrame()
  6.   if not rs.getInput("bottom") then
  7.   rs.setOutput("top", true)
  8.   sleep(0.5)
  9.   rs.setOutput("top", false)
  10.   end
  11. end
  12.  
  13. function mine()
  14.   if not rs.getInput("bottom") then
  15.     rs.setOutput("left", true)
  16.     sleep(20)
  17.     rs.setOutput("left", false)
  18.   end
  19. end
  20.  
  21. while true do
  22.   if rs.getInput("right") then
  23.     moveFrame()
  24.     mine()
  25.     print("Durchgang ".. i)
  26.     i = i + 1
  27.     else
  28.     sleep(3)
  29.   end
  30. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement