Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = turtle
- function start_turtle()
- while t.down do -- Bring the turtle down if it's up
- t.down()
- end
- while t.back do -- Move the turtle back against the hopper
- t.back()
- end
- end
- function cut_tree()
- t.dig()
- t.forward()
- t.select(16)
- while t.compareUp() == false do
- t.digUp()
- t.up()
- end
- t.select(15)
- while t.compareDown() == false do
- t.down()
- end
- t.select(1)
- turtle.back()
- end
- function grow_tree()
- t.select(3)
- t.place()
- t.select(2)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.place()
- sleep(.1)
- t.select(1)
- end
- function refuel()
- fuel_amount = t.getItemCount()
- if fuel_amount > 1 then
- turtle.refuel(fuel_amount - 1)
- end
- end
- function farm()
- grow_tree()
- cut_tree()
- refuel()
- sleep(5)
- end
- start_turtle()
- while turtle.getFuelLevel > 15 do
- farm()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement