MOO-cows Mailing List Archive


Re: Amiguous Matches

This is how I handled it,

add these lines to :my_huh  (on $player).   
  return 1;

Also add this verb to $player.

@verb $player_class:"ordinal_huh" this none this rxd
@prog $player_class:ordinal_huh
":ordinal_parse(verb, args)";
cp = caller_perms();
if (caller != this && !$perm_utils:controls(caller_perms(), this))
  "Standard permissions check.";
  return E_PERM;
if (!(y = $su:parse_command(tostr(args[1], " ", argstr), this)))
  return E_NONE;
verb = y[1];
dobj = y[2][1];
dobjstr = y[2][2];
prep = y[3][1];
prepstr = y[3][2];
iobj = y[4][1];
iobjstr = y[4][2];
args = y[5][1];
argspkg = {prepstr, dobjstr, dobj, iobjstr, iobj};
if ($match_utils:match_verb(verb, dobj, argspkg))
  return 1;
elseif ($match_utils:match_verb(verb, iobj, argspkg))
  return 1;

I only wrote this today, so if anybody uses it and finds a bug let me 
know. It seems to be working fine, so long as you set the verbs 
executable flag.


Home | Subject Index | Thread Index