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
- --obsidian floor harvesting turtle
- --can also be used to harvest block layers
- write("Place turtle above a corner of the obsidian layer.")
- print("")
- write("Is the rest of the layer to the right or left of the turtle? ")
- local block = 1
- local turn = read()
- while turn ~= "left" and turn ~= "right" do
- print("Please enter left or right")
- turn = read()
- end
- write("How many rows of obsidian? ")
- local rows = term.readNum()
- t.down()
- for i=1, rows do
- if turn == "left" then
- while t.compare(1) or t.compareLeft(1) do
- t.digUp()
- t.forward()
- end
- turtle.turnLeft()
- t.digUp()
- t.forward()
- turtle.turnLeft()
- turn = "right"
- elseif turn == "right" then
- while t.compare(1) or t.compareRight(1) do
- t.digUp()
- t.forward()
- end
- turtle.turnRight()
- t.digUp()
- t.forward()
- turtle.turnRight()
- turn = "left"
- end
- local tries = 0
- while not turtle.compare() do
- t.digUp()
- t.forward()
- tries = tries+1
- if tries > 10 then
- break
- end
- end
- end
- t.up()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement