View/Edit #7171:@fofind fofind findverb @which which

Switch to edit mode.

Name(s): @fofind fofind findverb @which which
1:  "This verb will determine if a command is available, and if so, where it can be found."
2:  "  findverb, @which  -- locate a verb using your own player, location, and features."
3:  "  fofind, @fofind   -- locate which of the MOO's \"Feature Objects\" (FOs) a command can be found on."
4:  obs = {}
5:  {vname, astr, dstr, pstr, istr} = $command_parser:parse_command(argstr)
6:  if (verb in {"findverb", "@which", "which"})
7:    dstr && (dobj = player:my_match_object(dstr))
8:    istr && (iobj = player:my_match_object(istr))
9:    obs = {@obs, @valid(dobj) ? {dobj} | {}}
10:   obs = {@obs, @valid(iobj) ? {iobj} | {}}
11:   obs = {@obs, @player.features}
12: else
13:   obs = {@$feature:leaves(), @this.other_features}
14: endif
15: player:tell("Searching for ", vname, "...")
16: for o in (obs)
17:   if (`vi = verb_info(o, vname) ! E_VERBNF')
18:     "Verbname matched, display object that contains it."
19:     player:tell($string_utils:nn(o), " has a verb named \"", vi[3], "\"")
20:   endif
21:   $command_utils:suspend_if_needed()
22: endfor
23: player:tell("Search complete.")
24: "Last modified by Cecil (#7407) on Sun Nov 25 17:52:37 2001 MST."

Verb arguments: any any any
Verb perms: Readable eXecutable NOT-Debug
Verb owned by: Cecil (#7407)

You are not logged in.

[home | help | who | search | setup | code]