Re: [NEWBIE]socials/commands

From: Patrick Dughi (dughi@imaxx.net)
Date: 09/11/01


> > That would work but the only problem is, it isn't in the cmd_info, I
> > have a social file not a cmd for each one :(
>
> If that's really the case (meaning you've changed how CircleMUD works),
> then you've changed command_interpreter() to scan the socials table, too.
> The obvious solution then is to scan for a matching social if and only if
> no matching command was found.
>

        Actually, I may have posted code about this at one time, but if
not, not big deal.  Just do something in pseudo code, like:


for (each command in the list)
  if (command matches)
    set current command to this one
    break;

for (each command in the list)
  if (command matches and command != do_action)
    set current command to this one
    break;

/* do rest of stuff where you actually check to see if you found a command
and if so, to run it, etc.. */

        pretty simple really.

                                        PjD

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/06/01 PST