Mining turtle depositing items.

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here
  • The FTB Forum is now read-only, and is here as an archive. To participate in our community discussions, please join our Discord! https://ftb.team/discord

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
I tried to put that code as a function within my branch program but it wont place the chest, and instead of coming back when full, it begins popping out the item it just dug out.... And i have 0 experience with coding( i just copied a branch program from some dude on youtube... S i did as i tought but i failed...can you help me?
1. topic is several years old
2. The chest needs to be in slot 1. If you put it in any other slot it will not place it.
3. Coming back when full? What on earth are you talking about? All the script does is test if the inventory is full, place the item in slot 1(chest), start dropping everything in slot 2-16(into the chest, if it was placed. If not it will be dropped onto the ground) and then mine the chest.
 

mightymike

New Member
Jul 29, 2019
3
0
0
first of all, my turtle have OS1.3... i'm using Tekkit classic(so that's a bunch of modpacks put together,,,might not have the latest computercraft in it..) and when i use the excavate program(wich is set up by default in the turtles, it comes back to it's starting point(supposed to dump in a chest that is near the turtle, but it won't deposit) so i tried to create a branch program with the tutorial of a youtuber, and succeded, but as i explained, it just shoots off the mined resources, so i tried to add that piece of code...but i failed
2nd point, my turtles have only 9 slots, and it doesnt need to be refueled, they just work... so i still put the chest on slot 1, and wrote the code so it would check slot 9 instead of 16...but it wont place the chest and deposit items in it...
and finally i know the topic is old but i'd still need help as i dont know coding, and i want to use the turtles because they dont create ugly empty holes like the quarry mod, when the program works
 

mightymike

New Member
Jul 29, 2019
3
0
0
an easier way than having the turtle go all the way back to a chest to deposit the items is to have each turtle carry it's own ender chest. That way you can program the turtle to go as far away as it wants within loaded chunks and it won't have to keep wasting fuel returning.

Code:
if turtle.getItemCount(16) ~= 0 then
turtle.dig()
turtle.select(1)
turtle.place()
for i = 2,16 do
   turtle.select(i)
   turtle.drop()
end
turtle.select(1)
turtle.dig()
end
will place an ender chest (which you would put in slot 1 of the turtle's inventory) in front of the turtle (breaking the block in front of it if there is one), place all of the turtle's inventory into the chest, then pick it up again. It will only do this if the turtle has an item in slot 16 (which usually means a full inventory)
when i enter this code, it says that there's a = missing on the first turtle.select(1) line..............but it may be my mistake since i just added that to a branch program i took off youtube....i don't know jackshit about coding so....help pls
 

rhn

Too Much Free Time
Nov 11, 2013
5,706
4,420
333
when i use the excavate program(wich is set up by default in the turtles, it comes back to it's starting point(supposed to dump in a chest that is near the turtle, but it won't deposit) so i tried to create a branch program with the tutorial of a youtuber, and succeded, but as i explained, it just shoots off the mined resources, so i tried to add that piece of code...but i failed
Unless you actually code the turtle to go back to some predetermined location, it will not do so. The "excavate" script is a complete full script that has a part included that constantly keeps track of there the turtle is compared to its starting position, and when it is then full it will use those to find its way back.

first of all, my turtle have OS1.3... i'm using Tekkit classic
If I am not mistaken CC1.3 is ancient...
According to this:
http://computercraft.info/wiki/Turtle_(API)
The "turtle.place()" that is used to place down the chest is not added before 1.4. So pretty obvious why it does not place down the chest based on that piece of information :p

i don't know jackshit about coding so....help pls
I would suggest you start with something simpler. Experiment with some more basic programming first. Also if you REALLY want to continue to do so with such an old pack and with CC1.3, then you need to pay a LOT of attention to wikis etc. to see which features are actually implemented that early.