Posted 22 April 2012 - 02:52 AM
Hello CC world,
I'm quite new to CC and the entire coding scene in general.
I've tried to find a program already close to mine, or something similar that I might be able to edit, but I… am a noob…
What I am requesting I believe to be simple, yet difficult for me to figure out, I am requesting a simple program that will activate a redstone current having it password locked, and deactivated using that same password.
What I am fully trying to accomplish is having the program activate redstone, which activates a wireless transmitter, which activates my oil pumping station recievers, I will be doing the same for my Water Pump Station.
So to give a decent breakdown of my request as I understand it….
Password Protected program that activates redstone until I decide I want to shut it off.
If this is possible, can someone help me out?
Thanks in advance.
Edit:
I believe I have accomplished this… somewhat…
Now, what I have done is it will activate it, then when I press ESC, it will close the terminal and keep the redstone current running until I reopen the terminal and type "exit"
Any suggestions or modifications are welcome, As I said i would like to be able to enter the "Activation Code" to be able to turn it on AND off, cause right now anyone can really turn it off… lol
I'm quite new to CC and the entire coding scene in general.
I've tried to find a program already close to mine, or something similar that I might be able to edit, but I… am a noob…
What I am requesting I believe to be simple, yet difficult for me to figure out, I am requesting a simple program that will activate a redstone current having it password locked, and deactivated using that same password.
What I am fully trying to accomplish is having the program activate redstone, which activates a wireless transmitter, which activates my oil pumping station recievers, I will be doing the same for my Water Pump Station.
So to give a decent breakdown of my request as I understand it….
Password Protected program that activates redstone until I decide I want to shut it off.
If this is possible, can someone help me out?
Thanks in advance.
Edit:
I believe I have accomplished this… somewhat…
write ("Oil Pump Station Control")
sleep(3)
local oldPull = os.pullEvent;
os.pullEvent = os.pullEventRaw;
term.clear()
term.setCursorPos(1,)
correctpass = "mypasshere"
write ("Activation Code: ")
pass = read("*")
if pass == (correctpass) then
write ("Pump Activated Press ESC")
redstone.setOutput("back", true )
end
Now, what I have done is it will activate it, then when I press ESC, it will close the terminal and keep the redstone current running until I reopen the terminal and type "exit"
Any suggestions or modifications are welcome, As I said i would like to be able to enter the "Activation Code" to be able to turn it on AND off, cause right now anyone can really turn it off… lol