Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- build a room to the left then descends
- print("first wall?")
- local x=tonumber(read())
- print("second wall?")
- local y=tonumber(read())
- print("height?")
- local z=tonumber(read())
- local count=0
- local slot =1
- function ensureSlot()
- if count==0 then
- slot=slot+1;
- count=turtle.getItemCount(slot)
- if count==0 then exit() end
- turtle.select(slot)
- end
- end
- count=turtle.getItemCount(slot)
- turtle.turnRight();turtle.turnRight();
- for k=1,z-1 do
- turtle.up()
- for j=1,2 do
- for i=1,x-2 do
- turtle.placeDown()
- turtle.back()
- count=count-1;ensureSlot()
- end
- turtle.placeDown()
- count=count-1;ensureSlot()
- turtle.turnLeft()
- turtle.back()
- for i=1,y-2 do
- turtle.placeDown()
- turtle.back()
- count=count-1;ensureSlot()
- end
- turtle.placeDown()
- count=count-1;ensureSlot()
- turtle.turnLeft()
- turtle.back()
- end
- end
- turtle.forward()
- turtle.up()
- for j=1,y do
- for i=1,x-1 do
- turtle.placeDown()
- count=count-1;ensureSlot()
- turtle.back()
- end
- turtle.placeDown()
- count=count-1;ensureSlot()
- if(j%2== 1) then turtle.turnLeft() else turtle.turnRight() end
- turtle.back()
- if(j%2== 1) then turtle.turnLeft() else turtle.turnRight() end
- --turtle.back()
- end
- for k=1,z do turtle.down() end
Advertisement
Add Comment
Please, Sign In to add comment