Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local args = {...}
- local fuelSlots = {15,16}
- local blockSlots = {1,2,3,4,5,6,7,8,9,10}
- local torchSlots = {11,12,13,14}
- local torchFreq = 5 --One pair every X
- local placeBlockDown
- local function refuel()
- if(turtle.getFuelLevel() < 50) then
- for key,value in pairs(fuelSlots) do
- if(turtle.getItemCount(value) > 0) then
- turtle.select(value)
- turtle.refuel(5)
- return true
- end
- end
- end
- return false
- end
- local function forward(steps)
- for i=1,steps do
- refuel()
- turtle.forward()
- end
- end
- local function turn180()
- turtle.turnRight()
- turtle.turnRight()
- end
- local function placeDownMoveForward(times)
- for i =1,times do
- if(not placeBlockDown()) then
- return false
- end
- forward(1)
- end
- return true
- end
- placeBlockDown = function()
- for key,value in pairs(blockSlots) do
- if(turtle.getItemCount(value) > 0) then
- turtle.select(value)
- turtle.placeDown()
- return true
- end
- end
- return false
- end
- local function placeblockUp()
- for key,value in pairs(blockSlots) do
- if(turtle.getItemCount(value) > 0) then
- turtle.select(value)
- turtle.placeUp()
- return true
- end
- end
- return false
- end
- local function moveUpPlaceDown(count)
- for i =1,count do
- turtle.up()
- placeBlockDown()
- end
- end
- local function down(steps)
- for i = 1,steps do
- refuel()
- turtle.down()
- end
- end
- local function makeSection(count)
- for i = 1,count do
- turtle.turnRight()
- forward(2)
- down(1)
- turn180()
- placeDownMoveForward(2)
- turtle.up()
- forward(2)
- down(1)
- placeDownMoveForward(2)
- turn180()
- forward(1)
- moveUpPlaceDown(4)
- forward(4)
- down(4)
- moveUpPlaceDown(4)
- turn180()
- placeDownMoveForward(4)
- turn180()
- forward(2)
- turtle.turnLeft()
- forward(1)
- down(3)
- end
- end
- refuel()
- makeSection(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement