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

[Answerred] Order succes or order failed message (warehouse)

Started by aadje93, 15 December 2012 - 04:50 AM
aadje93 #1
Posted 15 December 2012 - 05:50 AM
Hello guys :)/>. I am very VERY new to LUA, made a password locked door to learn how to use rs.setBundledOutput == and some basic stuff like a if else etc.

But here's a script i have currently writed for my custom warehouse:


local function clear()
	   term.setCursorPos(1,1)
	   term.clear()
   end
	   clear()
	   print("Welkom bij het magazijn")
	   print("Kies in het menu een nummer")
	   print("1. Ijzerwaren en ingots")
	   print("2. edelstenen en equiv exchange")
	   print("3. voedsel en aanverwanten")
	   print("4. verbruiks en bouwmateriaal")
	   print(" selecteer een optie ")
	   select1 = io.read()  --noteerd het keuze nummer
	
		if select1 == "1" then -- eerste menu scherm
			clear()
			print("Kies in het menu uw item")
			print("1. copper ingot")
			print("2. iron ingot")
			print("3. gold ingot")
			print("4. silver ingot")
			print("5. tin ingot")
			print("6. bronze ingot")
			select2 = io.read() --item keuze ijzerwaren
				if select2 == "1" then  -- als het keuze 1 is top white pulsen voor die retriever etc.
					rs.setBundledOutput("top", colors.white)
					sleep (0.5)
					rs.setBundledOutput("top", 0)			
				elseif select2 == "2" then
					rs.setBundledOutput("top", colors.orange)
					sleep (0.5)
					rs.setBundledOutput("top", 0)				
				elseif select2 == "3" then
					rs.setBundledOutput("top", colors.magneta)
					sleep (0.5)
					rs.setBundledOutput("top", 0)				
				elseif select2 == "4" then
					rs.setBundledOutput("top", colors.lightBlue)
					sleep (0.5)
					rs.setBundledOutput("top", 0)				  
				elseif select2 == "5" then
					rs.setBundledOutput("top", colors.yellow)
					sleep (0.5)
					rs.setBundledOutput("top", 0)
				elseif select2 == "6" then
					rs.setBundledOutput("top", colors.lime)
					sleep (0.5)
					rs.setBundledOutput("top", 0)
				else print("sorry keuze bestaat niet")
	  sleep (1)
				end
	  
		elseif select1 == "2" then   -- menu 2 openen van het 1e keuzemenu
			clear()	  
			print("maak uw keuze:")
			print("1. diamond")
			print("2. ruby")
			print("3. sapphire")
			print("4. emerald")
			print("5. covelance groen")
			print("6. covelance licht blauw")
			print("7. covelance blauw")
			print("8. dark matter")
			print("9. red matter")
			print("10. blaze rod")
			print("11. glowstone dust")
			select3 = io.read() --item keuze voor menu equiv exchange etc.
				if select3 == "1" then		  
					rs.setBundledOutput("top", colors.pink)
					sleep (0.5)
					rs.setBundledOutput("top", 0)				  
				elseif select3 == "2" then
					rs.setBundledOutput("right", colors.pink)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select3 == "3" then
					rs.setBundledOutput("right", colors.lime)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select3 == "4" then
					rs.setBundledOutput("right", colors.yellow)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select3 == "5" then
					rs.setBundledOutput("left", colors.cyan)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select3 == "6" then
					rs.setBundledOutput("bottom", colors.white)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				elseif select3 == "7" then
					rs.setBundledOutput("bottom", colors.orange)
					sleep (0.5)
					rs.setBundledOutout("bottom", 0)
				elseif select3 == "8" then
					rs.setBundledOutput("top", colors.lightGray)
					sleep (0.5)
					rs.setBundledOutput("top", 0)
				elseif select3 == "9" then
					rs.setBundledOutput("top", colors.gray)
					sleep (0.5)
					rs.setBundledOutput("top", 0)
				elseif select3 == "10" then
					rs.setBundledOutput("bottom", colors.cyan)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				elseif select3 == "11" then
					rs.setBundledOutput("top", colors.gray)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				else
					print("sorry keuze bestaat niet")
	  sleep (1)
				end
		elseif select1 == "3" then
			clear()
			print("Maak uw keuze")
			print("1. wheat")
			print("2. milk")
			print("3. bread")
			print("4. seeds")
			print("5. melon")
			print("6. melon seeds")
			print("7. pumpkin")
			print("8. apple")
			print("9. steak")
			print("10. cooked chicken")
			select4 = io.read()
				if select4 == "1" then
					rs.setBundledOutput("right", colors.lightGray)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select4 == "2" then
					rs.setBundledOutput("right", colors.cyan)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select4 == "3" then
					rs.setBundledOutput("left", colors.white)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select4 == "4" then
					rs.setBundledOutput("left", colors.lime)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select4 == "5" then
					rs.setBundledOutput("left", colors.pink)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select4 == "6" then
					rs.setBundledOutput("left", colors.gray)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select4 == "7" then
					rs.setBundledOutput("bottom", colors.yellow)
					sleep (0.5)
					rs.setBundledOutput("bototm", 0)
				elseif select4 == "8" then
					rs.setBundledOutput("bottom", colors.lightGray)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				elseif select4 == "9" then
					rs.setBundledOutput("bottom", colors.gray)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				elseif select4 == "10" then
					rs.setBundledOutput("bottom", colors.pink)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				else print("sorry keuze bestaat niet")
	  sleep (1) end				-- error message when number higher then 10 is choosen
	  
		elseif select1 == "4" then
			clear()
			print("Maak uw keuze")
			print("1. Wood plank")
			print("2. rubber sappling")
			print("3. sticky resin")
			print("4. glass")
			print("5. soul sand")
			print("6. marble")
			print("7. marble bricks")
			print("8. steen bricks")
			print("9. redstone dust")
			print("10. coal")
			print("11. charcoal")
			print("12. bone meal")
			print("13. whool")
			select5 = io.read()
				if select5 == "1" then
					rs.setBundledOutput("right", colors.white)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select5 == "2" then
					rs.setBundledOutput("right", colors.orange)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select5 == "3" then
					rs.setBundledOutput("right", colors.magneta)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select5 == "4" then
					rs.setBundledOutput("right", colors.lightBlue)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select5 == "5" then
					rs.setBundledOutput("right", colors.gray)
					sleep (0.5)
					rs.setBundledOutput("right", 0)
				elseif select5 == "6" then
					rs.setBundledOutput("left", colors.lightBlue)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select5 == "7" then
					rs.setBundledOutput("left", colors.magneta)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select5 == "8" then
					rs.setBundledOutput("left", colors.yellow)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select5 == "9" then
					rs.setBundledOutput("left", colors.lightGray)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				elseif select5 == "10" then
					rs.setBundledOutput("bottom", colors.magneta)
					sleep (0.5)
					rs.setBundledOut("bottom", 0)
				elseif select5 == "11" then
					rs.setBundledOutput("bottom", colors.lightBlue)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				elseif select5 == "12" then
					rs.setBundledOutput("bottom", colors.lime)
					sleep (0.5)
					rs.setBundledOutput("bottom", 0)
				elseif select5 == "13" then
					rs.setBundledOutput("left", colors.orange)
					sleep (0.5)
					rs.setBundledOutput("left", 0)
				else print("sorry keuze bestaat niet")
	  sleep (1) end
		else print("sorry keuze bestaat niet")
	  sleep (1)
		sleep (2)
	end
shell.run("reboot")

as you can see, its very big LOL. but my questions:

I want to make a message wich will be called if the order is a succes (like not the last else everywhere). So on the end of the code. But when i place it all the way down, it will trigger when i have a failed order or succes order. I dont realy know how to make a succes or failed message.

Secondly. How do i make a quit/back option in my script? (the print("…")'s are the menu's as you would see) but i want to add an option to go back to previous menu.

Lastly, if its not to hard i want to make a user defined amount :)/> (i use pulsing with retrievers as you can see in the code) Sorry i don't comment alot, end most comments are dutch because thats my langauge. I'm totally new to coding, was very happy the whole code worked without bugs *from cc bios* when i made the script, no errors :D/>. after the user defined amount is added i will be testing it.

I have seen:


times = read()
for i = 1, tonumber(times) do
  -- do stuff
end

but that will be 40x making that code + a print message where it says "hoeveel wilt u bestellen"

And lastly, if i am not realy that hard, is it possible that you mension the item you are going to order :)/>. So not "amount: " but amount of: …"

Finaly, is it possible to let computercraft store multiple items/amounts and execute them all in 1 time so the computer is realy orderpicking, or is that easyier with turtles? (like the look without turtles to be honest)

Thanks in advance, i am still learning :)/>
theoriginalbit #2
Posted 15 December 2012 - 06:02 AM
I have seen:

times = read()
for i = 1, tonumber(times) do
  -- do stuff
end

haha I know where you got that from ;)/>

ok so where to start… give me a bit and I'll write up a program for you (note it may be slightly different, I'm on a time constraint, its VERY late here) :)/>
aadje93 #3
Posted 15 December 2012 - 07:26 AM
Thanks TheOriginalBIT

I am realy new to coding :P/> But hope my code isn't that bad :)/>. *and could you keep the menu style the same as that is redpower wires to retrievers in the warehouse*

also replaced shell.run("reboot") with os.reboot() wich doesn't display "goodbeye" but just restarts the code
theoriginalbit #4
Posted 15 December 2012 - 07:27 AM
here you go. here is a working program. I hope that you like it, its different to yours though. It allows for easy expansion. Also I'm sorry if the translations are bad. I used Google translate, and it can be HORRIBLE!

http://pastebin.com/1NPj4MDY

if you don't understand anything just ask :)/>
theoriginalbit #5
Posted 15 December 2012 - 07:28 AM
Thanks TheOriginalBIT

I am realy new to coding :P/> But hope my code isn't that bad :)/>. *and could you keep the menu style the same as that is redpower wires to retrievers in the warehouse*

also replaced shell.run("reboot") with os.reboot() wich doesn't display "goodbeye" but just restarts the code


your code was not bad for a beginner :)/>
aadje93 #6
Posted 15 December 2012 - 07:02 PM
here you go. here is a working program. I hope that you like it, its different to yours though. It allows for easy expansion. Also I'm sorry if the translations are bad. I used Google translate, and it can be HORRIBLE!

http://pastebin.com/1NPj4MDY

if you don't understand anything just ask :)/>

Thanks man :)/>.

Its realy just the first code i have written without using tutorials or google, just thinking and examining problems for the menu etc :)/>.

i know google translate is horrible. Should have made some english comments in it. But care to explain how your code works? It looks like alot of variables in the beginning?


But its sick code man :D/>. Just what i wanted :D/>. (also made a visual system with item detectors and redpower lamps, red lamp goes on @ end of code so when order is being sent to the warehouse, orange lamps go on when item is sent upwards to the user. Yellow when its arived up top in the order centrum, and final a green light under the chest wich will then stay on for 30 secs, after that it sends a pulse to all the RS latches used by other lights so the whole thing goes off in a fraction of second :)/>.



Is it also possible to make some kind of order list? Like the code you have now, but then selecting items + amount. and then the computer makes a screen of the order list, and executes all the orders when aggreed with the order, i couldn't think of that..

Thought of multiple menu funtions, but i don't know how to make it.


Realy thanks for rewriting my code. Looks alot more proffesional now :D/>
theoriginalbit #7
Posted 15 December 2012 - 07:28 PM
Thanks man :)/>.

No problems :)/>

i know google translate is horrible. Should have made some english comments in it. But care to explain how your code works? It looks like alot of variables in the beginning?

I was just sticking with the theme :P/> Look at spoiler at the bottom. Ill attempt to explain as much as possible :)/>

But its sick code man :D/>. Just what i wanted :D/>. (also made a visual system with item detectors and redpower lamps, red lamp goes on @ end of code so when order is being sent to the warehouse, orange lamps go on when item is sent upwards to the user. Yellow when its arived up top in the order centrum, and final a green light under the chest wich will then stay on for 30 secs, after that it sends a pulse to all the RS latches used by other lights so the whole thing goes off in a fraction of second :)/>.

thanx :)/> … thats good :)/> … good job :)/>

Is it also possible to make some kind of order list? Like the code you have now, but then selecting items + amount. and then the computer makes a screen of the order list, and executes all the orders when aggreed with the order, i couldn't think of that..

ummm yeh maybe, just give me a second and I'll see if i can quickly whip it together :)/>

Realy thanks for rewriting my code. Looks alot more proffesional now :D/>

Hey its what I do :)/> and than for saying it looks professional :)/> shows that my studying a Bachelor of Professional Software Development is really paying off :)/>


SPOILER:
On second thought when I go through and make that change for an order list i shall comment as much of the code as possible
theoriginalbit #8
Posted 15 December 2012 - 08:12 PM
Ok I have updated the pastebin link, you can now do single or multiple requests. Also there is about 100 lines of commenting now, hopefully it explains it enough.

Here's the link again:
http://pastebin.com/1NPj4MDY

I hope you like :)/>

Once again any questions just ask :)/>
aadje93 #9
Posted 15 December 2012 - 11:56 PM
Ok I have updated the pastebin link, you can now do single or multiple requests. Also there is about 100 lines of commenting now, hopefully it explains it enough.

Here's the link again:
http://pastebin.com/1NPj4MDY

I hope you like :)/>

Once again any questions just ask :)/>

its getting more epic with the minute :D/>.

I editted your old code a small amount (added some clear's before every message). But could you explain how split works? ( i want to learn what the code is acutally doing so i can use it in other programs)

And there are minor spelling mistakes ("bottomw" @ covelance licht blauw) But thanks alot man :o/>. I couldn't have made this code :o/>

Now if the code works like i want, i am probarly going to use it to make a very big warehouse with a multi computer setup. Very nice with the table, was thinking about implementing that to because the commands just do a lookup on the tables and then print what they find. So i can add items very easy and just make another storage level with a computer wich has another X amount of items (probarly going to use 4 cables on each computer like now, but make more levels of storage with energy condensers. Ill try to make a video when the current system is working like i want :)/> )

Thanks alot for helping me with the code's. You have realy put some time in it.

for you!!

Realy thanks alot. And nice commenting on all the parts, realy helps me understand what is going on :D/>
theoriginalbit #10
Posted 16 December 2012 - 12:28 AM
I editted your old code a small amount (added some clear's before every message). But could you explain how split works? ( i want to learn what the code is acutally doing so i can use it in other programs)

Ok so split. well. let me open the code, its been a while since I wrote it, gotta remember :P/> just copy pasted today :P/>

…………………

Ok so. read this to know
SpoilerSplit takes in 2 parameters, the string and the pattern to which you want to split the string at. Now this pattern can be a char or a string, doesn't matter as long as its not nil.
line 1: t = { } this obviously declares and empty table, this is our return table
line 2: fpat = "(.-)"..pat as defined here http://lua-users.org...atternsTutorial the - looks for 0 or move repetitions of the pattern, unlike * it looks for the shortest sequence, we then append our sequence to the end to say what we are looking for
line 3: last_end = 1 this is the end of the string in between the pattern, obviously since we are starting we make it 1
line 4: s, e, cap = str:find(fpat, 1) now s is the start of the word in between the pattern, e is the end, the cap is the word, 1 in the str:find tells it to start at the start
line 5: while s do this runs as long as s is not nil
line 6: if s ~= 1 or cap ~= "" then this makes sure that we ignore the first word if the pattern is at the start of the string, it also makes sure to ignore if the pattern appears twice in a row
line 7: table.insert(t, cap) insert the word into the table for later
line 8: end not gunna explain this :P/>
line 9: last_end = e + 1 this remembers where the pattern ended last time, the + 1 is so we start after the pattern
line 10: s, e, cap = str:find(fpat, last_end) this does the same as before the while loop except it starts where we left off last time
line 11: end gunna let u figure out yourself :P/>
line 12: if last_end > #str then this is so we dont try to go out of bounds of the string and get an error
line 13: cap = str:sub(last_end) this gets us the last part of the string from the last pattern, str:sub will return from last_end to the strings end, if the string ends with the pattern this will be empty
line 14: table.insert(t, cap) put that word in the table
line 15: end again, man this one is common :P/>
line 16: return t returns all the chars that were in the string between the pattern
line 17: end finished

And there are minor spelling mistakes ("bottomw" @ covelance licht blauw) But thanks alot man :o/>. I couldn't have made this code :o/>

Yeh I was doing that bit at 2:30 AM this morning. you had a few copy paste errors where cables wouldn't have turned off till the next run and stuff too, but obviously the way that code works now its fine.

Now if the code works like i want, i am probarly going to use it to make a very big warehouse with a multi computer setup. Very nice with the table, was thinking about implementing that to because the commands just do a lookup on the tables and then print what they find. So i can add items very easy and just make another storage level with a computer wich has another X amount of items (probarly going to use 4 cables on each computer like now, but make more levels of storage with energy condensers. Ill try to make a video when the current system is working like i want :)/> )

Very cool, cant wait to see. Is this on a server? Also think about this for an idea, load the table from a file on startup each time, and add a command like "add mapping" where it goes to a mode where you add a new item to the dictionary and then save it to file for next time it has to reload :)/>

Thanks alot for helping me with the code's. You have realy put some time in it.

for you!!

Realy thanks alot. And nice commenting on all the parts, realy helps me understand what is going on :D/>

No problems, its the most I've written for someone else, and I must say, the coolest thing I've written to date (just wait a few weeks, might be releasing something epic). Only about 1.5 hours work, longest was typing out that table with your data! I hope the comments were enough, minus the split of course :)/>
aadje93 #11
Posted 16 December 2012 - 02:01 AM
I editted your old code a small amount (added some clear's before every message). But could you explain how split works? ( i want to learn what the code is acutally doing so i can use it in other programs)

Ok so split. well. let me open the code, its been a while since I wrote it, gotta remember :P/> just copy pasted today :P/>

…………………

Ok so. read this to know
SpoilerSplit takes in 2 parameters, the string and the pattern to which you want to split the string at. Now this pattern can be a char or a string, doesn't matter as long as its not nil.
line 1: t = { } this obviously declares and empty table, this is our return table
line 2: fpat = "(.-)"..pat as defined here http://lua-users.org...atternsTutorial the - looks for 0 or move repetitions of the pattern, unlike * it looks for the shortest sequence, we then append our sequence to the end to say what we are looking for
line 3: last_end = 1 this is the end of the string in between the pattern, obviously since we are starting we make it 1
line 4: s, e, cap = str:find(fpat, 1) now s is the start of the word in between the pattern, e is the end, the cap is the word, 1 in the str:find tells it to start at the start
line 5: while s do this runs as long as s is not nil
line 6: if s ~= 1 or cap ~= "" then this makes sure that we ignore the first word if the pattern is at the start of the string, it also makes sure to ignore if the pattern appears twice in a row
line 7: table.insert(t, cap) insert the word into the table for later
line 8: end not gunna explain this :P/>
line 9: last_end = e + 1 this remembers where the pattern ended last time, the + 1 is so we start after the pattern
line 10: s, e, cap = str:find(fpat, last_end) this does the same as before the while loop except it starts where we left off last time
line 11: end gunna let u figure out yourself :P/>
line 12: if last_end > #str then this is so we dont try to go out of bounds of the string and get an error
line 13: cap = str:sub(last_end) this gets us the last part of the string from the last pattern, str:sub will return from last_end to the strings end, if the string ends with the pattern this will be empty
line 14: table.insert(t, cap) put that word in the table
line 15: end again, man this one is common :P/>
line 16: return t returns all the chars that were in the string between the pattern
line 17: end finished

And there are minor spelling mistakes ("bottomw" @ covelance licht blauw) But thanks alot man :o/>. I couldn't have made this code :o/>

Yeh I was doing that bit at 2:30 AM this morning. you had a few copy paste errors where cables wouldn't have turned off till the next run and stuff too, but obviously the way that code works now its fine.

Now if the code works like i want, i am probarly going to use it to make a very big warehouse with a multi computer setup. Very nice with the table, was thinking about implementing that to because the commands just do a lookup on the tables and then print what they find. So i can add items very easy and just make another storage level with a computer wich has another X amount of items (probarly going to use 4 cables on each computer like now, but make more levels of storage with energy condensers. Ill try to make a video when the current system is working like i want :)/> )

Very cool, cant wait to see. Is this on a server? Also think about this for an idea, load the table from a file on startup each time, and add a command like "add mapping" where it goes to a mode where you add a new item to the dictionary and then save it to file for next time it has to reload :)/>

Thanks alot for helping me with the code's. You have realy put some time in it.

for you!!

Realy thanks alot. And nice commenting on all the parts, realy helps me understand what is going on :D/>

No problems, its the most I've written for someone else, and I must say, the coolest thing I've written to date (just wait a few weeks, might be releasing something epic). Only about 1.5 hours work, longest was typing out that table with your data! I hope the comments were enough, minus the split of course :)/>


The program is used on a "whitelisted" server wich i play with some of my close friends, but i am thinking about making it open to everyone. But need stuff like towny etc, and block alot of items like nuclear related, equiv mostly because its OP in smp etc.


But if you want to look at where the computer program is used pm me your minecraft username and ill whitelist you and give the details and show you the warehouse :D/>

It was mostly a learning fase for me, i want to build a big "amazon.mc" So a big warehous with multiple levels where every level gets a computer that does order picking :)/>.

edit, and off course the "by tTheOriginalBIT" stays!! you made the code not me, i only made some translation changes, but english looks also cool. (only made 1 change, send an redstone pulse @ top black to start my proccesing lamps, you'l see @ server)
theoriginalbit #12
Posted 16 December 2012 - 02:06 AM
I was thinking the "add mapping" may be handy for you to just quickly add a new item in game :)/>
aadje93 #13
Posted 16 December 2012 - 02:29 AM
I was thinking the "add mapping" may be handy for you to just quickly add a new item in game :)/>

I was thinking about it, but i can also just edit the script directly ;)/>. I have the server running on my own pc, so i can just edit files that way with notepad++

And some pictures:

the order picking room: (energy condensers are used for production, the warehouse wil use a sorting system, and i will try to make a script that counts incoming and outgoing items and stores that in a log/file as new learning for logging and making files



first item detector for the orange lights up top. The receiver is a state cell connected to the green lamp, the last detector will make a state cell hold the green lamp for 10-20secs, and after that it will emit a short pulse to a wireless transmitter. Every lamp section has an RS latch witch will then switch off by receiving the wireless singal.


lastly the order procces lamps:

Red goes on when the order picking starts (*by the computer thanks to your script! TheOriginalBIT!!)
orange goes on when the items are sent to sea level (the item detector you see in picture)
yellow goes on when they arive up top *final check* :P/>
and green goes on when they arrive in the chest. Still thinking about a system that will turn on green when last item has passed… but dont know how because using item detector+state cell (state cell resets when it gets pulse) will make it very long until green light goes on. Now it goes on when first item arrives, but @ very large orders it will stay on very long and you can collect items before the last one arrived.

If i can fix the green light on when last item arrived, ill also make a system that will "unlock" the chest (piston wich will pull away a block in front of chest) so you can come to collect your order.

Thanks again for your script, it works like a charm (only some errors when you mis spell an item, but thats always a problem, a menu could fix that *by using only numbers* (A))
theoriginalbit #14
Posted 16 December 2012 - 02:38 AM
Firstly I sent you a PM :)/>

Secondly:
Spoiler
I was thinking about it, but i can also just edit the script directly ;)/>. I have the server running on my own pc, so i can just edit files that way with notepad++

That works too, but gotta admit, adding on the terminal is cooler :P/>

I will try to make a script that counts incoming and outgoing items and stores that in a log/file as new learning for logging and making files

Any issues just PM me :)/>

Red goes on when the order picking starts (*by the computer thanks to your script! TheOriginalBIT!!)

:D/> no probs ;)/>

and green goes on when they arrive in the chest. Still thinking about a system that will turn on green when last item has passed… but dont know how because using item detector+state cell (state cell resets when it gets pulse) will make it very long until green light goes on. Now it goes on when first item arrives, but @ very large orders it will stay on very long and you can collect items before the last one arrived.


If i can fix the green light on when last item arrived, ill also make a system that will "unlock" the chest (piston wich will pull away a block in front of chest) so you can come to collect your order.

that could be easy. I guess that is one disadvantage about my program is no direct input from the system back, it doesnt know if the 4 it requested actually came or if only 3 did.

Thanks again for your script, it works like a charm (only some errors when you mis spell an item, but thats always a problem, a menu could fix that *by using only numbers* (A))

no probs, again, 2:30AM when I typed it out, I think I did good to only get typos and not errors :P/>
yes numbers could be easier, but this way allows the order list system and also allows more items than is possible to display in one menu, would need a massive multi menu system.

I already have a few ideas of fixes and new features for you ;)/> if you wish. PM me :P/>