Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Pinging Program
- -- Edit startup code to be 'shell.run("locPing")' to make it more reliable and useful
- -- Requires a GPS constellation built in the world to be somewhat reliable
- protocol = "turtleLocator"
- rednet.open("left")
- -- EDIT THIS TO MATCH YOUR RECEIVER MACHINE'S ID
- computerId = 5
- local x, y, z = gps.locate()
- strLoc = "X:" .. x .. " Y:" .. y
- .. " Z:" .. z .. " ID:" .. os.getComputerID()
- if os.getComputerLabel() ~= nil then
- strLoc = strLoc .. " Name:" .. os.getComputerLabel()
- end
- rednet.send(computerId, strLoc, protocol)
- print(strLoc)
- os.sleep(10)
- shell.run("locPing")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement