Guest User

Untitled

a guest
Oct 16th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | None | 0 0
  1. function discharge() --throws all stuff under turtle
  2.  for slot = 1, 9 do
  3.   turtle.select(slot)
  4.   turtle.drop()
  5.  end
  6. end
  7.  
  8. function isempty()
  9.  local empty = true
  10.  for slot = 1, 9 do
  11.   empty = empty and (turtle.select(turtle.getItemCount(slot)))
  12.  end
  13. end
  14.  
  15. function deposit()
  16.  turtle.turnLeft()
  17.  turtle.turnLeft()
  18.  turtle.forward()
  19.  discharge()
  20.  redblink()
  21.  turtle.turnLeft()
  22.  turtle.turnLeft()
  23.  turtle.forward()
  24. end
  25.  
  26. shell.run("excavate", "3")
  27. repeat
  28.  deposit()
  29.  shell.run("excavate", "3")
  30. until isempty()
Add Comment
Please, Sign In to add comment