Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t = turtle
- local i = 0
- local q = 0
- local a = true
- local SLOT_COUNT = 16
- DROPPED_ITEMS = {
- "minecraft:tuff",
- "minecraft:stone",
- "minecraft:dirt",
- "minecraft:cobblestone",
- "minecraft:sand",
- "minecraft:gravel",
- "minecraft:flint",
- "railcraft:ore_metal",
- "extrautils2:ingredients",
- "minecraft:dye",
- "thaumcraft:nugget",
- "thaumcraft:crystal_essence",
- "thermalfoundation:material",
- "projectred-core:resource_item",
- "thaumcraft:ore_cinnabar",
- "deepresonance:resonating_ore",
- "forestry:apatite",
- "create:granite_cobblestone",
- "create:diorite_cobblestone",
- "create:andesite_cobblestone",
- "thermal:niter",
- "minecraft:netherrack",
- "minecraft:blackstone",
- "extcaves:lavastone",
- "forbidden_arcanus:darkstone",
- "create:raw_zinc",
- "minecraft:raw_copper",
- "mekanism:raw_lead",
- "minecraft:cobbled_deepslate"
- }
- function mineAround()
- isBlock, data = t.inspect()
- if (isBlock) then
- if (data['name'] == 'forbidden_arcanus:stella_arcanum') then
- t.turnLeft()
- if (t.detect()) then
- t.turnRight()
- t.turnRight()
- t.dig()
- t.forward()
- t.turnLeft()
- t.dig()
- t.forward()
- t.dig()
- t.forward()
- t.turnLeft()
- t.dig()
- t.forward()
- t.turnRight()
- else
- t.forward()
- t.turnRight()
- t.forward()
- t.forward()
- t.turnRight()
- t.dig()
- t.forward()
- t.turnLeft()
- end
- end
- end
- isBlock, data = t.inspectDown()
- if (isBlock) then
- if (data['name'] == 'forbidden_arcanus:stella_arcanum') then
- t.turnLeft()
- if (t.detect()) then
- t.turnRight()
- t.turnRight()
- t.dig()
- t.forward()
- t.turnLeft()
- t.dig()
- t.forward()
- t.dig()
- t.forward()
- t.turnLeft()
- t.dig()
- t.forward()
- t.turnRight()
- else
- t.forward()
- t.turnRight()
- t.forward()
- t.forward()
- t.turnRight()
- t.dig()
- t.forward()
- t.turnLeft()
- end
- end
- end
- isBlock, data = t.inspectUp()
- if (isBlock) then
- if (data['name'] == 'forbidden_arcanus:stella_arcanum') then
- t.turnLeft()
- if (t.detect()) then
- t.turnRight()
- t.turnRight()
- t.dig()
- t.forward()
- t.turnLeft()
- t.dig()
- t.forward()
- t.dig()
- t.forward()
- t.turnLeft()
- t.dig()
- t.forward()
- t.turnRight()
- else
- t.forward()
- t.turnRight()
- t.forward()
- t.forward()
- t.turnRight()
- t.dig()
- t.forward()
- t.turnLeft()
- end
- end
- end
- end
- function dropItems()
- print("Purging Inventory...")
- for slot = 1, SLOT_COUNT, 1 do
- local item = t.getItemDetail(slot)
- if(item ~= nil) then
- for filterIndex = 1, #DROPPED_ITEMS, 1 do
- if(item["name"] == DROPPED_ITEMS[filterIndex]) then
- print("Dropping - " .. item["name"])
- t.select(slot)
- t.dropDown()
- end
- end
- end
- end
- t.select(1)
- end
- function checkFuel()
- t.select(1)
- if(t.getFuelLevel() < 50) then
- print("Attempting Refuel...")
- for slot = 1, SLOT_COUNT, 1 do
- t.select(slot)
- if(t.refuel(1)) then
- return true
- end
- end
- return false
- else
- return true
- end
- end
- while i < 25 do
- mineAround()
- t.dig()
- t.digUp()
- t.digDown()
- t.forward()
- if i == 24 and a then
- t.turnLeft()
- t.dig()
- t.forward()
- t.turnLeft()
- i = 0
- a = false
- elseif i == 24 and not a then
- t.turnRight()
- t.dig()
- t.forward()
- t.turnRight()
- i = 0
- a = not a
- end
- checkFuel()
- dropItems()
- i = i + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement