Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- term.clear()
- term.setCursorPos(1,1)
- write("Welcome to the Mining program.\n The Turtle will mine a prism that's to the left, forward, and below.\n ")
- write("\n Blocks forward?")
- local forward1 = read()
- local forward = forward1-1
- write("\n Blocks left?")
- local left1 = read()
- local left = left1 - 1
- write("\n Blocks deep?")
- local deep1 = read()
- local deep = deep1 - 1
- write("\n \n After filling in the dimensions, press ENTER to start.")
- local top= forward*left
- local side = top*deep
- function DigF1(int)
- for i=1,forward do
- turtle.dig()
- turtle.forward()
- end
- function DigF(int)
- for i=1,top, forward do
- DigF1(forward)
- turtle.turnLeft()
- turtle.dig()
- turtle.turnLeft()
- end
- function DigD(int)
- for i=1,top, top do
- turtle.digDown()
- turtle.turnLeft()
- turtle.turnLeft()
- DigF(top)
- end
- function Mine(int)
- for i=1,side, top do
- DigD(top)
- print("Finished mining.")
- if sEvent == "key" then
- if param == 28 then
- Mine(side)
- break
- end
- end
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement