Showing posts with label tree. Show all posts
Showing posts with label tree. Show all posts

Wednesday, January 2, 2013

More turtle fun!

So here's another script for the turtle, this one is made to mine those giant fur trees. You place your turtle facing the tree with a chest at his back. he should be on the left side of two trunk blocks. I took SethBling's original "Fell" script and rewrote it to be a little more fuel efficient as well as add some safety and error checking.

-- Clearing Terminal
term.clear()
term.setCursorPos(1,1)

-- Setting up Variables
local fuel = 1
local gone = 0

turtle.select(fuel)

-- Checking for Fuel before start
if ( not turtle.refuel(1) or turtle.getItemCount(fuel) < 1 ) then
    print("Missing Fuel in Slot 1")
    error()
end

-- Drop Items Function
function dump()
    print("Dumping Goods")
    for i = 2, 16 do
        turtle.select(i)
        turtle.drop()
    end
    turtle.turnLeft()
    turtle.turnLeft()
end

-- Fuel Checking Function
function tFuel(moved,f)
    if turtle.getFuelLevel() < (moved + 10) then
        turtle.select(f)
        if not turtle.refuel(1) then
            print("Need Fuel")
            finished(moved)
        end
    end
end

-- Return Function
function finished(m)
    print("Returning after " .. m + 1 .. " blocks")
    turtle.turnRight()
    turtle.turnRight()
    for i = 0, m do
        turtle.down()
    end
    dump()
    error()
end

print("Felling Tree")

turtle.dig()
turtle.forward

while turtle.digUp() do
    turtle.dig()
    tFuel(gone,fuel)
    turtle.up()
    gone = gone + 1
end

turtle.turnRight()
turtle.dig()
turtle.forward()
turtle.turnLeft()
turtle.dig()

for i = 0, gone do
    turtle.digDown()
    turtle.down()
    turtle.dig()
end

turtle.turnLeft()
turtle.forward()
turtle.turnLeft()
dump()

Wednesday, October 5, 2011

Full of fail

So I tried to start my new Hardcore Survival Let's Play series last night, but it was horrible. I used a seed I had heard about as being a good survival island seed, but I ended up spending the first 10 minutes swimming from island to island looking for one with trees, and that does not make good video. I think this is for the best though, cause my commentary sucked anyway, and because of that I came up with a new idea I'm going to use for this series. I can't tell you what it is, but I hope to get some video tonight. I can't promise to be great, but I can promise to try to be!