Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Move()
- while turtle.detect() == true do
- turtle.dig()
- end
- turtle.forward()
- while turtle.detectUp() == true do
- turtle.digUp()
- end
- end
- function Torch()
- turtle.turnRight()
- turtle.up()
- while turtle.detect() == true do
- turtle.dig()
- end
- turtle.select(16)
- turtle.place()
- turtle.down()
- turtle.turnLeft()
- end
- function Corner()
- Move()
- Move()
- Move()
- end
- function Tunnel()
- while (i < lines) do
- i = i + 1
- if (i % 10) == 0 then
- Torch()
- end
- Move()
- end
- end
- print("How far down should i go?")
- lines = tonumber(read())
- i = 0
- print("How wide should the mine be?")
- lineswide = tonumber(read())
- x = 0
- while (x < lineswide) do
- x = x + 1
- Tunnel()
- turtle.turnLeft()
- Corner()
- turtle.turnLeft()
- i=0
- Tunnel()
- turtle.turnRight()
- Corner()
- turtle.turnRight()
- i=0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement