robathome

CC:T GPS Beacon

Oct 8th, 2026
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. -- GPS BEACON
  2. -- Replace these with THIS computer's block coordinates.
  3.  
  4. local X = 100
  5. local Y = 100
  6. local Z = 100
  7.  
  8. -- Find an attached Ender Modem.
  9. local modem = peripheral.find("modem", function(name, m)
  10. return m.isWireless()
  11. end)
  12.  
  13. if not modem then
  14. error("No wireless/Ender modem found!")
  15. end
  16.  
  17. print("GPS Beacon Online")
  18. print(("Position: %d, %d, %d"):format(X, Y, Z))
  19. print("Waiting for GPS requests...")
  20.  
  21. -- Start the built-in GPS host.
  22. shell.run("gps", "host", X, Y, Z)
Advertisement