Improved redirected say and whisper (#466)(an instance of Generic Feature Object made by Snap)     An improved ` verb. It remembers the last say so you don't need the name to use it again. `` whispers. Go to location of this object, Features Feature Object. VERB SOURCE CODE: `*:
"Say something out loud, directed at someone or something.";
"Usage:";
" `target message";
" ` message";
" ``target message";
" `` message";
"Example:";
" Munchkin is talking to Kenneth, who's in the same room with him. He types:";
" `kenneth What is the frequency?";
" The room sees:";
" Munchkin says to Kenneth, \"What is the frequency?\"";
"New features:";
" To speak again to the same person, just use ` with no argument.";
" ` And how can I figure out the wavelength?";
" Munchkin says to Kenneth, \"And how can I figure out the wavelength?\"";
"And to whisper, use ``";
" ``carrot After he tells me, I'll tell you my plan.";
" Munchkin whispers to Carrot, \"After he tells me, I'll tell you my plan.\"";
"Note: only Carrot will see this.";
if ((length(verb) > 1) && (verb[1..2] == "``"))
if (length(verb) == 2)
who = $list_utils:assoc(player, this.last_chat);
if (!who)
player:tell("To whom did you wish to whisper?");
return;
endif
who = who[2];
else
name = verb[3..length(verb)];
who = player.location:match_object(name);
if ($command_utils:object_match_failed(who, name))
return;
endif
endif
who:tell(player:titlec(), " whispers, \"", argstr, "\"");
player:tell("You whisper, \"", argstr, "\"", " to ", who.name);
else
if (length(verb) == 1)
who = $list_utils:assoc(player, this.last_chat);
if (!who)
player:tell("To whom did you wish to speak?");
return;
endif
who = who[2];
else
name = verb[2..length(verb)];
who = player.location:match_object(name);
if ($command_utils:object_match_failed(who, name))
return;
endif
endif
player.location:announce_all_but({player, who}, player:titlec(), " says to ",
who.name, ", \"", argstr, "\"");
who:tell(player:titlec(), " says to you, \"", argstr, "\"");
player:tell("You say to ", who.name, ", \"", argstr, "\"");
endif
if (iwho = $list_utils:iassoc(player, this.last_chat))
this.last_chat[iwho] = {player, who};
else
this.last_chat = {{player, who}, @this.last_chat};
endif
.
PROPERTY DATA:       last_chat |