Alyssa

Cobble_Compressor

Feb 10th, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.84 KB | None | 0 0
  1. function transfer(t,t2,t3)
  2.   turtle.select(4)  
  3.   turtle.transferTo(t, t2)
  4. end
  5. function overflow(sN)
  6.   if turtle.getItemCount(sN) >= 1 then
  7.     complete = false
  8.     amt = turtle.getItemCount(sN)
  9.     cSlots = {1, 2, 3, 5, 6, 7, 9, 10, 11}
  10.     for i = 1, #cSlots do
  11.       if turtle.getItemCount(cSlots[i]) <= 64 - amt then
  12.         transfer(cSlots[i],amt,sN)
  13.         complete = true
  14.         break
  15.       end
  16.     end
  17.     if not complete then
  18.       turtle.select(sN)
  19.       turtle.dropDown(64)
  20.     end
  21.     return true
  22.   else
  23.     return false
  24.   end
  25. end
  26. while true do
  27.   sleep(0.1)
  28.   --turtle.select(4)
  29.   icSlots = {4,8,12,13,14,15,16}
  30.   for b = 1, #icSlots do
  31.     if not overflow(icSlots[b]) then
  32.       break
  33.     end
  34.   end
  35.   if turtle.getItemCount(11) >= 32 then
  36.     turtle.select(16)
  37.     turtle.craft(32)
  38.     turtle.drop(32)
  39.   end
  40. end
Advertisement
Add Comment
Please, Sign In to add comment