11 posts
Posted 24 July 2013 - 02:01 PM
I am looking for a very simple program and I am getting hung up on a few things. First I just need to issue a command to have the turtle dig in one direction in a static number (34). From there I will have it dig up and around some more and then finally, and this is the second problem, is drop all its findings in a chest.
Any help would be tremendous!!
191 posts
Posted 24 July 2013 - 02:08 PM
Cant really see what you mean.. have i got it right here?
1:digs for example 34 blocks up,forward and down
2: returns and drops inventory
40 posts
Posted 24 July 2013 - 02:30 PM
To have a turtle drop items in a chest, use turtle.drop() or turtle.dropDown() or turtle.dropUp(), but the chest has to be in the appropriate position ( if you use dropUp the chest has to be above the turtle, ext)
11 posts
Posted 24 July 2013 - 03:29 PM
Well what I am looking for in the 34 blocks is the program would be extremely linear. I want to dig 34 blocks straight, dig down 1, then some turns, then 34 blocks straight. Then some turns and then 34…. Mainly I just want it to be a script of commands to harvest my crops.
Clueless: Thanks that clears up that command.
758 posts
Location
Budapest, Hungary
Posted 24 July 2013 - 04:05 PM
some turns
How many exactly? Lua can do stuff, but it can't do magic - it can't read your mind.
And once again…
Clueless: -snip-
For the record, the name is not "Clueless". Look at your comments in the topic - is your name "Clueless" as well? That would be a funny coincidence. Mine is not "Pro Coder" either. The name is in the darker blue line above the comment.
191 posts
Posted 24 July 2013 - 04:40 PM
Do you want us to WRITE the programs or just give you tips?
11 posts
Posted 24 July 2013 - 04:45 PM
I was just looking for tips. I of course did not think you or LUA could read minds.
101 posts
Location
Norway
Posted 24 July 2013 - 06:54 PM
for i = 1,34 do
turtle.forward()
turtle.digDown()
end
turtle.turnRight()
turtle.forward()
turtle.turnRight()
for i2 = 1,34 do
turtle.forward()
turtle.digDown()
end
turtle.forward()
turtle.turnRight()
turtle.forward()
turtle.turnLeft()
turtle.drop()
turtle.turnRight()
turtle.turnRight()
this will move 34 block forward and dig every block under it, then dig the line right of that when it goes home. Then drop everything in a 'chest' behind the starting point.
11 posts
Posted 25 July 2013 - 10:17 AM
Thank you so much, that was exactly what I needed.
191 posts
Posted 25 July 2013 - 10:27 AM
I dont think so, use
for i = 1,16 do
turtle.select(i)
turtle.drop()
end
This makes it drop the whole inventory