Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- found = 0
- deposited = false
- function deploy()
- turtle.select(1)
- turtle.placeDown()
- end
- function clearInv()
- for i = 1,10 do
- while turtle.getItemCount(i) > 0 do
- found = 1
- deposited = true
- turtle.select(i)
- turtle.dropUp()
- end
- end
- turtle.select(1)
- end
- function getMiner()
- turtle.select(1)
- while turtle.getItemCount(1) > 0 do
- clearInv()
- end
- turtle.digDown()
- end
- function isDone()
- local done = true
- if found <= 0 then
- done = false
- end
- if not deposited then
- done = false
- end
- return done
- end
- deploy()
- sleep(10)
- clearInv()
- while not isDone() do
- found = 0
- clearInv()
- sleep(3)
- end
- getMiner()
- rednet.open( "right" )
- rednet.broadcast( "cycleDone" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement