Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local slot =1
- local function mD()
- if turtle.detectDown() then turtle.digDown() end
- turtle.down()
- end
- local function mU()
- if turtle.detectUp() then turtle.digUp() end
- turtle.up()
- end
- local function placeCover()
- if turtle.detect() then turtle.dig() end
- turtle.place()
- if turtle.getItemCount(slot)==0 then slot=slot+1; turtle.select(slot) end
- end
- local height=0
- local width=0
- local movingUp=true;
- print("height?")
- height=tonumber(read())
- print("width?")
- width=tonumber(read())
- turtle.select(slot);
- for j=1,width do
- for i=2,height do
- placeCover()
- if movingUp then mU() else mD() end
- end
- movingUp=not movingUp
- placeCover()
- turtle.turnLeft()
- if turtle.detect() then turtle.dig() end
- turtle.forward()
- turtle.turnRight()
- end
Advertisement
Add Comment
Please, Sign In to add comment