Posted 06 October 2014 - 06:41 AM
Hello, world and sundry. I've recently installed ComputerCraft to help out with RotaryCraft, as the two seem to synergize well together. On a less related note, I'm having a bit of trouble with the damnable turtles.
I'm trying to program a turtle to place down a gravel block and then break it apart for the purpose of harvesting Flint, a 1 in 10 chance. Then the turtle would suck up whichever item was dropped and place it back into the chest that it was next to. Entered the following code into the bugger as per the Turtle tutorial on the ComputerCraft wiki, but it doesn't appear to work.
The code is as follows:
Lua coding was familiar; from back in the day with Warcraft 3's World Editor. Good times. Anyhoo, could anyone help me out with this? The thing's being uncooperative and non-responsive.
I'm trying to program a turtle to place down a gravel block and then break it apart for the purpose of harvesting Flint, a 1 in 10 chance. Then the turtle would suck up whichever item was dropped and place it back into the chest that it was next to. Entered the following code into the bugger as per the Turtle tutorial on the ComputerCraft wiki, but it doesn't appear to work.
The code is as follows:
if true do
turtle.refuel(1)
print ("Turtle Refuelled")
if turtle.detect("false") then
print "Placing..."
sleep(0.5)
turtle.select(1)
turtle.place(1)
print "Block Placed"
sleep(0.5)
print "Breaking..."
turtle.dig()
print "Sucking..."
turtle.turnRight()
turtle.drop()
turtle.get(1)
turtle.turnLeft()
end
Lua coding was familiar; from back in the day with Warcraft 3's World Editor. Good times. Anyhoo, could anyone help me out with this? The thing's being uncooperative and non-responsive.