(local {: deflevel : say : itile : controlstate} (require :game.defs)) (local {: ev} (require :game.entity)) (local tile (require :game.tiles)) (local {: walkable : neutable : debris : sittable} tile.flag-to-bit) (local level (deflevel "game/map6.json")) (local vm level.vm) (vm:word :linkloop ; e -- e (vm:until :link-arg :dup :entity-itile (itile :termon) :=)) (vm:var :encountered-keypad vm.false) (vm:word :first-keypad ; ev code -- (vm:if-and [[:encountered-keypad :get :not] [:is-jaye?] [:over ev.touch :=]] [vm.true :encountered-keypad :set (say :pady "HELLO, STRANGER! I'M PADY," "THE FRIENDLY KEYPAD LOCK!") (say :jaye "I NEED TO GET THROUGH THIS" "DOOR, PADY.") (say :pady "YOU DIDN'T SAY THE MAGIC" "WORD, STRANGER!")]) (vm:if-and [[:is-neut?] [:over ev.touch :=] [:responder-itile (itile :t-keyoff) :=]] [(say :pady "OH HI THERE, SUSPICIOUS" "PROGRAM! WHAT CAN I DO" "YOU FOR?") (say :neut "PEOPLE ARE IN DANGER" "PLEASE OPEN THE DOOR") (say :pady "WELL THAT'S TERRIBLE!" "BUT I JUST CAN'T OPEN" "WITHOUT THE PROPER CODE.")]) :keypad) (vm:word :keypad1 0x5197 :first-keypad) (vm:word :keypad2 0x2757 :first-keypad) (vm:word :keypad3 0xffff :first-keypad) (vm:word :keypad4 0x7777 :first-keypad) (vm:word :term-message? :dup :term ev.touch := :is-jaye? :&) (vm:word :c1 :term-message? (vm:when (say :term ".:: WELCOME TO FARQUAAD ::." "OS: PRODOS 2.6" "RAM: 8 FREAKIN MEGABYTES D00D" "SYSADMIN: BILL") (say :term "S3CR3T C0D3Z: GET OUT LAMER" "BOSS KEY: CTRL-B TO ACTIVATE" "OPEN POD BAY DOORS:" " I CAN'T DO THAT DAVE") (say :term "GOOD RIDDANCE"))) (vm:word :c2 :term-message? (vm:when (say :term "SUBJECT: MISUSE OF REXX" "THANKS TO *SOME*ONE, WHO SHALL" "REMAIN NAMELESS, THAT DECIDED" "IT WOULD BE 'FUNNY' TO") (say :term "TEACH THE CLEANING ROBOT TO" "PLAY FETCH WITH EXPENSIVE" "EQUIPMENT, ACCESS TO REXX" "BY DEVELOPERS WILL BE STRICTLY") (say :term "CONTROLLED BY MANAGEMENT." "THE CODE HAS BEEN CHANGED." "DO NOT ATTEMPT TO HACK THE" "KEYPAD. THIS MEANS *YOU*, BILL."))) (vm:word :c3 :term-message? (vm:when (say :term "SUBJECT: SERVER'S DOWN" "HEY, I DON'T HAVE THE CODE TO" "ACCESS THE SERVER ROOM. CAN" "SOMEONE REBOOT IT FOR ME?") (say :term "SUBJECT: RE: SERVER'S DOWN" "I DON'T HAVE *TIME* FOR THIS" "NONSENSE!!" "REBOOT IT YOURSELF.") :lit :firewall :entity-itile (itile :termon) := (vm:if [(say :term "THE PASSCODE IS" "[ BLOCKED BY FIREWALL ].")] [(say :term "THE PASSCODE IS" "5197.")]) (say :term "SUBJECT: RE: RE: SERVER'S DOWN" "UHHHH THE FIREWALL IS BLOCKING" "THE PASSCODE?") (say :term "SUBJECT: RE: RE: SERVER'S DOWN" "AUGH FINE! I REBOOTED IT."))) (vm:word :c4 :term-message? (vm:when (say :term ".:: BILL'S WORKSTATION ::." "KEEP OUT DIPSHITS"))) (vm:word :c5 :term-message? (vm:when (say :gord "A WEIRD LOOKING SPREADSHEET...") (say :gord "OH WAIT, I PRESSED A KEY AND" "IT DISAPPEARED. SOMEONE USING" "THE BOSS KEY TO HIDE" "THAT THEY'RE READING THE ENTIRE") (say :gord "ARCHIVE OF USER FRIENDLY" "COMIC STRIPS."))) (vm:word :c6 :term-message? (vm:when (say :term "SUBJECT: CARD SCANNERS?" "LOOKS LIKE THE SCANNERS ARE" "ON THE FRITZ AGAIN..." "I SCANNED MY KEYCARD TO GET") (say :term "INTO THE OFFICE AND THE DOOR" "WOULDN'T CLOSE!" "SOMEONE'S GOTTA FIX THAT ASAP," "IT'S A SERIOUS SECURITY PROBLEM!") (say :term "SUBJECT: RE: CARD SCANNERS?" "I CAN TAKE A QUICK LOOK, I" "MIGHT HAVE AN IDEA AS TO" "WHAT'S GOING ON. -- BILL"))) (vm:word :c7 (vm:if-and [[:dup ev.touch :=] [:is-jaye?]] [:responder-itile (itile :termon) := (vm:if [(say :term "WORKSECURE (TM) V2.0" "AUTHORIZED PERSONNEL ONLY") (say :term "ACTIVELY NEUTRALIZING:" "1 THREAT(S)")] [(say :jaye "LOOKS LIKE THE POWER IS CUT.")]) :drop ev.nop]) :term) (vm:word :c8 :term-message? (vm:when (say :term "SUBJECT: PASSWORD SECURITY" "A REMINDER TO ALL DEVELOPERS" "ABOUT SECURITY BEST PRACTICE:" "**DO NOT WRITE DOWN PASSWORDS!**") (say :term "WE PAY SIGNIFICANT LICENSE FEES" "FOR ENCRYPTED PASSWORD" "MANAGERS FOR ALL EMPLOYEES!") (say :term "USE IT TO GENERATE AND STORE" "SECURE PASSWORDS!") (say :jaye "THERE'S A STICKY NOTE ATTACHED" "TO THE MONITOR THAT SAYS" "'7777'."))) (vm:word :c9 :term-message? (vm:when (say :term "SUBJECT: EXPERIMENT" "HEY FOLKS, CAN YOU ALL DO ME A" "HUGE FAVOUR?" "THERE WAS A SMALL BUG IN MY") (say :term "CODE (YES, IT HAPPENS!) AND A" "PROGRAM I WAS WORKING ON" "MADE A FEW TOO MANY COPIES OF" "ITSELF. CAN EVERYONE CHECK TO") (say :term "SEE IF YOU HAVE A PROCESS" "CALLED 'LIBB' RUNNING ON YOUR" "TERMINAL?") (say :term "IF YOU DO, PLEASE KILL -9 IT" "AND SHOOT ME A QUICK EMAIL." "*DON'T INTERACT WITH IT.*") (say :term "IT COULD SERIOUSLY MESS WITH" "YOUR SYSTEM." " -- BILL"))) (vm:word :cx (vm:if-and [[:dup ev.touch :=] [:is-jaye?] [:responder-itile (itile :termoff) :=]] [(say :jaye "THIS IS THE SIGN-IN TERMINAL" "USED BY VISITORS.") (say :jaye "IT'S NOT TURNING ON FOR SOME" "REASON.") :drop ev.nop]) :term) level