Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clearInv()
- turtle.digDown()
- local slot=2
- while slot <= 16 do
- if turtle.getItemCount(slot) > 0 then
- turtle.select(slot)
- turtle.dropDown()
- end
- slot = slot + 1
- end
- turtle.select(2)
- end
- function forward()
- if turtle.forward() then
- return
- else
- turtle.dig()
- forward()
- end
- end
- function up()
- if turtle.up() then
- return
- else
- turtle.digUp()
- up()
- end
- end
- function down()
- if turtle.down() then
- return
- else
- turtle.digDown()
- down()
- end
- end
- function refuel()
- turtle.select(1)
- turtle.refuel()
- turtle.select(2)
- end
- function place_down()
- local slot=offset
- while slot <= offset + 3 do
- if turtle.getItemCount(slot) > 0 then
- turtle.select(slot)
- turtle.placeDown()
- return
- end
- slot = slot + 1
- end
- end
- function place_up()
- local slot=offset
- while slot <= offset + 3 do
- if turtle.getItemCount(slot) > 0 then
- turtle.select(slot)
- turtle.placeUp()
- return
- end
- slot = slot + 1
- end
- end
- local bottom=10
- local top=70
- offset=5
- local y=10
- refuel()
- while y <= top do
- print(turtle.getFuelLevel())
- place_down()
- up()
- y = y+1
- end
- forward()
- offset=9
- while y >= bottom do
- down()
- place_up()
- y=y-1
- end
- forward()
- offset=13
- while y <= top do
- place_down()
- up()
- y=y+1
- end
- forward()
- while y >= bottom do
- down()
- y=y-1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement