Posted 03 April 2012 - 03:38 AM
i have a program that i made to mine a tunnel that is a 3x3x5 for 1 section and when i start the program it will ask me how many sections i want, but i would like to start it form my main base using rednet. here is the code for the tunnel.
shell.run("clear")
print("How many sections do you want?1 section=5 blocks!")
input = read()
num = tonumber(input)
for i=1, num do
print("mineing a tunnel!")
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.digUp()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
turtle.up()
turtle.turnRight()
turtle.place()
turtle.turnLeft()
turtle.down()
end
shell.run("clear")
print("Done!")
print("Do you want to run this program again?")
print("y or n")
y = io.read()
if y == "y" then
shell.run("mine")
else
shell.run("shutdown")
end
but i want to know how i would activate this using rednet from a computer that is in my main base, i know a little about computercraft but i dont know how to use rednet so please help.