Jump to content




Powered Computer


15 replies to this topic

#1 Tekkitown

  • New Members
  • 11 posts

Posted 28 March 2012 - 11:12 PM

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!

#2 hamish1001

  • New Members
  • 75 posts
  • LocationAustralia

Posted 28 March 2012 - 11:57 PM

That would be cool

#3 cant_delete_account

  • Members
  • 484 posts

Posted 29 March 2012 - 01: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.

#4 hamish1001

  • New Members
  • 75 posts
  • LocationAustralia

Posted 29 March 2012 - 03:06 AM

View Postthesbros, on 29 March 2012 - 01:36 AM, said:

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/>

#5 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 29 March 2012 - 07:37 AM

View Posthamish1001, on 29 March 2012 - 03:06 AM, said:

View Postthesbros, on 29 March 2012 - 01:36 AM, said:

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

#6 Tekkitown

  • New Members
  • 11 posts

Posted 29 March 2012 - 03:19 PM

I got the idea from this video:
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

Posted Image

#7 cant_delete_account

  • Members
  • 484 posts

Posted 29 March 2012 - 03:39 PM

Got it, coding it right now.

#8 cant_delete_account

  • Members
  • 484 posts

Posted 29 March 2012 - 03: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


#9 Tekkitown

  • New Members
  • 11 posts

Posted 29 March 2012 - 04: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

#10 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 29 March 2012 - 05:16 PM

View PostTekkitown, on 29 March 2012 - 04:18 PM, said:

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

#11 Tekkitown

  • New Members
  • 11 posts

Posted 29 March 2012 - 05: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

#12 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 30 March 2012 - 01:21 PM

Writing it atm! Finished Client software createing host now

#13 Tekkitown

  • New Members
  • 11 posts

Posted 30 March 2012 - 02:08 PM

thanks :o/>

#14 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 30 March 2012 - 04: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

#15 djblocksaway

    Epic Coderz

  • New Members
  • 397 posts
  • LocationAustralia

Posted 31 March 2012 - 01:51 PM

Nice work guys :o/>

#16 Wolvan

  • New Members
  • 384 posts
  • LocationIn the TARDIS

Posted 01 April 2012 - 03:24 PM

thx





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users