MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: Amiguous Matches



This is how I handled it,

add these lines to :my_huh  (on $player).   
if(this:ordinal_huh(@args))
  return 1;
endif

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;
endif
if (!(y = $su:parse_command(tostr(args[1], " ", argstr), this)))
  return E_NONE;
endif
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;
endif
.

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.


-Faraday.



Home | Subject Index | Thread Index