Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --!tunnel
- --This is simple user friendly tunneling program
- print("I will mine a 2x2 tunnel placing a torch every 5 blocks and return to the space to the right of my original position.")
- print("")
- sleep(0.5)
- print("I need torches in slot one Boss!")
- sleep(0.5)
- print("I can also lay a floor if you put a Cobblestone in slot 3!")
- local torch=1
- local cobblestone=3
- sleep(1)
- print("How many torches can I place Boss? ")
- local x=read()
- local y=(x+1)*12
- channel=os.getComputerID()
- modem.transmit(128, channel, "Minion "..os.getComputerLabel().." has started tunneling, Sir!")
- if y>=turtle.getFuelLevel() then
- print("Sorry boss, I don't have enough fuel")
- sleep(0.5)
- print("Give me fuel and try again")
- else
- local z=0
- t.up()
- t.digUp()
- for i=1, x, 1 do
- for j=1, 5, 1 do
- t.forward()
- z=z+1
- if not turtle.detectDown() then
- turtle.select(cobblestone)
- turtle.placeDown()
- end
- t.digUp()
- t.digDown()
- end
- t.up()
- t.dig()
- t.right()
- t.dig()
- t.down()
- t.left()
- turtle.select(torch)
- turtle.placeUp()
- end
- t.right()
- t.forward()
- t.digUp()
- t.right()
- for j=1, z do
- t.forward()
- if not turtle.detectDown() then
- turtle.select(cobblestone)
- turtle.placeDown()
- end
- t.digUp()
- end
- end
- --Now he sends a message to a central computer
- modem.transmit(128, channel, "Minion "..os.getComputerLabel().." has finished a tunnel, Sir!")
Advertisement
Add Comment
Please, Sign In to add comment