Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local i = 0
- local howManyTimes
- function demiTour()
- turtle.turnRight()
- turtle.turnRight()
- end
- function placeSapling()
- term.clear()
- term.setCursorPos(1,1)
- print "Placing saplings..."
- turtle.select(1)
- turtle.place()
- end
- function boneMeal()
- term.clear()
- term.setCursorPos(1,1)
- print "Bonemealing..."
- turtle.select(3)
- while not turtle.compare() do
- turtle.select(2)
- turtle.place()
- turtle.select(3)
- end
- end
- function cutTree()
- term.clear()
- term.setCursorPos(1,1)
- print "Cutting tree..."
- turtle.select(3)
- if turtle.compare() then
- turtle.dig()
- turtle.forward()
- end
- while turtle.compareUp() do
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectDown() do
- turtle.down()
- end
- demiTour()
- end
- term.clear()
- term.setCursorPos(1,1)
- print "How many trees do you want to cut?"
- howManyTimes = io.read()
- howManyTimes = tonumber(howManyTimes)
- while (i < howManyTimes) do
- term.clear()
- term.setCursorPos(1,1)
- print "Getting items..."
- turtle.select(1)
- turtle.suck()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- turtle.turnLeft()
- turtle.select(2)
- turtle.suck()
- turtle.turnRight()
- turtle.forward()
- turtle.forward()
- placeSapling()
- boneMeal()
- cutTree()
- for m=1,5,1 do
- turtle.forward()
- end
- turtle.turnRight()
- i = i + 1
- end
Advertisement
Add Comment
Please, Sign In to add comment