Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --updateTurtles
- PROTOCOL = "danetos3"
- shell.run("clear")
- print("Welcome to the Turtle Updater.")
- print(" ")
- local compNum = nil
- local compIDs = {}
- local fileData = {}
- for line in io.lines("stripmine.danet") do
- table.insert(fileData,line)
- end
- print("SUCCESS! Data read to table")
- rednet.open("back")
- local tempTable = {}
- tempTable[1] = "update"
- compNum = tonumber(fileData[5])
- for x=1, compNum do
- rednet.send(tonumber(fileData[x+5]),tempTable,PROTOCOL)
- print("Send UPDATE command to turtle #" .. fileData[x+5])
- os.sleep(2)
- end
- rednet.close()
- print("SUCCESS! Sent update command to " .. compNum .. " Turtles.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement