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

CCTouchID - For use with MoarPerihperals' Player Detector

Started by Sillyjake, 12 January 2015 - 08:53 PM
Sillyjake #1
Posted 12 January 2015 - 09:53 PM
Keep your base secure! Forget the nasty password locks of the past, I present to you CCTouchID, This will not work umless if there is a player detector from moar peripherals attached to the computer.

Pastebin: MKimTifx

Code:

    local auth = { "sillyjake", "Notch" }
	
    while true do
	  e, s, p = os.pullEvent("player")
	  for _,v in pairs(auth) do
	    if v == p then
		  rs.setOutput("left", true)
		  sleep(2)
		  rs.setOutput("left",false)
		  os.reboot()
	    end
	  end
    end

Edited on 12 January 2015 - 08:54 PM
Lyqyd #2
Posted 12 January 2015 - 10:13 PM
You've got an os.reboot where you should have a break keyword.
Agoldfish #3
Posted 12 January 2015 - 11:07 PM
Why yes you do, silly jake. Get it? Get it? Anyone? No? groan