Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function dump()
- turtle.select(1)
- turtle.placeUp()
- for i = 2 , 16 do
- turtle.select(i)
- turtle.dropUp()
- end
- turtle.select(1)
- turtle.digUp()
- end
- while true do
- print("Waiting for signal...")
- repeat
- sleep(.1)
- until colors.test(redstone.getBundledInput("back"),colors.magenta)
- print("Digging!")
- turtle.forward()
- n = 0
- repeat
- turtle.digDown()
- n = n + 1
- if turtle.attackDown() then
- repeat
- succ = turtle.attackDown()
- sleep(.5)
- until not succ
- end
- if turtle.getItemCount(16) ~= 0 then
- dump()
- end
- until not turtle.down()
- for i=1,n-1 do
- if turtle.attackUp() then
- repeat
- succ = turtle.attackUp()
- sleep(.5)
- until not succ
- end
- if turtle.detectUp() then turtle.digUp() end
- repeat
- until turtle.up()
- end
- dump()
- turtle.back()
- print("Ckecking for pre-existing white...")
- repeat
- sleep(math.random()*2)
- until redstone.getBundledInput("back") == 0
- print("None found! Emitting white...")
- redstone.setBundledOutput("back",colors.white)
- repeat
- sleep(math.random()*2)
- until colors.test(redstone.getBundledInput("back"),colors.orange)
- redstone.setBundledOutput("back",0)
- print("recieved orange!")
- end
Advertisement
Add Comment
Please, Sign In to add comment