Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x,y,z = arg[1], arg[2], arg[3]
- switch = 0
- switch_second = 0
- block_volume = (x*z)*y
- -- -------------------------- FUELS
- fuel_type = { "wood_tool", "lava", "blaze_rod", "wood_blocks", "sticks", "coal/charcoal", "mushroom_blocks"}
- fuel_value = { 10, 1000, 120, 15, 5, 80, 15}
- -- --------------------------- FUEL CALCULATOR, AND REFUELER
- function doFuel(fuelSlot)
- for i=1, #fuel_value do
- calculated_fuel = block_volume / fuel_value[i]
- io.write(fuel_type[i] .. " - " .. calculated_fuel .. "\n" )
- end
- io.write("CHESTS IN SLOT 1\n")
- io.write("WAITING FOR FUEL IN SLOT 2")
- turtle.select(fuelSlot)
- while block_volume >= turtle.getFuelLevel() do
- turtle.refuel(1)
- end
- if turtle.getItemCount(fuelSlot) > 0 then -- -------------------------- DROP EXCESS FUEL
- turtle.dropUp()
- end
- end
- -- -------------------------- CHECK INVENTORY, AND CHEST IT, WITH NORMAL CHESTS
- function checkIV (startSlot, endSlot, chestSlot)
- is_full = 0
- for i = startSlot, endSlot, 1 do
- turtle.select(i)
- if turtle.getItemCount(i) >= 10 then
- is_full = is_full + 1
- end
- end
- if is_full >= 15 then
- turtle.select(chestSlot)
- if turtle.detectUp() then
- turtle.digUp()
- end
- turtle.placeUp()
- for i = startSlot, endSlot, 1 do
- turtle.select(i)
- turtle.dropUp()
- end
- end
- end
- -- -------------------------- MAIN
- doFuel(2) -- ---------------- REFUEL
- for i=1 , y/2 do
- for ii=1, z-1 do
- for iii=1, x-1 do -- ---------------- FORWARD
- if turtle.detect() then
- turtle.dig()
- end
- turtle.digDown()
- turtle.forward()
- end
- if switch == 0 then -- ---------------- MAIN TURN
- turtle.turnRight()
- turtle.dig()
- turtle.digDown()
- turtle.forward()
- turtle.turnRight()
- switch = 1
- else
- turtle.turnLeft()
- turtle.dig()
- turtle.digDown()
- turtle.forward()
- turtle.turnLeft()
- switch = 0
- end
- end
- for iii=1, x-1 do -- ---------------- SECOND FORWARD
- if turtle.detect() then
- turtle.dig()
- end
- turtle.digDown()
- turtle.forward()
- end
- if switch == 0 then -- ---------------- SECOND TURN
- for ix=1, 2 do
- turtle.turnLeft()
- end
- else
- for ix=1, 2 do
- turtle.turnRight()
- end
- end
- checkIV(2,16,1) -- ---------------- CHECK INVENTORY
- for i=1, 2 do -- ---------------- LOWERING THE LEVEL TWO TIMES
- turtle.digDown()
- turtle.down()
- end
- end
- -- pastebin get sdFmrn4B test
Advertisement
Add Comment
Please, Sign In to add comment