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

Lua Ctrl+S , Ctrl+R

Started by zanenewberry, 10 June 2012 - 08:59 PM
zanenewberry #1
Posted 10 June 2012 - 10:59 PM
Hello, I'm somewhat a good Lua Programmer, I'm working on an Anti-Raid System, When someone types in the wrong password to open an account and open a secret door alarms are to trigger though redstone, but I ran into a problem, People can CTRL+S the computer and shut it down, I already disabled CTRL+T, also they can use Ctrl+R to reboot, both ways will stop the redstone current which i don't want. Long story short…. How do i disable CTRL+S and CTRL+R

PS- don't worry about the breaking the computer part, theres a wooden pressure plate under the PC, if it breaks, alarms sound :(/>/> (they can't pick it up too)
MysticT #2
Posted 10 June 2012 - 11:09 PM
Simple answer: you can't.
They are coded in the mod, java-side. They can't be disabled without modifying the mod's code (and I don't think it's a good idea to do that).
kazagistar #3
Posted 11 June 2012 - 01:53 AM
Have the computer on and send signal by default. If it is shutdown or restarted, the signal breaks off, triggering the alarm.
Xomsabre #4
Posted 15 June 2012 - 02:09 AM
Hello, I'm somewhat a good Lua Programmer, I'm working on an Anti-Raid System, When someone types in the wrong password to open an account and open a secret door alarms are to trigger though redstone, but I ran into a problem, People can CTRL+S the computer and shut it down, I already disabled CTRL+T, also they can use Ctrl+R to reboot, both ways will stop the redstone current which i don't want. Long story short…. How do i disable CTRL+S and CTRL+R

PS- don't worry about the breaking the computer part, theres a wooden pressure plate under the PC, if it breaks, alarms sound :(/>/> (they can't pick it up too)
1) Is this program named "startup"?
2) are you running rs dust wire, or RP2 bundled cable?
Assuming the answer to 1 is no, change the program's name to startup.
Assuming the answer to 2 is RP2 bundled cable–I can help.
Add in, as a second line to your program code:

"shell.run("redset", "side", "color", "true")"

where "side" = the side of the console the bundled cable connects to
where "color" = the color of the wire in the bundled cable to be powered

if you need more than 1 color, just repeat the shell.run command for multiple colors.

This will make it so that even if a user reboots the console, it will turn the rs outputs on by default