View difference between Paste ID: suNRVsM8 and zm0SzyQz
SHOW: | | - or go back to the newest paste.
1-
local component = require("component")
1+
local component = require("component")
2-
local event = require("event")
2+
local event = require("event")
3-
local modem = component.modem
3+
local modem = component.modem
4-
modem.open(2412)
4+
modem.open(2412)
5-
modem.broadcast(2412, "drone=component.proxy(component.list('drone')())")
5+
modem.broadcast(2412, "drone=component.proxy(component.list('drone')())")
6-
while true do
6+
while true do
7-
local cmd = io.read()
7+
local cmd = io.read()
8-
if not cmd then return end
8+
if not cmd then return end
9-
modem.broadcast(2412, cmd)
9+
modem.broadcast(2412, cmd)
10-
print(select(6, event.pull(5, "modem_message")))
10+
print(select(6, event.pull(5, "modem_message")))
11
end