Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while true do
- if turtle.getFuelLevel() < 500 then
- turtle.select(16)
- turtle.placeUp()
- turtle.suckUp()
- turtle.refuel()
- turtle.dropUp()
- turtle.digUp()
- turtle.select(1)
- end
- local block,type = turtle.inspectDown()
- if type.name == "ironchest:crystal_chest" then
- if turtle.getItemSpace(1) > 0 then
- print"A sugar"
- turtle.suckDown()
- print("turtle cheia")
- end
- end
- function andar()
- local block,type = turtle.inspect()
- while turtle.detect() == false do
- turtle.forward()
- end
- if type.name == "minecraft:spruce_log" then
- turtle.turnRight()
- print("encontrei o log")
- end
- if type.name == "minecraft:hopper" then
- print"vou verificar o que tenho"
- local details = turtle.getItemDetail(1)
- if details.name == "minecraft:blackstone" then
- blackstone()
- end
- if details.name == "minecraft:cobblestone" then
- cobblestone()
- end
- if details.name == "minecraft:andesite" then
- andesite()
- end
- if details.name == "minecraft:basalt" then
- basalt()
- end
- if details.name == "forbidden_arcanus:darkstone" then
- darkstone()
- end
- if details.name == "minecraft:netherrack" then
- netherrack()
- end
- if details.name == "minecraft:granite" then
- granite()
- end
- end
- end
- if turtle.getItemCount(1) == 64 then
- andar()
- end
- function voltar()
- print("a voltar a base")
- turtle.turnRight()
- turtle.turnRight()
- while turtle.detect() == false do
- turtle.forward()
- local block,type = turtle.inspect()
- if type.name == "minecraft:glass" then
- print("encontrei o vidro")
- turtle.turnLeft()
- end
- end
- local block,type = turtle.inspect()
- if type.name == "minecraft:cobblestone" then
- print("cheguei a base")
- turtle.turnLeft()
- turtle.turnLeft()
- end
- end
- function cobblestone()
- print("tenho cobblestone")
- local details = turtle.getItemDetail(1)
- if details.name == "minecraft:cobblestone" then
- turtle.up()
- turtle.drop()
- turtle.down()
- if turtle.getItemSpace(1) == 64 then
- voltar()
- end
- end
- end
- function blackstone()
- print("tenho blackstone")
- local details = turtle.getItemDetail(1)
- if details.name == "minecraft:blackstone" then
- turtle.up()
- turtle.up()
- turtle.up()
- turtle.drop()
- turtle.down()
- turtle.down()
- turtle.down()
- if turtle.getItemSpace(1) == 64 then
- voltar()
- end
- end
- end
- function andesite()
- print("tenho andesite")
- local details = turtle.getItemDetail(1)
- if details.name == "minecraft:andesite" then
- turtle.turnRight()
- turtle.forward()
- turtle.dropDown()
- turtle.back()
- turtle.turnLeft()
- if turtle.getItemSpace(1) == 64 then
- voltar()
- end
- end
- end
- function basalt()
- print("tenho basalt")
- local details = turtle.getItemDetail(1)
- if details.name == "minecraft:basalt" then
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.dropDown()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.down()
- turtle.down()
- if turtle.getItemSpace(1) == 64 then
- voltar()
- end
- end
- end
- function darkstone()
- print("tenho darkstone")
- local details = turtle.getItemDetail(1)
- if details.name == "forbidden_arcanus:darkstone" then
- turtle.up()
- turtle.up()
- turtle.forward()
- turtle.forward()
- turtle.forward()
- turtle.dropUp()
- turtle.back()
- turtle.back()
- turtle.back()
- turtle.down()
- turtle.down()
- if turtle.getItemSpace(1) == 64 then
- voltar()
- end
- end
- end
- function netherrack()
- print("tenho netherrack")
- local details = turtle.getItemDetail(1)
- if details.name == "minecraft:netherrack" then
- turtle.up()
- turtle.drop()
- turtle.down()
- if turtle.getItemSpace(1) == 64 then
- voltar()
- end
- end
- end
- function granite()
- print("tenho granite")
- local details = turtle.getItemDetail(1)
- if details.name == "minecraft:granite" then
- turtle.turnRight()
- turtle.forward()
- turtle.dropDown()
- turtle.back()
- turtle.turnLeft()
- if turtle.getItemSpace(1) == 64 then
- voltar()
- end
- end
- end
- end
Add Comment
Please, Sign In to add comment