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

[Lua] a Sorting machine.

Started by HelloThere, 09 August 2012 - 02:19 PM
HelloThere #1
Posted 09 August 2012 - 04:19 PM
I want to make a bank that takes in gold and gold blocks, and counts the amount a person has in storage. it will be broadcasted over rednet and everyone can make an account and the amount of money they have in store will be saved and they can add more or less items to their balance. but in order for any of that i need to find somewhere to start. so. can anyone help with finding how to sort Gold ingots from Gold blocks and other missalnious items to be sorted elswhere?

I need somewhere to start so im going to start with this. and its probably one of the things in here i don't know how to start.
Cranium #2
Posted 09 August 2012 - 04:40 PM
You can use Sorting Machines and Item Detectors available in the RedPower Mod.
HelloThere #3
Posted 09 August 2012 - 04:58 PM
rght. I forgot about that.. Thanks.
HelloThere #4
Posted 09 August 2012 - 05:01 PM
But i need the computer to detect whats coming through and count it in that persons file.
Cranium #5
Posted 09 August 2012 - 05:04 PM
A little harder, but you could use the sorter to sort(of course), and then use the item detector to send a signal to the computer. Using bundled cables, you could have up to 16 items being sorted. When it receives the signal, it just counts that item.
HelloThere #6
Posted 09 August 2012 - 05:33 PM
Thanks
OmegaVest #7
Posted 09 August 2012 - 05:51 PM
Actually, with a little thinking, with one bundled cable, you can have over two thousand items pass through. Just hook multiple colored wires to each item detector. At the least, you can have a four-bit system. Then, in your program, use the numerical value for that color of wires. This does, however, require that you have it send only one object through at a time, to reduce overflow.
Cranium #8
Posted 09 August 2012 - 06:34 PM
Actually, with a little thinking, with one bundled cable, you can have over two thousand items pass through. Just hook multiple colored wires to each item detector. At the least, you can have a four-bit system. Then, in your program, use the numerical value for that color of wires. This does, however, require that you have it send only one object through at a time, to reduce overflow.
Why in God's name would you need over two thousand DIFFERENT items????
OmegaVest #9
Posted 09 August 2012 - 07:15 PM
Uhhhmmm. Same reason there's a 4096x fix in Forge, I guess. That said, with a single four-bit, I think the best you can do is something like 16 items. So, at the best, with four lines per object, the total comes to. . . Oh. Wow. Much larger. So, yeah. Again, the real reason to use it this way is so you can have one computer running your entire stocking system, instead of on computer per chest.


Also, I have a very hard time making a stock system with any other method other than brute force. It works. . . most days.
Marval #10
Posted 10 August 2012 - 10:48 AM
Can't You use CC Sensors to monitoring storage?
HelloThere #11
Posted 10 August 2012 - 12:10 PM
Me and a friend were thinking about this on our server and we came up with a simpler solution. The computer would start up and you would enter a password then it would give the option to deposite or withdraw. when you deposit it will give you the option for Tools, Food, Ingots & Ores, Misc. on select of one of those options it would open a hole in the floor with an obsidian transport pipe to take it to it's designated chest (one for each category) and on withdraw it would simply pump all of the items out of that chest and on to you. so you could take what you wanted and deposit the remaining items. not much of a sorting machine because someone has to sort it themselves, but we defeated our sole purpose of making a bank.