Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clear()
- term.clear()
- term.setCursorPos(1,1)
- end
- clear()
- function planter()
- turtle.select(1)
- n=0
- while turtle.detectDown() and (turtle.getItemCount(1)>0) do
- turtle.back()
- turtle.place()
- n=n+1
- end
- print("Planted " .. n .. " plants.")
- n=0
- end
- function lumberjack()
- while not turtle.detect() do
- turtle.forward()
- end
- turtle.dig()
- print("Starting, turtle...")
- turtle.forward()
- while turtle.detectUp() do
- turtle.digUp()
- turtle.up()
- end
- while not turtle.detectUp() and not turtle.detectDown() do
- turtle.down()
- end
- print ("Complete, Turtle.")
- end
- print("Starting farm, turtle.")
- y=0
- while turtle.detect() do
- print("Starting lumberjack, turtle.")
- lumberjack()
- y=y+1
- end
- print("Cut " .. y .. "trees, turtle.")
- print("Starting planter, turtle.")
- planter()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement