Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --This code is developed by me (onix331) and is availiable under the GNU General Public License (Version 3)
- --For all CC-Versions COMPUTER-Side!
- --See http://opensource.org/licenses/GPL-3.0
- --Have fun
- rednet.open("right")
- ver = "2.6"--For updates
- status = "---"--Because i can
- function clear()--To clear the screen and set the cursor to 1,1
- term.clear()
- term.setCursorPos(1,1)
- end
- function receive()
- senderId, length, protocol = rednet.receive()
- storedlength = length
- senderId, count, protocol = rednet.receive()
- storedcount = count
- senderId, direction, protocol = rednet.receive()
- storeddirection = direction
- while true do
- clear()
- print("Length of the shaft(s): ", storedlength)
- print("Count of the shaft(s): ", storedcount)
- print("Direction of the shaft(s): ", storeddirection, "ight")
- print("Length of the shaft left: ", length)
- print("Shafts left: ", count)
- print("Fuel: ", fuel)
- print("Status: ", status)
- if status=="Done!" then
- break
- else
- senderId, length, protocol = rednet.receive()
- senderId, count, protocol = rednet.receive()
- senderId, fuel, protocol = rednet.receive()
- senderId, status, protocol = rednet.receive()
- end
- end
- end
- function pair()
- senderId, message, protocol = rednet.receive()
- if message=="pair" then--To pair to the turtle
- for i = 1, 10 do
- rednet.send(senderId, "succesfull")
- os.sleep(0.1)
- end
- print("Succesfull paired, continuing...")
- end
- clear()
- receive()
- end
- clear()
- print ("Strip-mining-program by onix331")
- print ("Version ", ver)
- print ("Place of the modem can be modified in the program, right is recommended")
- print ("Trying to receive pair request")
- pair()
- print ("Done!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement