Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function openTurtle(id)
- print("TurtleID: ".. os.computerID() .." Waiting for remote input")
- print("Press CTRL+T to stop")
- if not id == nil then
- while true do
- local sender, message = rednet.receive()
- if sender == id then
- local output = loadstring("turtle.".. message)()
- rednet.send(id,output)
- print(message)
- end
- end
- else
- while true do
- local sender, message = rednet.receive()
- local output = loadstring("turtle.".. message)()
- rednet.send(sender,output)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment