Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- shell.run("clear")
- print("Note:")
- print("- For now, please ensure that this turtle has sufficient fuel already registered")
- print("- Please ensure that there is a suitable method of restocking this turtle via enderchest")
- sleep(3)
- shell.run("clear")
- print("How many blocks high do you wish the tower to be?")
- sleep(0.5)
- local height = tonumber(read())
- shell.run("clear")
- print("Construction in progress")
- function RPlace() -- Selecting random block, and placing it down in the world
- local q = 0
- repeat
- local r = math.random(1, 12)
- if q == 15 then -- Checking if the turtle needs to be restocked
- local q = 0
- print("Restocking")
- turtle.select(16) -- Enderchest
- turtle.placeDown()
- local s = 0
- repeat
- turtle.suckDown()
- s = s + 1
- until s == 12
- turtle.digDown()
- end
- q = q + 1
- turtle.select(r)
- until turtle.getItemCount(r) > 1
- turtle.placeDown()
- end
- local k = 0 -- Level counter
- repeat
- local j = 0 -- Circle Start
- repeat
- local i = 0
- repeat
- RPlace() --SB1-5
- turtle.forward()
- i = i + 1
- until i == tonumber(5)
- turtle.turnRight()
- turtle.forward()
- RPlace() -- CB1
- turtle.turnLeft()
- turtle.forward()
- RPlace() -- CB2
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- RPlace() -- CB3
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- RPlace() -- CB4
- turtle.forward()
- RPlace() -- CB5
- turtle.turnLeft()
- turtle.forward()
- turtle.turnRight()
- turtle.forward()
- j = j + 1
- until j == 4
- turtle.up()
- k = k + 1
- until k == height
- print("Construction complete!")
Advertisement
Add Comment
Please, Sign In to add comment