Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ms = {peripheral.find "modem"}
- local f = fs.open(... or "conf.tbl", "r")
- local conf = loadstring("return " .. f.readAll())
- f.close()
- if not conf or not conf() then error "Configuration file invalid" end
- if #ms < 1 then error "Add a modem" end
- local pos = {gps.locate()}
- while true do
- local actual_config = conf()
- actual_config.ID = os.getComputerID()
- actual_config.location = pos
- for _, m in pairs(ms) do
- m.transmit(666, 666, actual_config)
- end
- print("Transmitting at", os.clock())
- sleep(actual_config.sleep_time or 3)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement