Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function placeDown(b, e)
- for i=b,e do
- if turtle.getItemCount(i) then
- turtle.select(i)
- turtle.placeDown()
- sleep(0.2)
- end
- end
- turtle.select(9)
- end
- function placeForward()
- for i=b,e do
- if turtle.getItemCount(i) then
- turtle.select(i)
- turtle.place()
- sleep(0.2)
- end
- end
- turtle.select(9)
- end
- function row(n, b, e)
- local i = 1
- while turtle.getFuelLevel() < 100 do
- turtle.select(16)
- turtle.refuel(1)
- end
- while i < n do
- placeDown(b, e)
- turtle.forward()
- sleep(0.2)
- i = i+1
- end
- placeDown(b, e)
- end
- function platform(l, w, b, e)
- local odd = 1
- local i, j
- for i=1,w do
- row(l, b, e)
- if odd == 1 then
- turtle.turnRight()
- turtle.forward()
- sleep(0.2)
- turtle.turnRight()
- else
- turtle.turnLeft()
- turtle.forward()
- sleep(0.2)
- turtle.turnLeft()
- end
- odd = 1 - odd
- end
- if odd == 1 then
- turtle.turnLeft()
- for i=1,w do
- turtle.forward()
- sleep(0.2)
- end
- turtle.turnRight()
- else
- turtle.turnRight()
- for i=1,w do
- turtle.forward()
- sleep(0.2)
- end
- turtle.turnRight()
- for i=1,l-1 do
- turtle.back()
- sleep(0.2)
- end
- end
- end
- function cellar(n)
- for i=1,8 do
- if turtle.detectDown() then
- turtle.digDown()
- sleep(0.2)
- end
- turtle.down()
- sleep(0.2)
- end
- platform(n, n, 5, 8)
- turtle.up()
- platform(n, n, 1, 4)
- turtle.forward()
- turtle.turnLeft()
- turtle.turnLeft()
- sleep(0.3)
- for i=1,7 do
- placeForward(5, 8)
- if turtle.detectUp() then
- turtle.digUp()
- sleep(0.2)
- end
- turtle.up()
- sleep(0.2)
- end
- end
- function floor(n)
- turtle.forward()
- sleep(0.2)
- turtle.down()
- sleep(0.2)
- platform(n, n, 5, 8)
- turtle.up()
- sleep(0.2)
- platform(n, n, 1, 4)
- end
- floor(7)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement