Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rednet.broadcast("Felling Trees")
- function refuel()
- fueled = 0
- if turtle.getFuelLevel() < 5000 then
- turtle.select(1)
- turtle.suckUp(15)
- fueled = turtle.getItemCount(1)
- if fueled < 15 then
- rednet.broadcast("Fuel chest now empty")
- end
- turtle.refuel()
- end
- end
- function suck()
- for x = 1 , 2 do
- turtle.select(4)
- turtle.suck()
- turtle.turnLeft()
- turtle.suck()
- turtle.forward()
- turtle.suck()
- turtle.back()
- turtle.turnLeft()
- end
- end
- function fell()
- turtle.select(5)
- turtle.dig()
- turtle.forward()
- for a = 1 , 6 do
- turtle.digUp()
- turtle.up()
- end
- for b = 1 , 6 do
- turtle.down()
- end
- end
- for a = 1 , 5 do
- while not turtle.detect() do
- turtle.forward()
- end
- fell()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- for b = 1 , 3 do
- turtle.back()
- end
- sleep(120)
- plant = 5
- gap = 0
- while plant > 0 do
- turtle.forward()
- suck()
- turtle.select(5)
- gap = gap + 1
- if gap == 4 then
- turtle.turnLeft()
- turtle.turnLeft()
- turtle.select(4)
- turtle.place()
- turtle.turnLeft()
- turtle.turnLeft()
- plant = plant - 1
- gap = 0
- end
- end
- for a = 1 , 2 do
- turtle.forward()
- suck()
- end
- while not turtle.detect() do
- turtle.forward()
- end
- for a = 5 , 16 do
- turtle.select(a)
- turtle.drop()
- end
- turtle.turnLeft()
- turtle.turnLeft()
- refuel()
- rednet.broadcast("Tree Run Done")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement