Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turtle.refuel()
- local plantDistance = 3
- local circles = 0
- local circlesDone = 1
- local circlesDinstance = 3
- local startHight = 0
- local endHight = 0
- local chestHight = 0
- local hight = 0
- print("Current Hight:")
- hight = tonumber(read())
- chestHight = hight
- print("")
- print("Start Hight:")
- startHight = tonumber(read())
- print("")
- print("End Hight:")
- endHight = tonumber(read())
- print("")
- print("Circles:")
- circles = tonumber(read())
- print("")
- local success, block = nil
- local Ores = {
- "minecraft:coal_ore",
- "minecraft:iron_ore",
- "minecraft:gold_ore",
- "minecraft:diamond_ore",
- "minecraft:lapis_ore",
- "minecraft:lit_redstone_ore",
- "minecraft:emerald_ore",
- "thermalfoundation:ore",
- "thermalfoundation:ore_fluid",
- "ic2:resource",
- "bigreactors:oreyellorite",
- "appliedenergistics2:quartz_ore",
- "appliedenergistics2:charged_quartz_ore",
- "deepresonance:resonating_ore",
- "draconicevolution:draconium_ore",
- "thaumcraft:ore_cinnabar",
- "thaumcraft:ore_amber",
- "thaumcraft:ore_quartz",
- "projectred-exploration:ore",
- "forestry:resources",
- "bigreactors:orebenitoite",
- "bigreactors:oreanglesite",
- "biomesoplenty:gem_ore",
- "astralsorcery:blockcustomore",
- "actuallyadditions:block_misc",
- "minecraft:quartz_ore",
- "rftools:dimensional_shard_ore",
- "quark:biotite_ore",
- "railcraft:ore_metal_poor",
- "railcraft:ore_metal",
- "railcraft:ore_magic",
- "woot:stygianironore",
- }
- function forward()
- turtle.attack()
- turtle.attack()
- turtle.attack()
- turtle.forward()
- end
- function up()
- turtle.attackUp()
- turtle.attackUp()
- turtle.attackUp()
- turtle.up()
- end
- function down()
- turtle.attackDown()
- turtle.attackDown()
- turtle.attackDown()
- turtle.down()
- end
- function DigForward()
- while turtle.detect() do
- turtle.dig()
- end
- forward()
- end
- function Ore()
- success, block = turtle.inspectUp()
- for i=1,#Ores do
- if Ores[i] == block.name then
- block = nil
- turtle.digUp()
- up()
- Ore()
- down()
- break
- end
- end
- for i=1,4 do
- success, block = turtle.inspect()
- for i=1,#Ores do
- if Ores[i] == block.name then
- block = nil
- while turtle.detect() do
- turtle.dig()
- end
- forward()
- Ore()
- turtle.turnRight()
- turtle.turnRight()
- forward()
- turtle.turnRight()
- turtle.turnRight()
- break
- end
- end
- turtle.turnRight()
- end
- success, block = turtle.inspectDown()
- for i=1,#Ores do
- if Ores[i] == block.name then
- block = nil
- turtle.digDown()
- down()
- Ore()
- up()
- break
- end
- end
- end
- function DigDown()
- while hight > startHight do
- turtle.digDown()
- down()
- hight = hight - 1
- Ore()
- end
- end
- function returntToPlant()
- while hight > startHight do
- down()
- hight = hight - 1
- end
- end
- function returnToChest()
- while hight < chestHight do
- up()
- hight = hight + 1
- end
- end
- function fuel()
- if turtle.getFuelLevel() < 2000 then
- turtle.refuel()
- end
- end
- function chestDropp()
- for i=1,16 do
- turtle.select(i)
- fuel()
- turtle.dropUp()
- end
- end
- function doStrip()
- for i=1,circlesDone*4 do
- DigForward()
- Ore()
- end
- turtle.turnRight()
- turtle.turnRight()
- for i=1,circlesDone*4 do
- forward()
- end
- end
- function mine()
- for i=1,circlesDone*4 do
- DigForward()
- Ore()
- end
- turtle.turnRight()
- doStrip()
- doStrip()
- turtle.turnRight()
- for i=1,circlesDone*4 do
- forward()
- end
- turtle.turnLeft()
- end
- function doCircle()
- for i=1,4 do
- mine()
- returnToChest()
- chestDropp()
- returntToPlant()
- end
- circlesDone = circlesDone + 1
- end
- function doPlant()
- DigDown()
- for i=1,circles do
- doCircle()
- end
- startHight = startHight - 4
- circlesDone = 1
- end
- function run()
- while startHight > endHight do
- doPlant()
- end
- returnToChest()
- end
- run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement