Advertisement
Zohondekids

Turtle Finder (Sitting Machine Side)

Mar 16th, 2025
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.52 KB | Source Code | 0 0
  1. -- Uses my other paste as a base
  2. -- Same protocol
  3. protocol = "turtleLocator"
  4.  
  5. rednet.open("top")
  6.  
  7. -- This is probably unnecessary tbh, but maybe edit this to match the machine you're locating?
  8. turtleId = 4
  9.  
  10. -- FINALLY THE IMPORTANT PART
  11. print("Waiting on ping from remote turtles...")
  12. print("Press enter to close program")
  13. while true do
  14. local event, key = os.pullEvent("key")
  15. if key == keys.enter then
  16.     break
  17.     end
  18. id, message = rednet.receive(protocol)
  19. if message ~= nil then
  20.     print(message)
  21.     end
  22. end
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement