Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Treechopper alpha 0.01
- -- Intended use is the static chopping of Oak Trees or other trees.
- -- Refuel
- turtle.select(1)
- turtle.refuel(10)
- turtle.select(2)
- -- Move to tree
- turtle.forward()
- turtle.forward()
- -- Have tree grown
- local success, t = turtle.inspect()
- if success then
- blockName = t.name
- print( "The block infront of your turtle is named " .. t.name .. " and has a metadata value of " .. t.metadata )
- else
- print( "There isn't a block below your turtle" )
- end
- if string.match(blockName, "log") then
- print ("Wood detected.")
- turtle.dig()
- turtle.forward()
- turtle.digUp()
- turtle.up()
- turtle.digUp()
- turtle.up()
- turtle.digUp()
- turtle.up()
- turtle.digUp()
- turtle.up()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.down()
- turtle.select(16)
- turtle.suck()
- turtle.back()
- turtle.suck()
- turtle.place()
- turtle.select(2)
- end
- -- If so then chop else go back
- -- Move to chest
- turtle.back()
- turtle.back()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement