Turtle Quarry

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Kaffefilter

New Member
Jul 29, 2019
58
0
0
Hey guys.
So bored as I was, I decided to make a quarry. Allthough, I was in a great of rescources I decided to simply code one. So I did.

Figured there were more people out there, being just as annoyed with greg tech as I am, that I wanted to share my turtle code with you.

Have to mention though, that I am terrible at coding, but I try my best.

http://pastebin.com/gwPdpa3N

To explain quick, I mines out and area of 10x10.
Each path down is 2 blocks.
Ender chest in slot 16 (the last)
Fuel in slot 1 (the first)

Hope it comes in handy for even just one other person.
 

Kaffefilter

New Member
Jul 29, 2019
58
0
0
If anyone is able unmessy it, go ahead :) As i said I'm more than a rookie at coding.

Tryed cleaning it up a bit, with more accuate spaces.
 

5argan

New Member
Jul 29, 2019
83
0
0
How do I implement this into my turtle (except for writing it by hand since ctrl+v does not work inside minecraft afaik)?
I am sure this has been asked somewhere else for sure (probably a lot) but I'd appreciate any help :)
 

lukasni

New Member
Jul 29, 2019
19
0
0
You can get it directly from pastebin using the folowing command:

Code:
pastebin get [code] [filename]
 
eg. pastebin get gwPdpa3N quarry

Code is the Pastebin URL-parameter (gwPdpa3N in this example), filename the name of the destination file.
 

EternalDensity

New Member
Jul 29, 2019
1,428
2
0
So you can't paste into a computer/turtle from the clipboard, but there's a command to download from pastebin... priorities, people :p :D
 

Kaffefilter

New Member
Jul 29, 2019
58
0
0
In the default configs, the HTTP API is disabled.

# Enable the "http" API on Computers
B:enableAPI_http=false

change the false to true
 

5argan

New Member
Jul 29, 2019
83
0
0
it already was for me :p dw20 v3
I wonder what super turtle in the ccturtle config does tho...
 

Evil Hamster

New Member
Jul 29, 2019
768
0
0
I just built my first turtle, running your program. It's working great :)

Is there a way to pause them? taking away the fuel means having to restart manually.
 

5argan

New Member
Jul 29, 2019
83
0
0
looking at the code there isn't except turtles have a built in pause command which I don't think they do
 

Kaffefilter

New Member
Jul 29, 2019
58
0
0
Have actually been wondering myself how to implement a pause system, or if it is even possible. If anyone know's how, feel free to write :)
 

TheLoneWolfling

New Member
Jul 29, 2019
260
-6
0
Have actually been wondering myself how to implement a pause system, or if it is even possible. If anyone know's how, feel free to write :)
One could, but it would have to be manual.

Basically every move, write current state to file. On program load, load state.

That way if you press ctrl-T it will stop, and you can resume it by simply re-running the program.
 

QuantumPugilist

New Member
Jul 29, 2019
52
0
0
It might be possible to implement a pause function using wireless turtle. Each time it progresses to a chosen point in the program, have it check for a rednet signal of some kind, have it sleep for X. Another possibility would give the turtle some way to track how far into the program it has progressed (as a variable), assume some sort of holding pattern, and restart from there. A more long term pause would be writing its position to a file, then you could pause them mid-project and shut off the game while maintaining state.

Depending on why you wanted to pause would change what you implement. I like to code my miner turtles to auto-fetch supplies and dump mined items so they're set and forget.
 

Kaffefilter

New Member
Jul 29, 2019
58
0
0
Been considering using a GPS system or so, to make it take out a larger area. Guess the wireless pause would be a possibility aswell.
Actually the wireless pause seems quiet easy to implement.
 

QuantumPugilist

New Member
Jul 29, 2019
52
0
0
It's also possible to use it where its constantly receiving a rednet signal, and if it didn't receive the signal it would hang until it did. I sometimes use rednet loops for emergency turtle stops, since getting in their way can throw the pathfinding off.

A similar thing should be possible using the REther module from Misc Peripherals, but I've not played around with that part of it yet. Something like

Code:
f = peripheral.wrap("right")
 
f.setFreq(1)
 
while f.get() == true do
 
end

should loop the empty code block until it receives a false state on frequency 1, then it will continue. Nesting it within a looping block of code will check for that state on each loop.
 
  • Like
Reactions: Kaffefilter

thezeronumber

New Member
Jul 29, 2019
69
0
0
It might be messy and it might not be the most fluent but it works and that is the key element. If the human race tried nothing different we would have never gotten anywhere in the world.

I applaud anyone trying to code something when they have next to no experience so kudos. When I eventually start using the Turtle my first project is to make a mineshaft script which auto places torches. I am terrible at learning languages so I will be pleased if I can get something as simple as this working.
 

SuperFlorian12

New Member
Jul 29, 2019
16
0
0
my first project is to make a mineshaft script which auto places torches.
I would like to try that myself. If you give me some infos about the Mineshaft (how it looks, how wide it is, how many blocks the torches are apart), then I'll try.
Might be usefull ;)
So far I made a strip mining program and a Buildcraft Quarry like program