Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Uses my other paste as a base
- -- Same protocol
- protocol = "turtleLocator"
- rednet.open("top")
- -- This is probably unnecessary tbh, but maybe edit this to match the machine you're locating?
- turtleId = 4
- -- FINALLY THE IMPORTANT PART
- print("Waiting on ping from remote turtles...")
- print("Press enter to close program")
- while true do
- local event, key = os.pullEvent("key")
- if key == keys.enter then
- break
- end
- id, message = rednet.receive(protocol)
- if message ~= nil then
- print(message)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement