Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local build = {...}
- local l = build[1]
- local w = build[2]
- local h = build[3]
- local L = l-1
- local W = w-1
- local num = (2*(W*h)+2*(L*h)+2*(l*w))
- function reset()
- turtle.forward()
- for i = 1, h do
- turtle.down()
- end
- end
- function reset1()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function reset2()
- turtle.back()
- while turtle.detectDown() do
- turtle.back()
- end
- turtle.forward()
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- end
- function reset3()
- turtle.turnRight()
- turtle.forward()
- end
- function reset4()
- turtle.turnLeft()
- for i = 1, W do
- turtle.forward()
- end
- turtle.turnLeft()
- for j = 1, h do
- turtle.up()
- end
- turtle.up()
- turtle.forward()
- end
- function up()
- turtle.up()
- turtle.placeDown()
- end
- function row()
- turtle.placeDown()
- turtle.forward()
- end
- -- program starts here
- print "this will take"
- print (num)
- print "blocks type yes when ready or no to terminate"
- input = read()
- if input== "yes" then
- for i = 1, w do
- for j = 1, l do
- row()
- end
- reset2()
- end
- reset3()
- turtle.forward()
- for i = 1, W do
- for j = 1, h do
- up()
- end
- reset()
- end
- reset1()
- for i = 1, L do
- for j = 1, h do
- up()
- end
- reset()
- end
- reset1()
- for i = 1, W do
- for j = 1, h do
- up()
- end
- reset()
- end
- reset1()
- for i = 1, L do
- for j = 1, h do
- up()
- end
- reset()
- end
- reset4()
- for i = 1, w do
- for j = 1, l do
- row()
- end
- reset2()
- end
- end
- if input == "no" then shell.exit()
- end
Add Comment
Please, Sign In to add comment