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

Mining turtle startup

Started by Runesmacher, 29 November 2012 - 03:58 PM
Runesmacher #1
Posted 29 November 2012 - 04:58 PM
Hi guys

I need a way to edit the startup script of my turtles.
i have some mining scripts that dig strait down, but if my internet fails or i die then the turtle reboots, meaning it can be almost at bedrock and i have to retrieve it at some way.

how can i do this? so i need a startup script inside my turtle telling it to go up if it boots up.


Thanks in advance
Runesmacher
Dlcruz129 #2
Posted 29 November 2012 - 06:04 PM
Type "edit startup" on a computer, then enter your code. Any file named startup runs when the computer turns on. As far as the code, I would put a roof above the hole and do:

while true do
  if not turtle.detectUp() then
    turtle.up()
  end
end
Runesmacher #3
Posted 30 November 2012 - 02:30 AM
well that was the problem it wouldn't run the startupm script, i figured it out now

thanks for the info