Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Make sure this is an accurate number
- local turtleCount = 26
- local rsLocation = "back"
- -- Move Everythign except primary rig unit and backup chunk loaders
- function moveAll()
- rs.setBundledOutput( rsLocation, colors.orange )
- sleep( 1 )
- rs.setBundledOutput( rsLocation, 0 )
- end
- print( "Starting mine operation" )
- sleep( 2 )
- -- Start by opening the rednet controller
- rednet.open( "left" )
- -- Send the dig command to all systems
- rednet.broadcast( "cycle" )
- -- Don't do anything while we wait for all the turtles to finish
- while turtleCount > 0 do
- senderID, message, distance = rednet.receive()
- if message == 'cycleDone' then
- turtleCount = turtleCount - 1
- print( "Unit completed, " .. turtleCount .. " to go!" )
- end
- end
- -- Turtles done, move the rig!
- moveAll()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement