Button Puzzle (Original)
Instructions
Copy and paste the below code into a compatible MUSH or MUX.
MUSHCode for Button Puzzle (Original)
@create Button_Original
@lock/Basic Button_Original==me
@lset Button_Original/Basic=no_inherit
@set Button_Original = !NO_COMMAND
&ADESCRIBE Button_Original=@TRIGGER ME/DISPLAYBUTTONS = %#
@set Button_Original/ADESCRIBE=no_command prefixmatch
&COLORONE Button_Original=Rg
&COLORTWO Button_Original=Bg
&DESCRIBE Button_Original=A three-by-three square of buttons. Try '[ANSI(g,press)]'ing a button.%rIf the buttons are all blue, type 'BP/done'.
@set Button_Original/DESCRIBE=no_command visual public nearby
&DISPLAYBUTTONS Button_Original=[SETQ(0,[V(OneByte)])][IF([BAND(%Q0,128)],[SETQ(1,[V(COLORONE)])],[SETQ(1,[V(COLORTWO)])])][IF([BAND(%Q0,64)],[SETQ(2,[V(COLORONE)])],[SETQ(2,[V(COLORTWO)])])][IF([BAND(%Q0,32)],[SETQ(3,[V(COLORONE)])],[SETQ(3,[V(COLORTWO)])])][IF([BAND(%Q0,16)],[SETQ(4,[V(COLORONE)])],[SETQ(4,[V(COLORTWO)])])][IF([BAND(%Q0,8)],[SETQ(5,[V(COLORONE)])],[SETQ(5,[V(COLORTWO)])])][IF([BAND(%Q0,4)],[SETQ(6,[V(COLORONE)])],[SETQ(6,[V(COLORTWO)])])][IF([BAND(%Q0,2)],[SETQ(7,[V(COLORONE)])],[SETQ(7,[V(COLORTWO)])])][IF([BAND(%Q0,1)],[SETQ(8,[V(COLORONE)])],[SETQ(8,[V(COLORTWO)])])][SETQ(A,[V(TwoByte)])][IF([BAND(%QA,128)],[SETQ(9,[V(COLORONE)])],[SETQ(9,[V(COLORTWO)])])][IF([BOR(%Q0,%QA)],@TRIGGER %!/TELZAP,)];@PEMIT %0=[ANSI(%Q1,,-.)][ANSI(%Q2,,-.)][ANSI(%Q3,,-.)]%R[ANSI(%Q1,|1|)][ANSI(%Q2,|2|)][ANSI(%Q3,|3|)]%R[ANSI(%Q1,`-')][ANSI(%Q2,`-')][ANSI(%Q3,`-')]%R[ANSI(%Q4,,-.)][ANSI(%Q5,,-.)][ANSI(%Q6,,-.)]%R[ANSI(%Q4,|4|)][ANSI(%Q5,|5|)][ANSI(%Q6,|6|)]%R[ANSI(%Q4,`-')][ANSI(%Q5,`-')][ANSI(%Q6,`-')]%R[ANSI(%Q7,,-.)][ANSI(%Q8,,-.)][ANSI(%Q9,,-.)]%R[ANSI(%Q7,|7|)][ANSI(%Q8,|8|)][ANSI(%Q9,|9|)]%R[ANSI(%Q7,`-')][ANSI(%Q8,`-')][ANSI(%Q9,`-')]%R
&FAILURE Button_Original=Push, don't pull.
@set Button_Original/FAILURE=no_command prefixmatch
&FINISHED Button_Original=$BP/done:if(bor(V(TwoByte),V(OneByte)),@set %!=enter_OK,emit(Not done))
&OFAILURE Button_Original=
@set Button_Original/OFAILURE=no_command prefixmatch
&ONEBYTE Button_Original=0
&OSUCCESS Button_Original=picks up the button puzzle.
@set Button_Original/OSUCCESS=no_command prefixmatch
&SETBUTTON Button_Original=$Press ?:th [SETQ(0,[V(OneByte)])][SETQ(1,[V(TwoByte)])][SETQ(2,[SWITCH(%0,1,208,2,232,3,100,4,154,5,93,6,44,7,19,8,11,9,5,0)])][SETQ(3,[SWITCH(%0,6,128,7,0,8,128,9,128,0)])][SETQ(0,[BXOR(%Q0,%Q2)])][SETQ(1,[BXOR(%Q1,%Q3)])];&OneByte %!=%Q0;&TwoByte %!=%Q1;@TRIGGER ME/DISPLAYBUTTONS = %#
&SUCCESS Button_Original=You pick up the Button Puzzle.
@set Button_Original/SUCCESS=no_command prefixmatch
&TWOBYTE Button_Original=0
look Button_Original
@lock/Basic Button_Original==me
@lset Button_Original/Basic=no_inherit
@set Button_Original = !NO_COMMAND
&ADESCRIBE Button_Original=@TRIGGER ME/DISPLAYBUTTONS = %#
@set Button_Original/ADESCRIBE=no_command prefixmatch
&COLORONE Button_Original=Rg
&COLORTWO Button_Original=Bg
&DESCRIBE Button_Original=A three-by-three square of buttons. Try '[ANSI(g,press)]'ing a button.%rIf the buttons are all blue, type 'BP/done'.
@set Button_Original/DESCRIBE=no_command visual public nearby
&DISPLAYBUTTONS Button_Original=[SETQ(0,[V(OneByte)])][IF([BAND(%Q0,128)],[SETQ(1,[V(COLORONE)])],[SETQ(1,[V(COLORTWO)])])][IF([BAND(%Q0,64)],[SETQ(2,[V(COLORONE)])],[SETQ(2,[V(COLORTWO)])])][IF([BAND(%Q0,32)],[SETQ(3,[V(COLORONE)])],[SETQ(3,[V(COLORTWO)])])][IF([BAND(%Q0,16)],[SETQ(4,[V(COLORONE)])],[SETQ(4,[V(COLORTWO)])])][IF([BAND(%Q0,8)],[SETQ(5,[V(COLORONE)])],[SETQ(5,[V(COLORTWO)])])][IF([BAND(%Q0,4)],[SETQ(6,[V(COLORONE)])],[SETQ(6,[V(COLORTWO)])])][IF([BAND(%Q0,2)],[SETQ(7,[V(COLORONE)])],[SETQ(7,[V(COLORTWO)])])][IF([BAND(%Q0,1)],[SETQ(8,[V(COLORONE)])],[SETQ(8,[V(COLORTWO)])])][SETQ(A,[V(TwoByte)])][IF([BAND(%QA,128)],[SETQ(9,[V(COLORONE)])],[SETQ(9,[V(COLORTWO)])])][IF([BOR(%Q0,%QA)],@TRIGGER %!/TELZAP,)];@PEMIT %0=[ANSI(%Q1,,-.)][ANSI(%Q2,,-.)][ANSI(%Q3,,-.)]%R[ANSI(%Q1,|1|)][ANSI(%Q2,|2|)][ANSI(%Q3,|3|)]%R[ANSI(%Q1,`-')][ANSI(%Q2,`-')][ANSI(%Q3,`-')]%R[ANSI(%Q4,,-.)][ANSI(%Q5,,-.)][ANSI(%Q6,,-.)]%R[ANSI(%Q4,|4|)][ANSI(%Q5,|5|)][ANSI(%Q6,|6|)]%R[ANSI(%Q4,`-')][ANSI(%Q5,`-')][ANSI(%Q6,`-')]%R[ANSI(%Q7,,-.)][ANSI(%Q8,,-.)][ANSI(%Q9,,-.)]%R[ANSI(%Q7,|7|)][ANSI(%Q8,|8|)][ANSI(%Q9,|9|)]%R[ANSI(%Q7,`-')][ANSI(%Q8,`-')][ANSI(%Q9,`-')]%R
&FAILURE Button_Original=Push, don't pull.
@set Button_Original/FAILURE=no_command prefixmatch
&FINISHED Button_Original=$BP/done:if(bor(V(TwoByte),V(OneByte)),@set %!=enter_OK,emit(Not done))
&OFAILURE Button_Original=
@set Button_Original/OFAILURE=no_command prefixmatch
&ONEBYTE Button_Original=0
&OSUCCESS Button_Original=picks up the button puzzle.
@set Button_Original/OSUCCESS=no_command prefixmatch
&SETBUTTON Button_Original=$Press ?:th [SETQ(0,[V(OneByte)])][SETQ(1,[V(TwoByte)])][SETQ(2,[SWITCH(%0,1,208,2,232,3,100,4,154,5,93,6,44,7,19,8,11,9,5,0)])][SETQ(3,[SWITCH(%0,6,128,7,0,8,128,9,128,0)])][SETQ(0,[BXOR(%Q0,%Q2)])][SETQ(1,[BXOR(%Q1,%Q3)])];&OneByte %!=%Q0;&TwoByte %!=%Q1;@TRIGGER ME/DISPLAYBUTTONS = %#
&SUCCESS Button_Original=You pick up the Button Puzzle.
@set Button_Original/SUCCESS=no_command prefixmatch
&TWOBYTE Button_Original=0
look Button_Original