Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Qt = {}
- --arednet.close("right")
- rednet.open("left")
- local id = rednet.receive()
- --print("Alright")
- rednet.send(id, "verify")
- local id, message = rednet.receive()
- if message == "accepted" then
- if fs.exists("QData/Settings") then
- f = fs.open("QData/Settings", "r")
- Qi = textutils.unserialise(f.readAll())
- f.close()
- f = fs.open("QData/Settings", "w")
- --table.insert(Qi, {[id] = id)
- Qi[id] = id
- f.write(textutils.serialize(Qi))
- f.close()
- else
- f = fs.open("QData/Settings", "w")
- f.write(textutils.serialize({[id] = id}))
- f.close()
- end
- end
- while true do
- local input = read()
- if input == "start" then
- rednet.send(id, "rtrue")
- elseif input == "stop" then
- rednet.send(id, "rfalse")
- elseif input == "exit" then
- rednet.close("right")
- term.clear()
- term.setCursorPos(1,1)
- break
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement