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

Powered Computer

Started by Tekkitown, 28 March 2012 - 10:12 PM
Tekkitown #1
Posted 29 March 2012 - 12:12 AM
Hi,

I have made 1 board computer witch can control the computers
for example if redstone output of the boardcomputer is true than can the other computers startup

but if the restone of the boardcomputer is false then they dont start

can some one help me how to program/make this

( sorry for bad english )

Tekkitown!
hamish1001 #2
Posted 29 March 2012 - 12:57 AM
That would be cool
cant_delete_account #3
Posted 29 March 2012 - 02:36 AM
I would do in a file called 'startup' on each computer, put this code:

while true do
local side = "back"
if rs.getInput(side) then
 os.shutdown()
else if not rs.getInput(side) then
 break
end
end
Then, if the computer got a redstone input from the back, it would not turn on, if it doesn't, it will turn on.
hamish1001 #4
Posted 29 March 2012 - 04:06 AM
I would do in a file called 'startup' on each computer, put this code:

while true do
local side = "back"
if rs.getInput(side) then
os.shutdown()
else if not rs.getInput(side) then
break
end
end
Then, if the computer got a redstone input from the back, it would not turn on, if it doesn't, it will turn on.
what he said :o/>/>
Wolvan #5
Posted 29 March 2012 - 08:37 AM
I would do in a file called 'startup' on each computer, put this code:

while true do
local side = "back"
if rs.getInput(side) then
os.shutdown()
else if not rs.getInput(side) then
break
end
end
Then, if the computer got a redstone input from the back, it would not turn on, if it doesn't, it will turn on.
what he said :o/>/>
You don't have to repost his and say what he said just to increase your post counter -.-

@Tekkitown
Do you just want to unlock the PCs or really START them? Because starting via redstone isn't possible atm. Only checking if a redstone input is there
I could even program a rednet based unlock check
Tekkitown #6
Posted 29 March 2012 - 04:19 PM
I got the idea from this video: http://www.youtube.com/watch?v=qFfWYbnd9A4&feature=related
at 1:00

he have to power his computer with a lever before he can start his pc

I have a Chest chamber in my multiplayer server and i want 1 mother computer that must be activated by password before the other computers ( for opening chests ) can boot

cant_delete_account #7
Posted 29 March 2012 - 04:39 PM
Got it, coding it right now.
cant_delete_account #8
Posted 29 March 2012 - 04:46 PM
On mother computer in a file called 'startup' (you might wanna change your password):

while true do
sleep(0.1)
pass = "passwordhere" -- Password.
side = "back" -- Side of output for other computers.
print("Mother Computer Security System")
write("Password: ")
input1 = read()
if input1 == (pass) then
print("Password correct!")
rs.setOutput(side, true)
break
else
print("Password incorrect!")
sleep(2)
os.reboot()
end
On all other computers in a file called 'startup' (change the side to the side of where redstone input is gonna go in):

while true do
sleep(0.1)
side = "back" -- Side.
if redstone.getInput(side) then
break
else if not redstone.getInput(side) then
os.shutdown()
end
end
Tekkitown #9
Posted 29 March 2012 - 05:18 PM
when i use this script ? can i create also a menu in the mother computer so if i press 1 then i come in a window where i have to fill in my password for activating the computers
and if i press 2 then i can turn the lights on in the chamber ?

and that script for the other computers do have a password to ?

thanks
Wolvan #10
Posted 29 March 2012 - 06:16 PM
when i use this script ? can i create also a menu in the mother computer so if i press 1 then i come in a window where i have to fill in my password for activating the computers
and if i press 2 then i can turn the lights on in the chamber ?

and that script for the other computers do have a password to ?

thanks
I think it didn't start because it checked IS REDSTONE SIGNAL THERE? NO? os.shutdown() /YES? LOGIN
And you want on your other computer that you have to menu entries? OK I write it for you
Tekkitown #11
Posted 29 March 2012 - 06:55 PM
I want on the mother computer a menu entries

[ 1 ] Chest Safety Control.
[ 2 ] Light Control

for menu 1 I can write my password to unlock the chest computers
and for 2 I can put the lights on in the room ( redstone lamps from technic pack)

also i want a password on the chest computers

BTW: script from other computers dont work

error: bios:206: [string "startup"):16: 'end' expected
(to close 'while' at line 1)

but it ended with

end
end
Wolvan #12
Posted 30 March 2012 - 02:21 PM
Writing it atm! Finished Client software createing host now
Tekkitown #13
Posted 30 March 2012 - 03:08 PM
thanks :o/>/>
Wolvan #14
Posted 30 March 2012 - 05:49 PM
OK Done!
I will paste it on my thread again but here it is:
Client - Pastebin.com
Controller - Pastebin.com
Even with integrated first time config! Just start both programs once
djblocksaway #15
Posted 31 March 2012 - 02:51 PM
Nice work guys :o/>/>
Wolvan #16
Posted 01 April 2012 - 04:24 PM
thx