Jump to content




Advanced Programs: Orefinder, Tunnel.

turtle

253 replies to this topic

#81 Henness

  • Members
  • 189 posts

Posted 19 December 2012 - 02:31 AM

View PostDarkriftX, on 19 December 2012 - 12:53 AM, said:

I had an idea but havent dug far enough into the capabilities to know if it will work. I was thinking that you could "teach" the bot what blocks are. This would require the bot to be able to look at a block and see the item ID (possible?). If so, then you could run a command to have it look at some blocks and store those in a list of always ignore blocks. This would allow you to have it ignore more blocks without taking up inventory slots and also make startup faster as you wouldnt have to give it blocks each time.

I was also thinking about a function that it could run before it goes to drop off stuff. If the bot is set to ignore cobble and gravel, it wont dig it unless it has to, but it will still fill up with these. When the bot realizes that it is full, it could start a function that would scan (for example) slots 5-16 to see if any of them contain the items in 1-4 (ignore slots). Then it could find any dirt/cobble/gravel/smoothstone in its inventory and drop them in a hole. This would allow it to go a lot farther before having to unload.

No that wouldn't be possible, the turtles only way of detecting what blocks are witch is with turtle.compare() and that only returns true or false. So you get pretty limited when it comes to detecting. I could add a drop items option.

#82 sjkeegs

  • Members
  • 75 posts

Posted 19 December 2012 - 09:24 AM

View PostHenness, on 18 December 2012 - 06:25 PM, said:

I added my new program Advanced Updater, If you enable HTTP and run that past bin command it will download it all you have to do is run the program. Please post any bugs you find.

This doesn't seem to be working for me.

It updated all the apps from the updater, and when I run the orefinder it will dig forward once, back up to it's starting position, and turn twice so that it was facing the other direction. I specified a 10x10 with 3 ignore blocks (stone, gravel, dirt).

I initially started out with a non-wireless turtle, and upgraded to a wireless mining turtle. As far as I could tell it was doing the same thing without the wireless module and typing in coordinates.

Edit: I realized that I'm running v1.46 on 1.4.2. Is there something in the latest version that this app is using?

Edit2: I didn't notice that the slots where blocks/items go had changed - this started working for me, but it seems to stall after awhile, and the turtle will just stop and go back to the GUI menu - It's deleted the ofsave file, and I wasn't able to detect what caused it to abort yet.

Edited by sjkeegs, 19 December 2012 - 02:21 PM.


#83 jisco

  • New Members
  • 2 posts

Posted 19 December 2012 - 10:27 AM

Can someone explain to me what i should write when it askes for...face? Im trying to start up Advanced ore finder, i write XYZ coordinates but when face show up i have no idea what to write!

#84 sjkeegs

  • Members
  • 75 posts

Posted 19 December 2012 - 11:57 AM

View Postjisco, on 19 December 2012 - 10:27 AM, said:

Can someone explain to me what i should write when it askes for...face? Im trying to start up Advanced ore finder, i write XYZ coordinates but when face show up i have no idea what to write!

if you pull up the F3 screen and look at the facing it will show you north-south-east-west along with a number 0-3 that represents that direction. The code is looking for the number (as far as I can tell).

#85 vafo

  • Members
  • 10 posts

Posted 19 December 2012 - 01:48 PM

uh.
In the new version, does the gps capability mean we have to build gps towers around?
(If we want to avoid inserting coordinates that is)

#86 Henness

  • Members
  • 189 posts

Posted 19 December 2012 - 05:55 PM

View Postsjkeegs, on 19 December 2012 - 09:24 AM, said:

View PostHenness, on 18 December 2012 - 06:25 PM, said:

I added my new program Advanced Updater, If you enable HTTP and run that past bin command it will download it all you have to do is run the program. Please post any bugs you find.

This doesn't seem to be working for me.

It updated all the apps from the updater, and when I run the orefinder it will dig forward once, back up to it's starting position, and turn twice so that it was facing the other direction. I specified a 10x10 with 3 ignore blocks (stone, gravel, dirt).

I initially started out with a non-wireless turtle, and upgraded to a wireless mining turtle. As far as I could tell it was doing the same thing without the wireless module and typing in coordinates.

Edit: I realized that I'm running v1.46 on 1.4.2. Is there something in the latest version that this app is using?

Edit2: I didn't notice that the slots where blocks/items go had changed - this started working for me, but it seems to stall after awhile, and the turtle will just stop and go back to the GUI menu - It's deleted the ofsave file, and I wasn't able to detect what caused it to abort yet.

If its deleting the ofsave file then that should mean that it is done but I'll keep an eye out, if you run it with "advancedorefinder <width> <length> <ignore>" and to continue use "advancedorefinder" this will show you if there is an error. and not print the gui over the the error.

View Postsjkeegs, on 19 December 2012 - 11:57 AM, said:

View Postjisco, on 19 December 2012 - 10:27 AM, said:

Can someone explain to me what i should write when it askes for...face? Im trying to start up Advanced ore finder, i write XYZ coordinates but when face show up i have no idea what to write!

if you pull up the F3 screen and look at the facing it will show you north-south-east-west along with a number 0-3 that represents that direction. The code is looking for the number (as far as I can tell).

Yes that's exactly what its asking for, I'll make a tutorial for using it.

View Postvafo, on 19 December 2012 - 01:48 PM, said:

uh.
In the new version, does the gps capability mean we have to build gps towers around?
(If we want to avoid inserting coordinates that is)

Yes if you don't want to have to type the cords in then you have to set up some gps hosts. It's defiantly worth it, the continue feature is super useful.

#87 jwplayer0

  • New Members
  • 2 posts

Posted 19 December 2012 - 09:28 PM

View PostHenness, on 19 December 2012 - 05:55 PM, said:

View Postsjkeegs, on 19 December 2012 - 09:24 AM, said:

View PostHenness, on 18 December 2012 - 06:25 PM, said:

I added my new program Advanced Updater, If you enable HTTP and run that past bin command it will download it all you have to do is run the program. Please post any bugs you find.

This doesn't seem to be working for me.

It updated all the apps from the updater, and when I run the orefinder it will dig forward once, back up to it's starting position, and turn twice so that it was facing the other direction. I specified a 10x10 with 3 ignore blocks (stone, gravel, dirt).

I initially started out with a non-wireless turtle, and upgraded to a wireless mining turtle. As far as I could tell it was doing the same thing without the wireless module and typing in coordinates.

Edit: I realized that I'm running v1.46 on 1.4.2. Is there something in the latest version that this app is using?

Edit2: I didn't notice that the slots where blocks/items go had changed - this started working for me, but it seems to stall after awhile, and the turtle will just stop and go back to the GUI menu - It's deleted the ofsave file, and I wasn't able to detect what caused it to abort yet.

If its deleting the ofsave file then that should mean that it is done but I'll keep an eye out, if you run it with "advancedorefinder <width> <length> <ignore>" and to continue use "advancedorefinder" this will show you if there is an error. and not print the gui over the the error.





Im getting an error from the same problem after running it with advancedorefinder, the error is:

advancedorefinder:14: attempt to perform arithmetic __div on nil and number

#88 Henness

  • Members
  • 189 posts

Posted 19 December 2012 - 11:50 PM

I think i fixed it, I never called the size of the screen so it thought the screen width was nil. no need for re downloading just run the updater and it should download the new version of orefinder.

#89 sjkeegs

  • Members
  • 75 posts

Posted 20 December 2012 - 05:58 AM

View PostHenness, on 19 December 2012 - 05:55 PM, said:

View Postsjkeegs, on 19 December 2012 - 09:24 AM, said:

Edit2: I didn't notice that the slots where blocks/items go had changed - this started working for me, but it seems to stall after awhile, and the turtle will just stop and go back to the GUI menu - It's deleted the ofsave file, and I wasn't able to detect what caused it to abort yet.

If its deleting the ofsave file then that should mean that it is done but I'll keep an eye out, if you run it with "advancedorefinder <width> <length> <ignore>" and to continue use "advancedorefinder" this will show you if there is an error. and not print the gui over the the error.

My problems are related to the GPS coordinates. I used the GPS app posted by BigShinyToys in the GPS tutorial - http://www.computerc...dpost__p__28333 and it's reporting z as the height, and x/y as the map coordiantes. So anything in your app that is looking at y as the height coordinate is going to get messed up. For example my y value gets decremented down to 1 and falls into an infinite loop when digging down.

I'm not sure if this is just a function of how the tutorial GPS app sets up the GPS, or if the GPS reporting works that way normally.

Edit: This is a function of how the GPS is set up in that applicaton. The height value is being put into the z coordinate.

Edited by sjkeegs, 20 December 2012 - 06:13 AM.


#90 emtffkev

  • New Members
  • 2 posts

Posted 20 December 2012 - 07:22 AM

Just as an FYI, when running AP, the word Advanced is spelled wrong in the scrolling intro.

#91 Henness

  • Members
  • 189 posts

Posted 20 December 2012 - 09:51 AM

View Postsjkeegs, on 20 December 2012 - 05:58 AM, said:

My problems are related to the GPS coordinates. I used the GPS app posted by BigShinyToys in the GPS tutorial - http://www.computerc...dpost__p__28333 and it's reporting z as the height, and x/y as the map coordiantes. So anything in your app that is looking at y as the height coordinate is going to get messed up. For example my y value gets decremented down to 1 and falls into an infinite loop when digging down.

I'm not sure if this is just a function of how the tutorial GPS app sets up the GPS, or if the GPS reporting works that way normally.

Edit: This is a function of how the GPS is set up in that applicaton. The height value is being put into the z coordinate.

Gps host isn't his program its an default api in computercraft, in his tutorial he uses a stupid cord system different from minecrafts. All you have to do is set the hosts to x,y,z with y being height, the api doesn't care witch is witch. I have no idea why he did that it just confuses people. Also I would suggest spreading out the hosts a little more because with them that close together they have a tendency to get the cords wrong and endup messing up the program.

View Postemtffkev, on 20 December 2012 - 07:22 AM, said:

Just as an FYI, when running AP, the word Advanced is spelled wrong in the scrolling intro.

ROFL, Thanks never would have noticed easy fix though.

#92 vafo

  • Members
  • 10 posts

Posted 20 December 2012 - 10:40 AM

View PostHenness, on 19 December 2012 - 05:55 PM, said:

View Postsjkeegs, on 19 December 2012 - 09:24 AM, said:

View PostHenness, on 18 December 2012 - 06:25 PM, said:

I added my new program Advanced Updater, If you enable HTTP and run that past bin command it will download it all you have to do is run the program. Please post any bugs you find.

This doesn't seem to be working for me.

It updated all the apps from the updater, and when I run the orefinder it will dig forward once, back up to it's starting position, and turn twice so that it was facing the other direction. I specified a 10x10 with 3 ignore blocks (stone, gravel, dirt).

I initially started out with a non-wireless turtle, and upgraded to a wireless mining turtle. As far as I could tell it was doing the same thing without the wireless module and typing in coordinates.

Edit: I realized that I'm running v1.46 on 1.4.2. Is there something in the latest version that this app is using?

Edit2: I didn't notice that the slots where blocks/items go had changed - this started working for me, but it seems to stall after awhile, and the turtle will just stop and go back to the GUI menu - It's deleted the ofsave file, and I wasn't able to detect what caused it to abort yet.

If its deleting the ofsave file then that should mean that it is done but I'll keep an eye out, if you run it with "advancedorefinder <width> <length> <ignore>" and to continue use "advancedorefinder" this will show you if there is an error. and not print the gui over the the error.

View Postsjkeegs, on 19 December 2012 - 11:57 AM, said:

View Postjisco, on 19 December 2012 - 10:27 AM, said:

Can someone explain to me what i should write when it askes for...face? Im trying to start up Advanced ore finder, i write XYZ coordinates but when face show up i have no idea what to write!

if you pull up the F3 screen and look at the facing it will show you north-south-east-west along with a number 0-3 that represents that direction. The code is looking for the number (as far as I can tell).

Yes that's exactly what its asking for, I'll make a tutorial for using it.

View Postvafo, on 19 December 2012 - 01:48 PM, said:

uh.
In the new version, does the gps capability mean we have to build gps towers around?
(If we want to avoid inserting coordinates that is)

Yes if you don't want to have to type the cords in then you have to set up some gps hosts. It's defiantly worth it, the continue feature is super useful.
However, I wont be able to combine a chunkloader and a wireless modem on a turtle, right? =/

#93 Henness

  • Members
  • 189 posts

Posted 20 December 2012 - 02:26 PM

View Postvafo, on 20 December 2012 - 10:40 AM, said:

However, I wont be able to combine a chunkloader and a wireless modem on a turtle, right? =/

Chunk loader, on a turtle?

#94 sjkeegs

  • Members
  • 75 posts

Posted 20 December 2012 - 04:43 PM

View PostHenness, on 20 December 2012 - 09:51 AM, said:

View Postsjkeegs, on 20 December 2012 - 05:58 AM, said:

I'm not sure if this is just a function of how the tutorial GPS app sets up the GPS, or if the GPS reporting works that way normally.

Edit: This is a function of how the GPS is set up in that applicaton. The height value is being put into the z coordinate.

Gps host isn't his program its an default api in computercraft, in his tutorial he uses a stupid cord system different from minecrafts. All you have to do is set the hosts to x,y,z with y being height, the api doesn't care witch is witch. I have no idea why he did that it just confuses people. Also I would suggest spreading out the hosts a little more because with them that close together they have a tendency to get the cords wrong and endup messing up the program.

I figured that was the case - I had gone up there and re-configured the GPS host computers to adjust their coordinates to the F3 values. I seem to be getting correct values from the GPS now. How far apart should they be? I've seen conflicting notes on the setup.

In addition I'm still having issues with the Miner. I still have turtles aborting their mining operation. I've been putting debug statements in and it appears that each time they abort it is in the middle of the ore searching rotation. It doesn't appear to exit cleanly when it aborts as some of the later debug statements don't get printed before it falls back to the GUI.

#95 ThunderZ8olt

  • Members
  • 10 posts

Posted 20 December 2012 - 04:54 PM

I dont get how to download the program through the http api. What exactly do I type into the turtle? I'm still fairly new to them. Thanks for the help and your program looks awesome!

Alright I figured that out, but now I cant get the ore finder to work, it just spins a different direction and doesnt move

#96 sjkeegs

  • Members
  • 75 posts

Posted 20 December 2012 - 05:15 PM

View PostThunderZ8olt, on 20 December 2012 - 04:54 PM, said:

I dont get how to download the program through the http api. What exactly do I type into the turtle? I'm still fairly new to them. Thanks for the help and your program looks awesome!

First you need to make sure the http is enabled. Look for the computercraft.cfg file in the .minecraft\config directory. In that file look for the enableapi_http option and set it to true instead of false.

Once you've done that you should be able to type the pastebin command noted in the first post and it should download the updater. (note you will have to type the text as written since the link takes you to the github page). This is easier than the second option.

If you just want to copy the raw program you can copy the raw data from the github page and transfer it into your turtle. Place down a new turtle. Name it using "label set myname". This makes it easier to find a particular turtle (they don't stack anymore) and it prevents the turtle from losing its fuel and programs when you pick it up. Under your saved world there should be a "computer" directory which contains all the data about the different turtles, computers, and disks. Find the one you just created and copy the program text into a file in that directory.

Once you've done either of the above two steps, you can start up MC and type "list" in the turtle. You should see the file there. Now just run it and it should download/update the GUI, miner and tunnel programs.

#97 ThunderZ8olt

  • Members
  • 10 posts

Posted 20 December 2012 - 09:13 PM

View Postsjkeegs, on 20 December 2012 - 05:15 PM, said:

View PostThunderZ8olt, on 20 December 2012 - 04:54 PM, said:

I dont get how to download the program through the http api. What exactly do I type into the turtle? I'm still fairly new to them. Thanks for the help and your program looks awesome!

First you need to make sure the http is enabled. Look for the computercraft.cfg file in the .minecraft\config directory. In that file look for the enableapi_http option and set it to true instead of false.

Once you've done that you should be able to type the pastebin command noted in the first post and it should download the updater. (note you will have to type the text as written since the link takes you to the github page). This is easier than the second option.

If you just want to copy the raw program you can copy the raw data from the github page and transfer it into your turtle. Place down a new turtle. Name it using "label set myname". This makes it easier to find a particular turtle (they don't stack anymore) and it prevents the turtle from losing its fuel and programs when you pick it up. Under your saved world there should be a "computer" directory which contains all the data about the different turtles, computers, and disks. Find the one you just created and copy the program text into a file in that directory.

Once you've done either of the above two steps, you can start up MC and type "list" in the turtle. You should see the file there. Now just run it and it should download/update the GUI, miner and tunnel programs.

Thanks I was able to get that working but now cant seem to get the ore finder program to work. I typed everything in and my turtle doesnt do anything. It just says "hit spacebar at any time to pause"

#98 Henness

  • Members
  • 189 posts

Posted 20 December 2012 - 11:32 PM

View PostThunderZ8olt, on 20 December 2012 - 09:13 PM, said:

Thanks I was able to get that working but now cant seem to get the ore finder program to work. I typed everything in and my turtle doesnt do anything. It just says "hit spacebar at any time to pause"

Almost sounds like you don't have any fuel in the turtle.

#99 vafo

  • Members
  • 10 posts

Posted 21 December 2012 - 08:28 AM

View PostHenness, on 20 December 2012 - 02:26 PM, said:

View Postvafo, on 20 December 2012 - 10:40 AM, said:

However, I wont be able to combine a chunkloader and a wireless modem on a turtle, right? =/

Chunk loader, on a turtle?
Railcraft :x

#100 dannyp75

  • New Members
  • 2 posts

Posted 21 December 2012 - 10:19 AM

first time post from a cc noob,

can you confirm the mining pattern in advancedorefinder. I have entered the coords with ignore=0 at level 11. I have placed a chest adjacent to the start point and done the following:

item slot 1: 10 coal
2: stack of cobble

i want it to ignore the following, so:

item slot 3: 1 dirt
item slot 4: 1 gravel
item slot 5: 1 cobble

when i have run the command, ti will dig down to bedrock and cover the area prescribed by width and length. i'm guessing it's meant to do that anyway, but it still mines the dirt and gravel and places it my chest. is it supposed to do that, given that i have asked it to ignore it?

please advise.

i'm trying to learn lua, and goign through your code helps, but it's all quite overwhelming, hope i can write something half as good as this one day,





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users