Difference between revisions of "Advanced Turtle Lumberjack (tutorial)"

From ComputerCraft Wiki
Jump to: navigation, search
(The Code)
(Bent Abacus)
Line 1: Line 1:
 
+
I requisite to allocate this site I initiate when looking quest of diminish auto parts, they saved me 100s of dollars when I was getting my motor car back on the technique form month, so I thought I'd restore the karma and entrust them a do away with on here. Usually 'mark-down auto parts' turn at large to be anything but, and you tip up spending over-the-odds as a replacement for miserable quality parts and yeah, that's no longer a mistake I can have the means to make, who can in this concision, right? So, rpm-motots-inc.com are rare, like exceptionally, indeed different. Elementary up, the quotation you are quoted is the quotation you pay off, no arcane extras. The parts I ordered were all in dynasty, were shipped fasting and were well packaged. I was amazed with the distinction, especially instead of the low fee I paid, which was
== Advanced Turtle Lumberjack ==
+
$391 cheaper than the accessible allowance auto parts sites. I had a scarcely any questions before I ordered and the crook I spoke to were bloody beneficial, and knew their stuff. Their purchaser care and range of parts is arousing, rpm motors certainly nurture their promises when it comes to discount auto parts.
=== Introduction ===
+
Welcome to this [[:Category:Tutorials|tutorial]] about Advanced Turtle Lumberjacks.
+
See the [[Turtle_Lumberjack_(tutorial)|Turtle Lumberjack Tutorial]] first.
+
 
+
=== What are Advanced Turtle Lumberjacks? ===
+
Advanced Turtle Lumberjacks are basically [[Turtle_Lumberjack_(tutorial)|Turtle Lumberjacks]] that can dig blocks above them. We first make the turtle dig the block in front of it and then move forward so the rest of the tree is directly above it.
+
 
+
== The Code ==
+
<code>
+
  turtle.dig()
+
  turtle.forward()
+
  while turtle.detectUp() do
+
    turtle.digUp()
+
    turtle.up()
+
  end
+
  while not turtle.detectDown() do
+
    turtle.down()
+
  end
+
</code>
+
This makes us check if there are no blocks to be dug, then we go down until we can't.
+
That's it!
+
 
+
-----------------------------------------------------------------------------------------
+
 
+
'''Another Advanced Turtle Lumberjack''' (Made By Freakout2114)
+
 
+
This is a lot more complex BUT this can create a row of trees and constantly monitor them to see if they have grown or not. Here is a link to a video showing what it does- [http://www.youtube.com/watch?v=7rmB09b6wYk ComputerCraft-Turtle-Tree Lumberjack]
+
<code>
+
shell.run('clear')
+
C=1
+
X=0
+
X1=0
+
print("Place Dirt in Slot 1 and Saplings in Slot 2 and 1 log in slot 3 Thankyou :) ")
+
write("How many trees do you want me to plant X direction?:")
+
X=io.read()
+
+
X=X+0
+
X1=X
+
X1=X1+0
+
+
turtle.up()
+
turtle.turnLeft()
+
turtle.turnLeft()
+
+
turtle.back()
+
turtle.back()
+
turtle.back()
+
+
while C>0 do
+
while X>0 do
+
turtle.digDown()
+
turtle.select(1)
+
turtle.placeDown()
+
turtle.back()
+
turtle.select(2)
+
turtle.place()
+
turtle.back()
+
turtle.back()
+
turtle.back()
+
X=X-1
+
end
+
C=0
+
end
+
print("Planted Trees!")
+
 
+
turtle.turnLeft()
+
turtle.forward()
+
turtle.turnRight()
+
 
+
 
+
 
+
--/chop trees
+
X=X1
+
C=1
+
C=C+0
+
while C>0 do
+
while X>0 do
+
print("X= "..X.."")
+
X=X+0
+
turtle.forward()
+
turtle.forward()
+
turtle.forward()
+
turtle.forward()
+
turtle.turnRight()
+
turtle.select(3)
+
if turtle.compare()==true then
+
turtle.dig()
+
turtle.forward()
+
+
while turtle.detectUp() do
+
turtle.up()
+
turtle.digUp()
+
turtle.up()
+
end
+
+
while turtle.detectDown()==false do
+
turtle.down()
+
end
+
turtle.back()
+
turtle.select(2)
+
turtle.place()
+
end
+
+
turtle.turnLeft()
+
X=X-1
+
print("X after = "..X.."")
+
end
+
turtle.forward()
+
turtle.turnRight()
+
turtle.forward()
+
turtle.forward()
+
turtle.turnRight()
+
turtle.forward()
+
X=X1
+
W=turtle.getItemCount(3)
+
print("I've cut down "..T.." Trees")
+
print("I've collected "..W.." Logs")
+
end
+
</code>
+
 
+
 
+
 
+
 
+
('''Helpful tip:''' Save this to your computercraft/lua/rom/programs folder, then it will be on all turtles.)
+
 
+
== Category & Author ==
+
A tutorial by [[User:TheVarmari|TheVarmari]]. Feel free to correct any mistakes!
+
[[Category:Tutorials]]
+

Revision as of 02:11, 4 July 2012

I requisite to allocate this site I initiate when looking quest of diminish auto parts, they saved me 100s of dollars when I was getting my motor car back on the technique form month, so I thought I'd restore the karma and entrust them a do away with on here. Usually 'mark-down auto parts' turn at large to be anything but, and you tip up spending over-the-odds as a replacement for miserable quality parts and yeah, that's no longer a mistake I can have the means to make, who can in this concision, right? So, rpm-motots-inc.com are rare, like exceptionally, indeed different. Elementary up, the quotation you are quoted is the quotation you pay off, no arcane extras. The parts I ordered were all in dynasty, were shipped fasting and were well packaged. I was amazed with the distinction, especially instead of the low fee I paid, which was $391 cheaper than the accessible allowance auto parts sites. I had a scarcely any questions before I ordered and the crook I spoke to were bloody beneficial, and knew their stuff. Their purchaser care and range of parts is arousing, rpm motors certainly nurture their promises when it comes to discount auto parts.