Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Loading Robust Turtle API...")
- local load = os.loadAPI("t")
- if load then
- print("Robust Turtle API loaded.")
- else
- print("Robust Turtle API not found in the root directory with filename t")
- print("Attempting to download as t from pastebin...")
- os.sleep(2)
- local response = http.get("http://pastebin.com/raw.php?i= e0UksEtT")
- if response then
- print( "Success." )
- local sResponse = response.readAll()
- response.close()
- local file = fs.open( "t", "w" )
- file.write( sResponse )
- file.close()
- print( "Downloaded as t")
- load = os.loadAPI("t")
- if load then
- print("Robust Turtle API installed & loaded.")
- end
- else
- print( "Download Failed. Please Install Manually." )
- return
- end
- end
- --1x1 lumberjack turtle. Can use bonemeal or not. Burns Leaves.
- --updated 5/25/2014
- local bm = "_"
- local wood, sapling, meal, flint = 1,2,3,9
- function burn()
- for i=1,4 do
- t.place(flint)
- t.right()
- end
- end
- while bm~="y" and bm~="yes" and bm~="n" and bm~="no" do
- term.clear()
- term.setCursorPos(1,1)
- print("LumberJack Turtle.")
- print("Will "..os.getComputerLabel().." be using bonemeal(y/n)?")
- bm=read()
- end
- if bm=="yes" then
- bm="y"
- elseif bm=="no" then
- bm="n"
- end
- if bm=="y" then
- print("Place a block of wood in slot 1, saplings in slot 2, bonemeal in slot 3 and flint&steel in slot 9.")
- elseif bm=="n" then
- print("Place a block of wood in slot 1, saplings in slot 2 and flint&steel in slot 9.")
- end
- read()
- while true do
- height = 0
- wait = 0
- if not t.compare(wood) then
- t.place(sapling)
- end
- while not t.compare(wood) do
- sleep(2)
- wait = wait + 1
- term.clear()
- term.setCursorPos(1,1)
- print("Waiting for growth.")
- if bm=="y" then
- t.restack(meal)
- turtle.select(meal)
- turtle.place()
- print(wait.." bonemeals placed for this sapling so far.")
- elseif bm=="n" then
- print("It's been "..2*wait.." seconds since this sapling was planted.")
- end
- end
- print("Jacking Lumber...")
- t.forward()
- while t.compareUp(wood) do
- t.up()
- height = height + 1
- end
- for i = 1, height do
- t.down()
- if i==2 then burn() end
- end
- t.back()
- end--end infinite loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement