Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Original code by "http://www.computercraft.info/forums2/index.php?/topic/3728-mc-164-cc-158-immibiss-peripherals/"
- local status = {"<Enter Card>","<Rejected>","<Granted>"}
- local current = 1
- local combo = "#Code que vous avez entré lors de la création de la carte"
- local lastTimer
- while true do
- local event,arg1,arg2,arg3 = os.pullEvent()
- if event == "timer" and arg1 == lastTimer then
- current = 1
- lastTimer = nil
- rs.setOutput("coté d'ou sortira la redstone",false)
- elseif event == "mag_swipe" then
- if arg1 == combo then
- lastTimer = os.startTimer(3)
- current = 3
- rs.setOutput("coté d'ou sortira la redstone",true)
- else
- lastTimer = os.startTimer(3)
- current = 2
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment