Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local height = tonumber(({...})[1])
- local oldD = turtle.placeDown
- local oldU = turtle.placeUp
- local old = turtle.place
- local function sel()
- for i = 1, 16 do
- if turtle.getItemCount(i) > 0 then
- turtle.select(i)
- return
- end
- end
- end
- function turtle.placeDown()
- sel()
- return oldD()
- end
- function turtle.placeUp()
- sel()
- return oldU()
- end
- function turtle.place()
- sel()
- return old()
- end
- local function up()
- local plcmnt = height - 1
- for i = 1, plcmnt do
- turtle.up()
- turtle.placeDown()
- end
- end
- local function down(no)
- local plcmnt = no and height or height - 1
- for i = 1, plcmnt do
- turtle.down()
- if not no then
- turtle.placeUp()
- end
- end
- end
- local last = down
- local function ue(index)
- if last == down then
- up(index)
- last = up
- else
- down(index)
- last = down
- end
- end
- local function ua(o)
- if o ~= 3 then
- turtle.back()
- turtle.place()
- end
- end
- for o = 1, 3 do
- ue()
- ua(o)
- end
- turtle.turnRight()
- turtle.back()
- turtle.place()
- turtle.turnRight()
- for o = 1, 3 do
- ue()
- ua(o)
- end
- turtle.turnLeft()
- turtle.back()
- turtle.place()
- turtle.turnLeft()
- for o = 1, 3 do
- ue()
- ua(o)
- end
- turtle.up()
- turtle.placeDown()
- turtle.back()
- down(true)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement