Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function mysplit(inputstr, sep)
- if sep == nil then
- sep = "%s"
- end
- t={} ; i=1
- for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
- t[i] = str
- i = i + 1
- end
- return t
- end
- rednet.broadcast("locate")
- local senderId, message, distance = rednet.receive() -- wait for message to come back from turtle
- coords = mysplit(message,"|")
- print("x:" .. coords[1])
- print("y:" .. coords[2])
- print("z:" .. coords[3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement