Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function strip(length)
- os.loadAPI("moveApi")
- os.loadAPI("inventoryApi")
- moveApi.savePosition(0,-1,0,0,0)
- dir = moveApi.directions();
- pos = moveApi.loadPosition()
- for i=1,length do
- inventoryApi.dumpBelow(2,16)
- return_dist = 4*(i-1)
- for j=1,return_dist do
- pos = moveApi.move(pos, dir.NORTH)
- end
- for j=1,4 do
- pos = hallwayForward()
- end
- pos = moveApi.face(pos, dir.WEST)
- for j=1,12 do
- pos = hallwayForward()
- end
- pos = moveApi.face(pos, dir.SOUTH)
- for j=1,4 do
- pos = hallwayForward()
- end
- pos = moveApi.face(pos, dir.EAST)
- for j = 1,24 do
- pos = hallwayForward()
- end
- pos = moveApi.face(pos, dir.NORTH)
- for j=1,4 do
- pos = hallwayForward()
- end
- moveApi.ensureFuel()
- pos = moveApi.face(pos, dir.WEST)
- for j = 1,12 do
- pos = hallwayForward()
- end
- pos = moveApi.face(pos, dir.NORTH)
- for j=1,return_dist+4 do
- pos = moveApi.move(pos,dir.SOUTH)
- end
- end
- end
- function hallwayForward()
- moveApi.ensureFuel()
- turtle.up()
- moveApi.clearFront()
- turtle.down()
- moveApi.clearFront()
- moveApi.ensureFuel()
- pos = moveApi.move(pos, pos.dir)
- return pos
- end
Add Comment
Please, Sign In to add comment