Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Plantar()
- turtle.select(9)
- turtle.place()
- print("Tree Planted!")
- end
- function Dopar()
- local success, data = turtle.inspect()
- compare = data.name
- while compare == "minecraft:sapling" do
- turtle.select(5)
- turtle.place()
- local success, data = turtle.inspect()
- compare = data.name
- end
- print("Doppy Tree!")
- end
- function Tallar()
- turtle.select(13)
- local success, data = turtle.inspect()
- turtle.dig()
- turtle.forward()
- comparatronc = data.name
- while comparatronc == "minecraft:log" do
- turtle.digUp()
- turtle.up()
- local success, data = turtle.inspectUp()
- comparatronc = data.name
- end
- end
- function goDown()
- while turtle.inspectDown() == false do
- turtle.down()
- end
- turtle.back()
- end
- function deposit()
- turlte.select(14)
- turtle.dropDown()
- end
- function bonemeal()
- turtle.select(5)
- if turtle.getItemCount() < 20 then
- restant = turtle.getItemSpace()
- turtle.suckDown(restant)
- end
- end
- function refuel()
- restant = turtle.getItemSpace()
- turtle.select(1)
- if turtle.getItemCount() < 10 then
- turtle.turnRight()
- turtle.forward()
- turtle.turnLeft()
- turtle.suck(restant)
- turtle.turnRight()
- turtle.back()
- turtle.turnLeft()
- end
- end
- --main
- while true do
- Plantar()
- Dopar()
- Tallar()
- goDown()
- shell.run("busca")
- print("Depositing wood...")
- deposit()
- print("Deposited!")
- bonemeal()
- print("Bonemealed!")
- if turtle.getFuelLevel() < 100 then
- turtle.select(1)
- turtle.refuel()
- end
- for i=1,40 do
- shell.run("clear")
- print("Turtle waiting ".. i .." s")
- sleep(0.8)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement