Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Universal Turtle Stop Command Broadcaster
- local wireless = peripheral.find("modem")
- if not wireless then
- error("No modem found!")
- end
- print("Broadcasting stop command to all possible turtle IDs")
- -- The stop command structure used in the original controller
- local stopCommand = {
- command = "stop",
- id = "all" -- Using "all" to indicate it's for all turtles
- }
- -- Broadcast the stop command to all possible computer IDs
- for id = 0, 65535 do
- wireless.transmit(id, os.getComputerID(), stopCommand)
- end
- print("Stop command broadcasted to all possible turtle IDs")
Advertisement
Add Comment
Please, Sign In to add comment