1 posts
Posted 26 May 2016 - 12:29 AM
Alright so i know nothing about programing so I'm here to ask for some help. Pretty much all i want to do is have a mining turtle break a block in a cobblestone generator pick up that block and do it 64 times then turn to a chest and place all 64 cobblestone in the chest then do it all again can anyone help me please
3057 posts
Location
United States of America
Posted 26 May 2016 - 02:12 AM
while true do --#do everything inside this loop forever
for i = 1, 64 do --#do everything inside this loop 64 times
turtle.dig() --#break the block in front of the turtle
end --#end of "do everything inside this loop 64 times"
turtle.turnLeft() --#turn the turtle left
turtle.drop( 64 ) --#drop 64 of whatever is in the currently selected slot (default: 1)
turtle.turnRight() --#turn the turtle right
end --#end of "do everything inside this loop forever"
http://computercraft.info/wiki/Loops#The_While_loophttp://computercraft.info/wiki/Loops#The_For_loophttp://computercraft.info/wiki/Turtle.dighttp://computercraft.info/wiki/Turtle.turnLefthttp://computercraft.info/wiki/Turtle.turnRighthttp://computercraft.info/wiki/Turtle.drop