a plastic sign (#2015)(an instance of generic thing made by Trismegistos)     One of those portable yellow plastic roadside signs with black movable letters, which you can read ... Go to location of this object, Filling Station.      TOSS MISTER GI VERB SOURCE CODE: spell:
if (typeof(args[1]) != STR)
player:tell("I don't understand. Try enclosing what you are trying to spell in
\"quotes\".");
return;
else
textlist = {};
for n in [1..length(this.text)]
textlist = listinsert(textlist, this.text[n]);
endfor
fits = 1;
for n in [1..length(args[1])]
if (args[1][n] != " ")
if (loc = match($string_utils:from_list(textlist), args[1][n], 1))
textlist = listdelete(textlist, loc[1]);
else
fits = 0;
endif
endif
endfor
if (fits)
leftover = $string_utils:from_list($list_utils:reverse(textlist));
this.text = $string_utils:trim((args[1] + " ") + leftover);
player:tell(this.name, " now reads: ", this.text);
player.location:announce(player.name, " rearranges the letters on ", this.name,
".");
else
player:tell("Sorry, ", args[1], " cannot be made out of the letters in ",
this.text, ". (remember, case and punctuation do count.)");
endif
endif
.
@setletters:
if (player != this.owner)
player:tell("Only the owner may set the letters on ", this.name);
return;
else
this.text = $command_utils:read();
player:tell("Text set to '", this.text, "'.");
endif
.
r*ead:
this:look_self();
player:tell();
player:tell_lines(this.text);
player:tell();
player:tell("(You finish reading.)");
.
PROPERTY DATA:       text       look_msg |