: say me @ swap notify ; : do_description trigger @ "_on?" getpropstr not trigger @ location player? not trigger @ location me @ dbcmp not or or if "You look in the pocket mirror and see yourself reflected there." say exit then "You look into the mirror and see that you're not looking at your" say "own reflection. Instead, you see an image of %N in the mirror." trigger @ "_who" getpropstr atoi dbref swap pronoun_sub say "%S is in a room called %location along with %number others." 0 trigger @ "_who" getpropstr atoi dbref location contents begin dup while dup player? if dup awake? if dup trigger @ "_who" getpropstr atoi dbref dbcmp not if swap 1 + swap then then then next repeat pop dup 1 = if swap "other" "others" subst swap then intostr "%number" subst trigger @ "_who" getpropstr atoi dbref location name "%location" subst trigger @ "_who" getpropstr atoi dbref swap pronoun_sub say ; : do_turn tolower dup "on" instr if pop trigger @ location "_on?" getpropstr if "The mirror is already on." say exit else "You turn the mirror on. It is now watching what %N says and does." trigger @ location "_who" getpropstr atoi dbref swap pronoun_sub say trigger @ location "_who" getpropstr atoi dbref me @ "%N has turned the magic mirror on and is watching you." pronoun_sub notify trigger @ location "_on?" "yes" 0 addprop exit then else trigger @ location "_on?" getpropstr not if "The mirror is already off." say exit else "You turn the mirror off. You are no longer watching %N." trigger @ location "_who" getpropstr atoi dbref swap pronoun_sub say trigger @ location "_who" getpropstr atoi dbref me @ "%N's magic mirror is no longer watching you." pronoun_sub notify trigger @ location "_on?" remove_prop exit then then ; : do_check 1 begin trigger @ location "_mirror" 3 pick intostr strcat getpropstr dup while atoi dbref dup location player? if dup "_on?" getpropstr if location "A mirror held by %N is on and watching you." pronoun_sub say else location "A mirror held by %N is switched off." pronoun_sub say then else pop "A mirror that could be watching you is not being held." say then 1 + repeat pop pop ; : main trigger @ exit? not if "It's a small handheld mirror that isn't particularly notable." say "You do notice that there is a small switch on the back, though," say "with which you can 'turn mirror '. Currently:" say pop do_description exit then trigger @ name tolower "mirror?" strcmp not if do_check exit then trigger @ name tolower "turn" instr if do_turn exit then trigger @ name tolower "say" instr if me @ "_say/say" getpropstr dup not if pop "You say, \"%m\"" then over "%m" subst say me @ "_say/osay" getpropstr dup not if pop me @ name " says, \"%m\"" strcat else me @ name swap strcat then swap "%m" subst else me @ name swap dup 1 strcut pop ";+=,'@!" swap instr not if " " swap strcat then strcat dup say then 1 begin trigger @ location "_mirror" 3 pick intostr strcat getpropstr dup while atoi dbref dup location player? if dup "_on?" getpropstr if location "Mirror> " 4 pick strcat notify else pop then else pop then 1 + repeat pop pop loc @ me @ rot notify_except ;