Jump to content




Mining-turtle (Stripmining)

turtle computer lua

15 replies to this topic

#1 onix331

  • Members
  • 13 posts

Posted 30 July 2014 - 03: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:

Posted Image
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:
Spoiler

(OLD)Turtle-side:
Spoiler

(OLD)Computer-side:
Spoiler


I hope you guys like it!

--onix331

Edited by onix331, 27 December 2014 - 10:58 PM.


#2 metron80

  • Members
  • 55 posts
  • LocationSolitude, Skyrim

Posted 31 July 2014 - 10:39 PM

Very nice program! One question though: What happens when it runs out of fuel?

Edited by metron80, 31 July 2014 - 10:39 PM.


#3 LeonTheMisfit

  • Members
  • 30 posts

Posted 01 August 2014 - 12:05 AM

View Postmetron80, on 31 July 2014 - 10:39 PM, said:

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.

#4 metron80

  • Members
  • 55 posts
  • LocationSolitude, Skyrim

Posted 01 August 2014 - 01:57 AM

View PostLeonTheMisfit, on 01 August 2014 - 12:05 AM, said:

View Postmetron80, on 31 July 2014 - 10:39 PM, said:

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.

#5 onix331

  • Members
  • 13 posts

Posted 01 August 2014 - 11:10 AM

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 by onix331, 01 August 2014 - 06:19 PM.


#6 onix331

  • Members
  • 13 posts

Posted 01 August 2014 - 06:21 PM

Refuel now availiable! (Beta) Please report any bugs!
http://pastebin.com/QErWEeAR

Edited by onix331, 12 August 2014 - 02:08 AM.


#7 onix331

  • Members
  • 13 posts

Posted 01 August 2014 - 06: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 by onix331, 12 August 2014 - 02:08 AM.


#8 onix331

  • Members
  • 13 posts

Posted 01 August 2014 - 09: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 by onix331, 12 August 2014 - 02:08 AM.


#9 onix331

  • Members
  • 13 posts

Posted 24 August 2014 - 07: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 by onix331, 10 October 2014 - 12:04 PM.


#10 onix331

  • Members
  • 13 posts

Posted 10 October 2014 - 12: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 by onix331, 23 December 2014 - 01:36 AM.


#11 onix331

  • Members
  • 13 posts

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

#12 Avarion

  • Members
  • 29 posts

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?

#13 onix331

  • Members
  • 13 posts

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

#14 onix331

  • Members
  • 13 posts

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

#15 Avarion

  • Members
  • 29 posts

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.

#16 RenRen123

  • New Members
  • 2 posts

Posted 26 June 2015 - 08: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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users