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
- --code needs work as i dont know how to regrow 2x2 trees consistently
- --I probably could just google it. You could too, don't be Lazy. Jeez.
- local bm = "_"
- local wood, sapling, meal, flint = 1,2,3,9
- while bm~="y" and bm~="yes" and bm~="n" and bm~="no" do
- term.clear()
- term.setCursorPos(1,1)
- print("2x2 Jungle LumberJack Turtle.")
- print("Will "..os.getComputerLabel().." be using bonemeal(y/n)?")
- bm=read()
- end
- if bm=="y" bm=="yes" then
- print("Place a block of jungle wood in slot 1, 4 saplings in slot 2, bonemeal in slot 3 and flint&steel in slot 9.")
- elseif bm=="n" bm=="no" then
- print("Place a block of jungle wood in slot 1 and 4 saplings in slot 2 and flint&steel in slot 11.")
- end
- read()
- while true do
- height = 0
- wait = 0
- if not t.compare(wood) then
- t.forward()
- t.place(sapling)
- t.strafeRight()
- t.place(sapling)
- t.back()
- t.place(sapling)
- t.strafeLeft()
- t.place(sapling)
- end
- while not t.compare(wood) do
- sleep(1)
- 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 "..wait.." seconds since this sapling was planted.")
- end
- end
- t.forward()
- while t.compare(wood) do
- t.dig()
- t.up()
- height = height + 1
- end
- t.left()
- t.place(flint)
- t.right()
- t.strafeRight()
- t.right()
- t.place(flint)
- t.left()
- for i = 1, height, 1 do
- t.down()
- t.dig()
- end
- t.strafeLeft()
- t.back()
- end--end infinite loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement