This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
jaron's profile picture

excavate command

Started by jaron, 04 September 2012 - 12:23 AM
jaron #1
Posted 04 September 2012 - 02:23 AM
I need help I new to computercraft. I working on a mining turtle and use the excavate command. I do a 30x30 quarry an do the excavate it runs intel the turtle invetory is full. then it comes back to where i put it down. Then i have a filter to pulled the items out. But the turtle will not start back mining again. what is wrong does excavate command work that way.
evilguard #2
Posted 04 September 2012 - 03:47 AM
fuel option is On or Off? Cause that sound like turtle who are out of fuel. If the fuel option is on try to set the turtle to take coal from some source. So it could go back to work.

If the fuel is off.. idk.
NIN3 #3
Posted 04 September 2012 - 03:52 AM
If the fuel was on, then its more probable that it would stop somewhere else than right there…

Im not sure if excavate will keep running.
evilguard #4
Posted 04 September 2012 - 04:08 AM
well on fuel mode the turtle scan for his fuel level and when it come down a certain level depending from where it is he come back to start. So what usualy happen is that you put for exemple a stack of coal as fuel. it will start the excavation and when he don't have any news space for inventory then he go unload. But it also unload all fuel that was in. but there is still some fuel on. so he go back for a little time and get out of fuel and get back on surface and ask for fuel.

That why i'm not sure if its the reason. cause if you open the turtle it say "waiting for fuel".
jaron #5
Posted 04 September 2012 - 04:33 AM
here is some screenshots to show you what it does. and how do you tell if fuel option on or off and how do you fuel it up
KaoS #6
Posted 04 September 2012 - 07:07 AM
the excavate command does not know that you have a system that unloads the turtle. run the following


local function check()
local int=0
for i=1,16 do
int=int+turtle.getItemCount(i)
end
return int
end
while check()~=0 do --if slots are empty just after finishing excavate then assume it is not done
while check()~=0 do sleep(1) end --to wait until slots are empty for unload
shell.run('excavate',30)
end

this will work but will make the turtle go down the hole an additional time once it is done, slight delay but functional
evilguard #7
Posted 04 September 2012 - 01:58 PM
hooo! Okay. i just understand. you have a filter that pull item out of the turtle. But you alway could use a buffer/ejector/Relay. And the turtle will unload automaticaly (as a part of the programs) and go back to work. you then can set-up a programs to put back fuel when its unload.
KaoS #8
Posted 04 September 2012 - 02:07 PM
yeah but if you are going to load fuel in you will need to modify the code for that