Advertisement
drpepper240

cobblegen - scrapgen multiplier

Oct 7th, 2013
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. maxFillSlot = 10
  2. sleepDelay = 0.1
  3.  
  4. function Eject(slotNo)
  5.     turtle.select(slotNo)
  6.     while (turtle.getItemCount(slotNo)~=0) do
  7.         --trying to put front
  8.         --turtle.drop()
  9.         --trying to put down
  10.         turtle.dropDown()      
  11.         --waiting
  12.         sleep(sleepDelay)
  13.     end
  14. end
  15.  
  16. --clear all
  17. for i=1,16 do
  18.     Eject(i)
  19. end
  20.  
  21. --main loop
  22. while true do
  23.  
  24.     --fill exactly 3 stacks: 1, 2, 3
  25.     turtle.select(1)
  26.     turtle.suckUp()
  27.     while (turtle.getItemCount(1)<maxFillSlot*3) do
  28.         sleep(sleepDelay)
  29.         turtle.suckUp()
  30.     end
  31.     turtle.transferTo(2,maxFillSlot)
  32.     turtle.transferTo(3,maxFillSlot)
  33.     for i=4,16 do
  34.         Eject(i)
  35.     end
  36.    
  37.     --until empty try to dropDown items
  38.     while (turtle.craft()) do
  39.         Eject(16)
  40.     end
  41. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement