Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("left")
- local sender_id = 17
- local my_id = os.getComputerID()
- local msg_box = {}
- function myreceive()
- while true do
- local res = {rednet.receive()}
- rednet.send(17, res[2])
- table.insert(msg_box,res)
- end
- end
- function guruguru()
- local pointer = 0
- while true do
- -- print(#msg_box)
- local msg_box_size = #msg_box
- if pointer < msg_box_size then
- for i=pointer+1 , msg_box_size do
- local msg = msg_box[i][2]
- print(i,': ',msg)
- loadstring(msg)()
- end
- pointer = msg_box_size
- end
- -- main heavy working
- for i=1,16 do
- turtle.select(i)
- end
- end
- end
- parallel.waitForAll(myreceive, guruguru)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement