Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- glass = peripheral.wrap("bottom")
- rednet.open( "back" )
- -- We always reset when starting back up
- glass.clear()
- -- Quarry status
- statusQuarry = glass.addText( 40, 55, "Quarry", 0xFF0000 )
- while true do
- device = ""
- rednet.broadcast( "get quarry" )
- sleep( 1 )
- senderID, message, distance = rednet.receive()
- print( senderID .. ": " .. message )
- for i in string.gmatch( message, "%S+" ) do
- if not device then
- device = i
- else
- if i == "off" then
- statusQuarry.setColor( 0x229000 )
- else
- statusQuarry.setColor( 0xFF0000 )
- end
- end
- end
- sleep( 10 )
- end
- rednet.close( "back" )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement