Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --> Phone / mainstation whatever unga bunga monga dunga
- rednet.open("back")
- mainTurtleID = 36 --> Set to your turtle's id
- print("[1]: Goto, [2]: Deploy, [3]: Set Turtle ID")
- local function GetCommand()
- local cmd = io.read()
- if (tonumber(cmd) == 1) then
- rednet.send(mainTurtleID, "comeback", "roombaNET-1")
- for i = 0, 2, 1 do --> Take in x, y, and z and send it to the turtle.
- local coord = io.read()
- rednet.send(mainTurtleID, coord, "roombaNET-1")
- end
- end
- if (tonumber(cmd) == 2) then
- print("[1]: Mining turtle, [2]: Attack Turtle")
- if (tonumber(cmd) == 1) then
- rednet.send(mainTurtleID, "mine", "roombaNET-1")
- end
- if (tonumber(cmd) == 2) then
- rednet.send(mainTurtleID, "attack", "roombaNET-1")
- local targetComputerID = io.read() --> The attack turtle will just sit at someones computer and wait for somone.
- rednet.send(mainTurtleID, targetComputerID, "roombaNET-1")
- end
- end
- if (tonumber(cmd) == 3) then
- print("Turtle ID: ")
- local turtleID = io.read()
- mainTurtleID = turtleID
- end
- end
- GetCommand()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement