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

disk stoper?

Started by rex41043, 18 April 2012 - 07:41 AM
rex41043 #1
Posted 18 April 2012 - 09:41 AM
is there a way to code some thing that stops startup disks form working?
Advert #2
Posted 18 April 2012 - 09:54 AM
Yes, see: http://www.computercraft.info/forums2/index.php?/topic/103-stop-disk-booting/
rex41043 #3
Posted 21 April 2012 - 12:26 PM
but can we do it with in a normal program
libraryaddict #4
Posted 21 April 2012 - 02:37 PM

In their wisdom and infinite knowledge. They made their choice.

Nope.
Robd #5
Posted 24 April 2012 - 03:06 AM

I know that os.pullEventRaw() will stop termination, idk about ctrl+s shutdown… if it stops that too you could pull a constant loop something like this


while(true) do
	event,param1,param2 = os.pullEventRaw()
	os.startTimer(0.5)
	shell.run("eject","left")
	shell.run("eject","right")
	shell.run("eject","front")
	shell.run("eject","back")
	shell.run("eject","top")
	shell.run("eject","bottom")
end 

You could add your own code within there but read() and shell.run() could be dangerous as they would bypass the pulleventraw which would disallow shutting down. This really doesn't make booting go away but it keeps it so that someone couldn't alter your system with a disk

*EDIT* Ctrl + S does in fact work through raw events, unfortunatly that means my above code won't work. Since I feel bad, I will try to make one more suggestion. You could attempt to make some kind of mechanism that would detect any blocks being placed near the system and set them to some kind of booby trap. However, that really has nothing to do with LUA coding