Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function pulse(side)
- redstone.setOutput(side, true)
- os.sleep(0.1)
- redstone.setOutput(side,false)
- end
- function condense()
- for slot=2,16 do
- turtle.select(slot)
- turtle.transferTo(1)
- if(turtle.getItemSpace(1) == 0) then
- break
- end
- end
- turtle.select(1)
- end
- while true do
- turtle.place()
- while true do
- os.pullEvent('redstone')
- if(redstone.getInput('back') == true) then
- break
- end
- end
- while true do
- if(redstone.getInput('back') == false) then
- break
- end
- pulse('left')
- os.sleep(0.2)
- turtle.place()
- if(turtle.getItemCount(1) == 0) then
- condense()
- if(turtle.getItemCount(1) == 0) then
- print("Done! Reload and press enter to continue.")
- read()
- break
- end
- end
- os.sleep(3)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement