Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- InfiniRom 1.0 by AwesomeBananas
- slotCounter = 4
- function StructureBuildSequence(buildingDirection, seqBuildWidth, seqBuildHeight)
- function StorageDrop()
- turtle.select(slotCounter)
- if not turtle.drop() then
- if turtle.getSelectedSlot == 16 then
- turtle.select(3)
- turtle.turnRight()
- turtle.dig()
- turtle.place()
- repeat
- turtle.suck()
- until turtle.getItemCount(16) > 0
- turtle.dig()
- turtle.turnLeft()
- turtle.select(4)
- slotCounter = 4
- turtle.drop()
- else
- error("BUG IN CODE")
- end
- else
- slotCounter = slotCounter + 1
- end
- function DriveWallBuildSequence(prevUpDownLatch, buildingDirection, seqBuildWidth, seqBuildHeight)
- turtle.select(1) -- Turtle select 198
- if prevUpDownLatch == 'down' then
- oddDirection = 'up'
- evenDirection = 'down'
- elseif prevUpDownLatch == 'up' then
- oddDirection = 'down'
- evenDirection = 'up'
- end
- for i = 1, seqBuildWidth do
- if buildingDirection == 'left' then
- turtle.turnLeft)
- elseif buildingDirection == 'right' then
- turtle.turnRight()
- end
- for i2 = 1, seqBuildHeight do
- turtle.dig()
- turtle.place()
- --PLACEMENT DROP
- StorageDrop()
- if i2 ~= seqBuildHeight then
- if i2 % 2 ~= 0 then
- if oddDirection == 'down' then
- turtle.digDown()
- turtle.down()
- elseif oddDirection == 'up' then
- turtle.digUp()
- turtle.up()
- end
- elseif i2 % 2 == 0 then
- if evenDirection == 'down' then
- turtle.digDown()
- turtle.down()
- elseif evenDirection == 'up' then
- turtle.digUp()
- turtle.up()
- end
- end
- end
- end
- if buildingDirection == 'left' then
- turtle.turnRight()
- elseif buildingDirection == 'right' then
- turtle.turnLeft()
- end
- turtle.dig()
- turtle.forward()
- end
- if seqBuildWidth % 2 == 0 then
- prevUpDownLatch = 'down'
- elseif seqBuildWith % 2 ~= 0 then
- prevUpDownLatch = 'up'
- end
- end
- DriveWallBuildSequence(
- end
- StructureBuildSequence('down', 'left', 3, 3)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement