Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- desHeight = tonumber(args[1])
- desLength = tonumber(args[2])
- desWidth = tonumber(args[3])
- function digLenth (length)
- for i=1, length - 1,1 do
- print(i)
- turtle.dig()
- turtle.forward()
- end
- for i=1, length - 1,1 do
- turtle.back()
- end
- end
- function digWidth (width)
- for i=1, width,1 do
- digLenth(desLength)
- turtle.turnRight()
- turtle.dig()
- turtle.forward()
- turtle.turnLeft()
- end
- end
- function digHeight (height)
- for i=1, height,1 do
- digWidth(desWidth)
- turtle.turnLeft()
- for i=1, desWidth,1 do
- turtle.forward()
- end
- turtle.turnRight()
- turtle.digUp()
- turtle.up()
- end
- for i=1, height,1 do
- turtle.down()
- end
- end
- if args[3] == nil then
- term.setTextColor(colors.red)
- print("You must provive all three axis!")
- print("digger [Height] [Length] [Width]")
- term.setTextColor(colors.white)
- else
- digHeight(desHeight)
- end
Advertisement
Add Comment
Please, Sign In to add comment