Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.redirect(peripheral.wrap("left"))
- term.clear()
- local ss = fs.open("ss","r")
- local data = ss.readAll()
- ss.close()
- textutils.unserialise(data)
- local stacker = {data}
- rednet.open("top")
- print("Stacker:")
- while true do
- senderId, message, protocol = rednet.receive()
- if protocol == "stacker" and senderId == 144 then
- term.clear()
- print("Stacker:")
- table.insert(stacker, message)
- table.sort(stacker, function (a, b)
- return #a > #b
- end)
- local ss = fs.open("ss","w")
- ss.write(table.concat(stacker,'\n'))
- ss.close()
- write(table.concat(stacker,'\n'))
- end
- end
Add Comment
Please, Sign In to add comment