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

Mining-turtle (Stripmining)

Started by onix331, 30 July 2014 - 02:39 PM
onix331 #1
Posted 30 July 2014 - 04:39 PM
–Updatet (Version 2.6) Optimized for all ComputerCraft-Versions!
Now with auto-fuel detection and refueling! AAAANNNND RedNet Support!

–Updatet (Version 2.8) For Computer and Turtle NOW OUT OF BETA


Now i have updatet the program to Version 2.8! It is now universal for both Turtle and Computer!
As always: Please test it and feel free to make critic and report bugs (In this post).
Download down there:)


Hello guys,
after 30 hours of programming, I'm finally done. I have made a mining program with turtles. (Cptn. Obvious…)
You can input the length of all the shafts as well as the count of shafts you want to have. After that, you define the direction of the shafts (Left or Right).
At the end you enter if you want to refuel or not.
At least you input if you want to use the RedNet support. !Important! First open the Computer-side because of pairing! (You have to download the program for the pc first and attach a modem to it)

After the many inputs the turtle begins to mine.
This is the layout:


The standard height is two blocks and the space between the shafts is two blocks too.

And yes, you can place a chest!
It will input the items if necessary and/or after the mining is done.

Universal:
Spoilerhttp://pastebin.com/T4dbE7We
PLEASE REPORT ANY BUGS!
Put it in a Turtle/Computer with:
pastebin get T4dbE7We >name<

(OLD)Turtle-side:
Spoilerhttp://pastebin.com/QErWEeAR
PLEASE REPORT ANY BUGS!
Put it in a turtle with:
pastebin get QErWEeAR >name<

(OLD)Computer-side:
Spoilerhttp://pastebin.com/CFgK7yhF
PLEASE REPORT ANY BUGS!
Put it in a turtle with:
pastebin get CFgK7yhF >name<


I hope you guys like it!

–onix331
Edited on 27 December 2014 - 09:58 PM
metron80 #2
Posted 31 July 2014 - 11:39 PM
Very nice program! One question though: What happens when it runs out of fuel?
Edited on 31 July 2014 - 09:39 PM
LeonTheMisfit #3
Posted 01 August 2014 - 01:05 AM
Very nice program! One question though: What happens when it runs out of fuel?

After a quick skimming of the code it looks like at no point does it check fuel levels, so I'd say it continues to run without moving until the script completes.
metron80 #4
Posted 01 August 2014 - 02:57 AM
Very nice program! One question though: What happens when it runs out of fuel?

After a quick skimming of the code it looks like at no point does it check fuel levels, so I'd say it continues to run without moving until the script completes.

Well. I think onix should add a part checking the amount of fuel. Other than that, very good program.
onix331 #5
Posted 01 August 2014 - 12:10 PM
Yey im currently working to fix a bug where the turtle does not come back to the chest (gnah), then im looking into the refuel part.
Edited on 01 August 2014 - 05:19 PM
onix331 #6
Posted 01 August 2014 - 07:21 PM
Refuel now availiable! (Beta) Please report any bugs!
http://pastebin.com/QErWEeAR
Edited on 12 August 2014 - 01:08 AM
onix331 #7
Posted 01 August 2014 - 07:50 PM
Automatic Refuel now availiable (The turtle will search for anything refuelable in the inventory of necessary) V1.9 BETA
http://pastebin.com/QErWEeAR
Edited on 12 August 2014 - 01:08 AM
onix331 #8
Posted 01 August 2014 - 10:07 PM
INFORMATION: Due to changes in my code new functions will only be added for CC Versions 1.6 and higher. But don'cry:P Bugs will be fixed if they appear in the old versions.
Edited on 12 August 2014 - 01:08 AM
onix331 #9
Posted 24 August 2014 - 08:20 PM
New update! Now fuel-calculating that you dont need to refuel manually after start!
Also optimized the program that it mines faster removed a few lines and fixed a few bugs. ENJOY!

–onix331
Edited on 10 October 2014 - 11:04 AM
onix331 #10
Posted 10 October 2014 - 01:01 PM
Hello!

Now i have updatet the program to Version Beta 2.7! It should be now universal for Computer and Turtle.
As always: Please test it and feel free to make critic and report bugs (In this post).
Beta means it could be unstable (Crashes all the time), does not start etc.!
Download is in the first post.



–onix331
Edited on 23 December 2014 - 12:36 AM
onix331 #11
Posted 23 December 2014 - 01:38 AM
Hi again fellows!

Now its updatet to 2.8 and supports both computer and turtle!

Changelog:

*Finished universal-use
*Fixed some rare bugs
*Fixed Netcode (Redcode)
*Optimization

As always PLEASE report bugs, glitches etc.! Thanks.


–onix331
Avarion #12
Posted 29 December 2014 - 12:40 PM
Strange. It does not return to the chest when full. It just ejects the material.

Further it ignores every ore left and right of the strip. Is this as intended?
onix331 #13
Posted 31 December 2014 - 11:29 AM
I will look into it.

The ore on the left and right is ignored currently, maybe i will integrate this in the future.
Thanks for the feedback.

–onix331
onix331 #14
Posted 31 December 2014 - 11:44 AM
I can't reproduce the bug you said, can you send me the steps how to reproduce it?

–onix331
Avarion #15
Posted 01 January 2015 - 10:51 AM
I've just tried to reproduce it but the program crashes with an error message:

Stripmine:25: attempt to compare number with string expected. got number

Its in the fuel checking part. It might be because I've disabled fuel use, since I'm currently testing tons of programs and try to write my own.
RenRen123 #16
Posted 26 June 2015 - 09:58 PM
you should make it so the turtle also places torches if any aivailable

1. it doesnt always go to the chest, if the inventory is full while the program is running , and since it doesnt place torches mobs can and will spawn, and block the way of the turtle, wich is quite annoying because, if there is something in the way of the turtle, it will skip that one "turtle.forward()" and not be able to go back to the chest