A brief discription:
UGSD, is a powerful program which will help you achive the best
underground tunnels with little work, this is great for joining one base to another without
having to leave either buliding, or connecting your underground lair to an outpost, or simply
just creating a connection of underground tunnels for transporting goods or people.
Features:
- Two preloaded tunnel sizes (2x2, 2x3, 3x3).
- Custom length of tunnel, in meters.
Planned features:
- Torch placement system.
Spoiler
Main Menu:Download!
Spoiler
– Writen by Falco.– My CC Profile: http://www.computerc...ser/7198-falco/
– Offical Download: http://www.computerc...sd-new-program/
version = "0.2"
function clear() – This function acts as a shell.run("clear"), without having to type your program header againg and again.
shell.run("clear")
print(" UGSD! You are running version " .. version)
print(" ————————————–")
print("")
end
function tunnel2x2() – Digs out a 2x2 tunnel.
clear() – This calls our "clear" function.
write("Please choose the length of the tunnel, in meters> ")
length = read() – this listens to our input.
for i = 1, tonumber(length) do
turtle.refuel()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.up()
turtle.turnLeft()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnRight()
end
startup() – This calls our start menu.
end
function tunnel2x3()
clear()
write("Please choose the length of the tunnel, in meters> ")
length = read()
for i = 1, tonumber(length) do
turtle.refuel()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
turtle.dig()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
end
startup()
end
function tunnel3x3()
clear()
print("Please choose the length of the tunnel, in meters> ")
length = read()
for i = 1, tonumber(length) do
turtle.refuel()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
turtle.dig()
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()
end
end
– Main Menu –
function startup()
clear()
print("Please choose a tunnel size from the menu: ")
print("")
print("[1] 2x2, Must be placed on the left!")
print("[2] 2x3, Must be placed in the center!")
print("[3] 3x3, Must be placed in the center!")
print("[4] Exit")
startupc = io.read()
if startupc == "1" then
tunnel2x2()
elseif startupc == "2" then
tunnel2x3()
elseif startupc == "3" then
tunnel3x3()
elseif startupc == "4" then
print("")
shell.run("reboot", 2)
end
end
startup() – This is line makes the program start and show the main menu.
Change Log! READ IT!:
Spoiler
Version 0.2Spoiler
Changes:Spoiler
- Readded 3x3 tunnel.
Version 0.1:
Spoiler
Features:Spoiler
- Two preloaded tunnel sizes (2x2, 2x3).
- Custom length of tunnel, in meters.
Download!
Spoiler
-- Writen by Falco.
-- My CC Profile: http://www.computercraft.info/forums2/index.php?/user/7198-falco/
-- function tunnel3x3 is currently disabled due to a bug.
version = " 0.1"
function clear()
shell.run("clear")
print("UGSD (Underground Shaft Digger)." .. version)
print("--------------------------------------")
print("")
end
function tunnel2x2()
clear()
write("Please choose the length of the tunnel, in meters> ")
length = read()
for i = 1, tonumber(length) do
turtle.refuel()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.up()
turtle.turnLeft()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnRight()
end
startup()
end
function tunnel2x3()
clear()
write("Please choose the length of the tunnel, in meters> ")
length = read()
for i = 1, tonumber(length) do
turtle.refuel()
turtle.dig()
turtle.forward()
turtle.digUp()
turtle.turnLeft()
turtle.dig()
turtle.up()
turtle.dig()
turtle.turnRight()
turtle.turnRight()
turtle.dig()
turtle.down()
turtle.dig()
turtle.turnLeft()
end
startup()
end
--function tunnel3x3()
-- clear()
-- print("Please choose the length of the tunnel, in meters> ")
-- length = read()
--for i = 1, tonumber(length) do
-- turtle.refuel()
-- turtle.digDown()
-- turtle.down()
-- turtle.digDown()
-- turtle.down()
-- turtle.digDown()
-- turtle.down()
-- turtle.dig()
-- turtle.forward()
-- turtle.digUp()
-- turtle.turnLeft()
-- turtle.dig()
-- 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()
--end
--end
function startup()
clear()
print("Please choose a tunnel size from the menu: ")
print("")
print("[1] 2x2, Must be placed on the left!")
print("[2] 2x3, Must be placed in the center!")
-- print("[3] 3x3, Must be placed in the center!")
print("[3] Exit")
startupc = io.read()
if startupc == "1" then
tunnel2x2()
elseif startupc == "2" then
tunnel2x3()
-- elseif startupc == "3" then
tunnel3x3()
elseif startupc == "3" then
print("")
shell.run("reboot", 2)
end
end
startup()
Please Note: This is the first program I've EVER made for release so be nice guys. :)/>