@verb #7446:"@verbsearch" any any any rdo #7446 @program #7446:"@verbsearch" any any any "Copied from Wanderer (#1057):@verbsearch Mar 20 12:55:22 1999" "@searchdump version 2.0 -- coded by Wanderer (#1057)." "Searches for a keyword in every verb accessible to the player on the entire MOO." "Runs fast and efficiently, and uses try so no traceback occurs." "Players are allowed to freely @copy this verb however please do not modify it without" "Wanderer's expressed permission." if (player != this) return player:tell("Please use @copy to copy this verb to yourself so you can use it.") endif if ($object_utils:has_property(player, "search_dump")) player:tell("You have a property of .search_dump. Would you like the search to dump to this property instead of filling your screen?") ch = $cmd_utils:yes_or_no("Dump to property instead of screen? ") dump_yn = ch else player:tell("If you wish to be able to dump to a property instead of the search results filling your screen, please add a .search_dump property to yourself.") dump_yn = 0 endif if (dump_yn) player.search_dump = {} endif player:tell("Searching for \"", argstr, "\"... Type @kill all to kill this task!") for x in [#0..#9999] y = toobj(x) try z = verbs(y) $command_utils:suspend_if_needed() for abc in (z) black = index(abc, " ") white = index(abc, "*") if (!black && !white) quack = abc elseif (black > white && !white) quack = abc[1..black - 1] elseif (white > black && !black) quack = abc[1..white - 1] elseif (black > white) quack = abc[1..white - 1] elseif (white > black) quack = abc[1..black - 1] endif for cat in (verb_code(y, quack)) if (index(cat, argstr)) if (dump_yn) player.search_dump = {@player.search_dump, tostr("## FOUND: ", y, ":", abc, " line ", cat in verb_code(y, quack))} else player:tell("## FOUND: ", y, ":", abc, " line ", cat in verb_code(y, quack)) endif endif $command_utils:suspend_if_needed() endfor endfor except (ANY) "Didn't work. Damn." endtry endfor player:tell("Search complete.") if (dump_yn) player:tell("Search results have been dumped to your .search_dump property.") endif .