Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("right")
- rednet.broadcast(" ", "setupID")
- local t = {}
- for i = 1, 3 do
- print(i)
- local id, msg, proc = rednet.receive(1)
- if not msg then
- os.reboot()
- else
- if proc == "setupID" then
- t[#t+1] = id
- print("turtle " .. id .." added")
- end
- end
- sleep(1)
- end
- turtleCount = #t
- print("# of turtles:"..turtleCount)
- sleep(2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement