Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- term.clear()
- function Split(s, delimiter)
- result = {};
- for match in (s .. delimiter):gmatch("(.-)" .. delimiter) do
- table.insert(result, match);
- end
- return result;
- end
- print("Connecting to rednet...")
- rednet.open("right")
- if rednet.isOpen("right") then
- print("connected")
- while true do
- id, msg = rednet.receive()
- print(msg)
- if msg == "q" then
- error()
- else
- values = Split(msg, ",")
- X = tonumber(values[001])
- Y = tonumber(values[002])
- Z = tonumber(values[003])
- end
- inputY = 0
- while inputY ~= Y do
- -- Mine X axis
- inputX = 0
- while inputX ~= X do
- turtle.dig()
- turtle.forward()
- inputX = inputX + 1;
- end
- for i = Z, 1, -1 do
- if i == 1 then
- end
- turtle.digDown()
- turtle.down()
- inputY = input + 1;
- end
- end
- end
- else
- print("Rednet not connected")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement