Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.open("back")
- exit = false
- TurtleID = 0
- protocol = "42069"
- while ( exit == false ) do
- print("[1]: Goto, [2]: Connect Turtle, [3]: Exit")
- local function getCommand()
- local cmd = io.read()
- if (tonumber(cmd) == 1) then
- print("suck my fat lard")
- rednet.send(tonumber(TurtleID), "goto", "42069")
- for i = 1, 3, 1 do --> Take in x, y, and z and send it to the turtle.
- local coord = io.read()
- rednet.send(tonumber(TurtleID), coord, protocol)
- end
- elseif (tonumber(cmd) == 2) then
- TurtleID = io.read()
- print("Connected!")
- elseif (tonumber(cmd) == 3) then
- exit()
- end
- end
- getCommand()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement