Advertisement
ElijahCrafter

Untitled

Feb 29th, 2024
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. -- Computer Program
  2.  
  3. -- Set the modem to the same channel as the receiver
  4. local channel = 123 -- Change this to the same channel as the receiver
  5. rednet.open("left") -- Assuming the modem is on the left side
  6.  
  7. -- Send a location request message to the receiver
  8. rednet.send(receiverId, "location_request", channel) -- Replace receiverId with the ID of the computer with the receiver
  9.  
  10. -- Wait for the response from the receiver
  11. local senderId, location = rednet.receive(channel)
  12.  
  13. -- Display the location received from the receiver
  14. print(location)
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement