Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("slot1 scanner or laser")
- print("slot2 vacuumulator")
- print("slot3 enderchest")
- sc=peripheral.wrap("right")
- function sEquip(module) --plethora:laser plethora:scanner
- if module~=peripheral.getType("right") then
- turtle.select(1)
- turtle.equipRight()
- sc=peripheral.wrap("right")
- end
- end
- filter="minecraft:coal_ore/0 minecraft:iron_ore/0 minecraft:gold_ore/0 minecraft:diamond_ore/0 minecraft:redstone_ore/0 minecraft:emerald_ore/0 minecraft:lapis_ore/0appliedenergistics2:quartz_ore/0 appliedenergistics2:charged_quartz_ore/0thermalfoundation:ore/0 thermalfoundation:ore/1 thermalfoundation:ore/2 thermalfoundation:ore/3 thermalfoundation:ore/4 thermalfoundation:ore/5 thermalfoundation:ore/6 thermalfoundation:ore/7 thermalfoundation:ore/8 thermalfoundation:ore_fluid/0 thermalfoundation:ore_fluid/1 thermalfoundation:ore_fluid/2 thermalfoundation:ore_fluid/3 thermalfoundation:ore_fluid/4 thermalfoundation:ore_fluid/5ic2:resource/1 ic2:resource/2 ic2:resource/3 ic2:resource/4 bigreactors:oreyelloriteprojectred-exploration:ore/6biomesoplenty:gem_ore/0 biomesoplenty:gem_ore/1 biomesoplenty:gem_ore/2 biomesoplenty:gem_ore/3 biomesoplenty:gem_ore/4 biomesoplenty:gem_ore/5 biomesoplenty:gem_ore/6 biomesoplenty:gem_ore/7 thaumcraft:ore_amber/0 thaumcraft:ore_quartz/0 thaumcraft:ore_cinnabar/0 "
- function fingerprint(block)
- return block.name.."/"..block.metadata
- end
- function main()
- while true do
- --scan
- sEquip("plethora:scanner")
- blocks={}
- scanned=sc.scan()
- for ib=#scanned/2+0.5,#scanned do
- if string.find(filter,fingerprint(scanned[ib])) then
- table.insert(blocks,scanned[ib])
- end
- end
- if #blocks>0 then
- sEquip("plethora:laser")
- for il=1,#blocks do
- block=blocks[il]
- pitch = -math.atan2(block.y, math.sqrt(block.x * block.x + block.z * block.z))
- yaw = math.atan2(-block.x, block.z)
- sc.fire(math.random()*2+math.deg(yaw)-1,math.random()*2+math.deg(pitch)-1,5)
- end
- else
- turtle.digUp()
- turtle.up()
- turtle.digUp()
- turtle.up()
- turtle.down()
- turtle.select(2)
- turtle.placeDown()
- turtle.up()
- turtle.select(3)
- turtle.placeDown()
- for idrop=2,16 do
- turtle.select(idrop)
- turtle.dropDown()
- end
- sleep(3)
- turtle.select(3)
- turtle.digDown()
- turtle.select(2)
- turtle.down()
- turtle.digDown()
- turtle.down()
- for idig=1,8 do
- turtle.dig()
- turtle.digUp()
- turtle.forward()
- end
- end
- sleep(0.5)
- end
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement