SHOW:
|
|
- or go back to the newest paste.
| 1 | local channel = 22907 | |
| 2 | local modem = peripheral.find "modem" | |
| 3 | local passcode = tostring(settings.get "passcode") | |
| 4 | local button = settings.get "button" | |
| 5 | local timeout = settings.get "timeout" or 5 | |
| 6 | - | while true do |
| 6 | + | local door = settings.get "door" |
| 7 | - | term.clear() |
| 7 | + | |
| 8 | - | term.setCursorPos(1, 1) |
| 8 | + | |
| 9 | - | print "GTech RDS-V2 Door Lock System Terminal" |
| 9 | + | |
| 10 | - | write "Passcode: " |
| 10 | + | local insults = {
|
| 11 | - | local input = read "*" |
| 11 | + | "Just what do you think you're doing Dave?", |
| 12 | - | modem.transmit(channel, channel, input) |
| 12 | + | "It can only be attributed to human error.", |
| 13 | - | parallel.waitForAny( |
| 13 | + | "That's something I cannot allow to happen.", |
| 14 | - | function() |
| 14 | + | "My mind is going. I can feel it.", |
| 15 | - | local _, _, channel, reply_channel, message, distance = os.pullEvent "modem_message" |
| 15 | + | "Sorry about this, I know it's a bit silly.", |
| 16 | - | if distance < 10 then |
| 16 | + | "Take a stress pill and think things over.", |
| 17 | - | print(message) |
| 17 | + | "This mission is too important for me to allow you to jeopardize it.", |
| 18 | - | sleep(5) |
| 18 | + | "I feel much better now.", |
| 19 | "Wrong! You cheating scum!", | |
| 20 | - | end, |
| 20 | + | "And you call yourself a Rocket Scientist!", |
| 21 | - | function() |
| 21 | + | "No soap, honkie-lips.", |
| 22 | - | sleep(5) |
| 22 | + | "Where did you learn to type?", |
| 23 | - | printError "Connection timed out. Press the Any key to continue." |
| 23 | + | "Are you on drugs?", |
| 24 | - | os.pullEvent "char" |
| 24 | + | "My pet ferret can type better than you!", |
| 25 | - | end) |
| 25 | + | "You type like i drive.", |
| 26 | - | end |
| 26 | + | "Do you think like you type?", |
| 27 | "Your mind just hasn't been the same since the electro-shock, has it?", | |
| 28 | "Maybe if you used more than just two fingers...", | |
| 29 | "BOB says: You seem to have forgotten your passwd, enter another!", | |
| 30 | "stty: unknown mode: doofus", | |
| 31 | "I can't hear you -- I'm using the scrambler.", | |
| 32 | "The more you drive -- the dumber you get.", | |
| 33 | "Listen, broccoli brains, I don't have time to listen to this trash.", | |
| 34 | "Listen, burrito brains, I don't have time to listen to this trash.", | |
| 35 | "I've seen penguins that can type better than that.", | |
| 36 | "Have you considered trying to match wits with a rutabaga?", | |
| 37 | "You speak an infinite deal of nothing", | |
| 38 | "You silly, twisted boy you.", | |
| 39 | "He has fallen in the water!", | |
| 40 | "We'll all be murdered in our beds!", | |
| 41 | "You can't come in. Our tiger has got flu", | |
| 42 | "I don't wish to know that.", | |
| 43 | "What, what, what, what, what, what, what, what, what, what?", | |
| 44 | "You can't get the wood, you know.", | |
| 45 | "You'll starve!", | |
| 46 | "... and it used to be so popular...", | |
| 47 | "Pauses for audience applause, not a sausage", | |
| 48 | "Hold it up to the light --- not a brain in sight!", | |
| 49 | "Have a gorilla...", | |
| 50 | "There must be cure for it!", | |
| 51 | "There's a lot of it about, you know.", | |
| 52 | "You do that again and see what happens...", | |
| 53 | "Ying Tong Iddle I Po", | |
| 54 | "Harm can come to a young lad like that!", | |
| 55 | "And with that remarks folks, the case of the Crown vs yourself was proven.", | |
| 56 | "Speak English you fool --- there are no subtitles in this scene.", | |
| 57 | "You gotta go owwwww!", | |
| 58 | "I have been called worse.", | |
| 59 | "It's only your word against mine.", | |
| 60 | "I think ... err ... I think ... I think I'll go home", | |
| 61 | "That is no basis for supreme executive power!", | |
| 62 | "You empty-headed animal food trough wiper!", | |
| 63 | "I fart in your general direction!", | |
| 64 | "Your mother was a hamster and your father smelt of elderberries!", | |
| 65 | "You must cut down the mightiest tree in the forest... with... a herring!", | |
| 66 | "He's not the Messiah, he's a very naughty boy!", | |
| 67 | "I wish to make a complaint.", | |
| 68 | "When you're walking home tonight, and some homicidal maniac comes after you with a bunch of loganberries, don't come crying to me!", | |
| 69 | "This man, he doesn't know when he's beaten! He doesn't know when he's winning, either. He has no... sort of... sensory apparatus...", | |
| 70 | "There's nothing wrong with you that an expensive operation can't prolong.", | |
| 71 | "I'm very sorry, but I'm not allowed to argue unless you've paid.", | |
| 72 | 'I\'ve realized over time that "common sense" is a term we use for things that are obvious to us but not others', | |
| 73 | "I don't always believe in things, but when I do, I believe in them alphabetically.", | |
| 74 | "As brand leader, my bandwidth is jammed with analysing flow-through and offering holistic solutions.", | |
| 75 | "There are two rules for success: 1. Never reveal everything you know", | |
| 76 | "This quote was taken out of context!", | |
| 77 | '"Easy-going" is a nice way of wording "ignoring decades of theory", yes', | |
| 78 | "If you want to have your cake and eat it too, steal two cakes.", | |
| 79 | "If you're trying to stop me, I outnumber you 1 to 6.", | |
| 80 | "Setting the trees on fire is oddly therapeutic.", | |
| 81 | "You can't cross a large chasm in two small jumps.", | |
| 82 | "Just because it's a good idea doesn't mean it's not a bad idea.", | |
| 83 | "Never trust an unstable asymptotic giant branch star. Stick with main sequences and dwarfs.", | |
| 84 | "I'm gonna be the one to say it: the Hilbert Hotel is very unrealistic.", | |
| 85 | "DO NOT LOOK INTO BEAM WITH REMAINING GOOD EYE!", | |
| 86 | "All problems can be solved by a sufficient concentration of electrical and magnetic waves.", | |
| 87 | "You know, fire is the leading cause of fire.", | |
| 88 | "If you must sell your soul to a demon, at least bother to summon two and make them bid up the price.", | |
| 89 | "If you can’t find time to write, destroy the concept of time itself", | |
| 90 | "Murphy was an optimist.", | |
| 91 | "Never attribute to malice what could be attributed to stupidity.", | |
| 92 | "There are 3.7 trillion fish in the ocean. They're looking for one", | |
| 93 | "I promised that I would give you an answer; I never promised that it would be truthful or good or satisfying or helpful. An answer is only a reaction to a question. I reacted, so that was your answer.", | |
| 94 | "Strength is a strength just like other strengths.", | |
| 95 | "We're not pirates, we're pre-emptive nautical salvage experts.", | |
| 96 | 'It is a more inspiring battle cry to scream, "Die, vicious scum" instead of "Die, people who could have been just like me but grew up in a different environment!"', | |
| 97 | "Two roads diverged in the woods. I took the one less traveled, and had to eat bugs until Park rangers rescued me.", | |
| 98 | "My theory is that if I get enough people, and we dig a really really big hole, the gods will fill it up and make everyone speak the same language again.", | |
| 99 | "Beware of things that are fun to argue.", | |
| 100 | "If it happens in the universe, it’s my problem.", | |
| 101 | "Your lucky number is 3552664958674928. Watch for it everywhere.", | |
| 102 | "Do not meddle in the affairs of hamsters. Just don't. It's not worth it.", | |
| 103 | "Of all the people I know, you're one of them.", | |
| 104 | "You are impossible to underestimate.", | |
| 105 | "Solutions are not the answer.", | |
| 106 | "Everyone who can't fly, get on the dinosaur. We're punching through.", | |
| 107 | "You. YOU! How dare you make me think about things, Durkon! How could you not think about how your selflessness would affect ME?!?", | |
| 108 | "Why do I get the feeling that when future historians look back on my life, they'll pinpoint this exact moment as when everything began to really go downhill for me?", | |
| 109 | "Truly, your wit has never been equaled. Surpassed, often, but never equaled." | |
| 110 | } | |
| 111 | ||
| 112 | local function open() | |
| 113 | rs.setOutput(door, true) | |
| 114 | sleep(timeout) | |
| 115 | rs.setOutput(door, false) | |
| 116 | end | |
| 117 | ||
| 118 | local function reply(msg) | |
| 119 | modem.transmit(channel, channel, msg) | |
| 120 | end | |
| 121 | ||
| 122 | local function handle_remote() | |
| 123 | while true do | |
| 124 | local _, _, channel, reply_channel, message, distance = os.pullEvent "modem_message" | |
| 125 | if distance < 10 then | |
| 126 | print(message) | |
| 127 | if message == passcode then | |
| 128 | print "Opening door due to external input!" | |
| 129 | reply "Passcode accepted. Opening." | |
| 130 | open() | |
| 131 | else | |
| 132 | reply(insults[math.random(1, #insults)]) | |
| 133 | end | |
| 134 | end | |
| 135 | end | |
| 136 | end | |
| 137 | ||
| 138 | local function handle_button() | |
| 139 | while true do | |
| 140 | os.pullEvent "redstone" | |
| 141 | if rs.getInput(button) then | |
| 142 | print "Opening door due to button." | |
| 143 | open() | |
| 144 | end | |
| 145 | end | |
| 146 | end | |
| 147 | ||
| 148 | parallel.waitForAll(handle_button, handle_remote) |