Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- os.pullEvent = os.pullEventRaw
- shell.run("label set RCTurtleMaster")
- print("You need to shift right click the top of the computer with a wireless modem!")
- rednet.open("top")
- term.clear()
- print("Remote Control Turtle Master")
- print("Type ? for possible commands")
- while 1<2 do
- write("Cmd: ")
- a = read()
- if a == "?" then
- term.clear()
- term.setCursorPos(1,1)
- print("? - get commands")
- read()
- print("dig - dig the block in front of the turtle")
- read()
- print("forward[number] - move the turtle [number] blocks forward, destroying blocks if they are in the path")
- read()
- print("up[number] - move the turtle [number] blocks up, destroying blocks if they are in the path")
- read()
- print("down[number] - move the turtle [number] blocks down, destroying blocks if they are in the path")
- read()
- print("back[number] - move the turtle [number] blocks backwards")
- read()
- print("drop - drop all items in the selected slot in front, will put in chest/turtle if it is infront")
- read()
- print("dropup - drop all items in the selected slot above, will put in chest/turtle if it is above")
- read()
- print("dropdown - drop all items in the selected slot below, will put in chest/turtle if it is below")
- read()
- print("select[number] - select slot [number]. Only use numbers 1-16, or it may crash all the turtles")
- read()
- print("empty - drop all items in all slots in front, will put in chest/turtle if it is infront")
- read()
- print("emptyup - drop all items in all slots above, will put in chest/turtle if it is above")
- read()
- print("emptydown - drop all items in all slots below, will put in chest/turtle if it is below")
- read()
- print("ud - update this computer and the turtles")
- read()
- print("ping - find out how many turtles are listening to this computer")
- read()
- term.clear()
- term.setCursorPos(1,1)
- elseif a == "ud" then
- rednet.broadcast("ud")
- print("Will now update...")
- sleep(0.4)
- shell.run("pastebin get HVArpJ7c ud")
- shell.run("ud")
- elseif a == "ping" then
- print("Sending ping...")
- rednet.broadcast("ping")
- print("Awaiting reposes...")
- done = false
- tt = 0
- print("---------------------------------------")
- while done == false do
- p3 = "N/A"
- p1, p2 = rednet.receive(1)
- if p1 == nil then
- done = true
- else
- print("Found turtle! P1: "..p1.." P2: "..p2.." P3: "..p3)
- tt = tt + 1
- end
- end
- print("----------------------------------------")
- print("Total turtles found: "..tt)
- else
- rednet.broadcast(a)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment