Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function check()
- local g=2
- if turtle.getItemCount(s)==0
- then
- s=s+1
- if s<17
- then
- turtle.select(s)
- else
- s=1
- turtle.select(s)
- while g == 2
- do
- print("Waiting for supplies. Type 1 to continue building.")
- g=read()
- end
- end
- end
- end
- ---------------------------------------------------------------------------
- print("How high do you want you tower?")
- y=read()
- tonumber(y)
- s=1
- turtle.select(1)
- for b=1, y
- do
- for i=1,4
- do
- check() -- begining of 4 section
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown() -- end of 4 section
- sleep(.1) --reposition for 3
- turtle.forward()
- sleep(.1)
- turtle.turnRight()
- sleep(.1)
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- check() --start of 3 section
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown() --end of 3 section
- sleep(.1) --reposition for 1
- turtle.forward()
- sleep(.1)
- turtle.turnRight()
- sleep(.1)
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- check() --start 1
- turtle.placeDown()
- sleep(.1) --repostion for 2
- turtle.forward()
- sleep(.1)
- turtle.turnRight()
- sleep(.1)
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- check() --start of 2 section
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown() --end of section 2
- sleep(.1) --repostion for 1
- turtle.forward()
- sleep(.1)
- turtle.turnRight()
- sleep(.1)
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- check() --start 1
- turtle.placeDown()
- sleep(.1) --repostion for 1
- turtle.forward()
- sleep(.1)
- turtle.turnRight()
- sleep(.1)
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- check() --start 1
- turtle.placeDown()
- sleep(.1) --reposition for 2
- turtle.forward()
- sleep(.1)
- turtle.turnRight()
- sleep(.1)
- turtle.forward()
- check() --start of 2 section
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown() --end of section 2
- sleep(.1) --reposition 1
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- turtle.forward()
- turtle.turnRight()
- check() --start 1
- turtle.placeDown()
- sleep(.1) --reposition for 3
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- turtle.forward()
- turtle.turnRight()
- check() --start of 3
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- sleep(.1)
- check()
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- sleep(.1)
- check()
- turtle.placeDown() --end of 3
- sleep(.1) --reposition for 4
- turtle.forward()
- sleep(.1)
- turtle.turnLeft()
- sleep(.1)
- turtle.forward()
- turtle.turnRight()
- check() -- begining of 4 section
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown()
- sleep(.1)
- turtle.forward()
- check()
- turtle.placeDown() -- end of 4 section
- turtle.forward() --for next cycle
- end
- sleep(.1)
- turtle.up()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement