27 posts
Posted 20 July 2012 - 10:05 PM
Back Story:On a server i play on (private one) we are planning on building a city that has a big warehouse.
In this warehouse we want to have a computer for cataloging and a program that you can search for where an item is?
I need help actually coding both any ideas?
i know that it will you if then (i think)
im somewhat new to lua so im learning slowly
Edit:added to post
Edited on 20 July 2012 - 08:34 PM
28 posts
Posted 20 July 2012 - 10:06 PM
I can't open the spoiler for some reason:/
27 posts
Posted 20 July 2012 - 10:18 PM
i removed spoiler
7 posts
Posted 20 July 2012 - 10:54 PM
I am no professional in lua, but I have moderate experience in other programming languages, such as Python.
Try making a few arrays. In the first array, have the items you have in the warehouse. In the second array, have their location. Arrays are numbered, so if "Apple" is in position 6, in the other array you should make the location of the apples in position 6 also. You can also add some raw input so you can add new items to configuration files.
Ill work on the code in the next day, I want to try this out also.
27 posts
Posted 20 July 2012 - 11:09 PM
I am no professional in lua, but I have moderate experience in other programming languages, such as Python.
Try making a few arrays. In the first array, have the items you have in the warehouse. In the second array, have their location. Arrays are numbered, so if "Apple" is in position 6, in the other array you should make the location of the apples in position 6 also. You can also add some raw input so you can add new items to configuration files.
Ill work on the code in the next day, I want to try this out also.
Thanks we also thought about having a robot actualy GET the items for you
but non of us have the patiance to build and program it lol
7 posts
Posted 20 July 2012 - 11:20 PM
Well, what about installing RedPower on your server? They have some really awesome additions to redstone wireing. people have built amazing things with it. You could make a program so it automaticaly suck any items you want from the chest. This would be a seperate program, or it could be implemented.
27 posts
Posted 20 July 2012 - 11:44 PM
Well, what about installing RedPower on your server? They have some really awesome additions to redstone wireing. people have built amazing things with it. You could make a program so it automaticaly suck any items you want from the chest. This would be a seperate program, or it could be implemented.
the server is a tekkit server so it has it
and we DO have redworks on some of the terminals btw
49 posts
Posted 21 July 2012 - 10:28 AM
It that case use retrievers. Just connect all your chests vie pneumatic tubes and slap a retriever on it. Upon receiving a redstone pulse it will the item(s) you stored inside it out of the nearest chest.
So, my first idea would be to slap as many receivers to you tube network as you have items you to suck out of it. Then connect the recievers via bundled cables to your computer and have the computer supply the redstone pulse to one of the receivers.
But since I am not that familiar with redpower, there are probably more sophisticated aproaches to this.
56 posts
Posted 21 July 2012 - 05:37 PM
do you have redpower/buildcraft or other logical systems?
i would help you if you IM me ( or better when you let me in ) if you want
27 posts
Posted 27 July 2012 - 04:27 PM
i ment like google but for the warehouse lol i know i would have to use read() and if then statements but how do it do it?
1243 posts
Location
Indiana, United States
Posted 28 July 2012 - 12:57 PM
For a basic system that will read the input and then do what you want:
local read = read()
print("Welcome to King Warehouse.")
if read == "BLAH" then -- Replace BLAH.
-- Put what you want in here.
elseif read == "BLAH2" then
-- Same as above. Repeat these two lines with different BLAH variables until you're satisfied.
end