iconmaster

smeltery

Aug 10th, 2013
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.22 KB | None | 0 0
  1. while true do
  2.         repeat
  3.                 sleep(1)
  4.         until turtle.getItemCount(1) ~= 0
  5.        
  6.         turtle.turnLeft()
  7.         repeat
  8.                 for i=1,16 do
  9.                         turtle.select(i)
  10.                         repeat
  11.                         until turtle.drop() or turtle.getItemCount(i) == 0
  12.                 end
  13.         until turtle.getItemCount(1) == 0
  14.         turtle.select(1)
  15.         turtle.turnRight()
  16.        
  17.         controller = peripheral.wrap("left")
  18.         repeat
  19.             sleep(1)
  20.             done = true
  21.             for i=0,controller.getSizeInventory() do
  22.                 pcall(function() if controller.getStackInSlot(i) then
  23.                     done = false
  24.                 end end)
  25.             end
  26.         until done
  27.        
  28.         repeat
  29.                 rs.setOutput("front",true)
  30.                 sleep(.5)
  31.                 rs.setOutput("front",false)
  32.                 turtle.down()
  33.                 repeat
  34.                 until turtle.suck()
  35.                 turtle.up()
  36.                 turtle.turnLeft()
  37.                 turtle.turnLeft()
  38.                 turtle.drop()
  39.                 turtle.turnLeft()
  40.                 turtle.turnLeft()
  41.                 drain = peripheral.wrap("front")
  42.         until not drain.getTanks("front")
  43.        
  44. end
Advertisement
Add Comment
Please, Sign In to add comment