Re: [newbie][code]partial names....

From: Daniel Koepke (dkoepke@california.com)
Date: 01/15/97


On Wed, 15 Jan 1997, Dave wrote:

> Hiya peoples.
> How can I make it so that when someone types "w col" the mud recognizes it
> as "wear collar"?  or something like "k mis" is recognized as "kill
> mistress"?(actually...I think the k thing works, but the w thing doesn't.)
> so basically how do I implement partial names?

Well, abbreviation of commands is implemented.  The "w" won't work
because that's the abbreviation for west, not for wear.  As for obj
names, maybe something like:

  int new_is_name(char *str, char *keywords) {
    register char *curname, *curstr;

    curstr = any_one_arg(keywords, curname);

    do
      if (is_abbrev(str, curname))
        break;
    while (*curstr);
  }

Maybe.  Written in the mailer, of course (always).


--
Daniel Koepke
dkoepke@california.com
Forgive me father, for I am sin.


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST