Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- OS.loadAPI("mine")
- tArgs={...}
- oppSide=false
- length=tArgs[1]
- width=tArgs[2]
- height=tArgs[3]
- function chkFuel()
- fuelReq= (length*width*height)+50
- fuel=turtle.getFuelLevel()
- while fuelReq>fuel do
- print("Please insert ", fuelReq-fuel, " fuel")
- end
- end
- function line()
- for l= 1, length do
- mine.dig()
- mine.forward()
- end
- oppSide= not oppSide
- end
- function layer()
- for w= 1, width do
- line()
- if oppSide then
- turtle.turnRight()
- mine.forward()
- turtle.turnRight()
- else
- turtle.turnLeft()
- mine.forward()
- turtle.turnLeft()
- end
- end
- end
- function reset()
- if oppside then
- for r= 1, length do
- mine.forward
- end
- turtle.turnRight()
- else
- turtle.turnLeft()
- end
- for e = 1, width do
- mine.forward()
- end
- end
- function clear()
- for h = 1, height do
- layer()
- reset()
- end
- mine.up()
- end
- chkFuel()
- clear()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement