Guest User

Untitled

a guest
Oct 16th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.66 KB | None | 0 0
  1. function discharge() --throws all stuff under turtle
  2.  for slot = 1, 9 do
  3.   turtle.select(slot)
  4.   turtle.dropDown()
  5.  end
  6. end
  7.  
  8. function isempty()
  9.  local empty = true
  10.  for slot = 1, 9 do
  11.   empty = empty and (turtle.select(getItemCount(slot))
  12.  end
  13. end
  14.  
  15. function redblinc() --gives out redcurrent on all faces
  16.  for k,v in pairs(rs.getSides()) do
  17.   rs.setOutput(k, true)
  18.  end
  19.  os.sleep(0.5)
  20.  for k,v in pairs(rs.getSides()) do
  21.   rs.setOutput(k, false)
  22.  end
  23. end
  24.  
  25. function deposit()
  26.  turtle.back()
  27.  turtle.back()
  28.  discharge()
  29.  redblink()
  30.  turtle.forward()
  31.  turtle.forward()
  32. end
  33.  
  34.  
  35.  repeat
  36.   shell.run(excavate, 3)
  37.   deposit()
  38.  until isempty()
Add Comment
Please, Sign In to add comment