7c4 @verb #7407:"@grep*!" any for/about any rdo #7407 @program #7407:"@grep*!" any for/about any "Copied from Generic Builder (#13):@grep by manta (#7165)Feb 11 08:27:53 2000" "Copied from Lao-Tzu (#8084):@grep Jun 15 18:42:42 1997" "@grep for " "@grep! for " "Searchs the readable verbs on for . With @grep!, it will continue through the verb even after it finds one occurence of ." this:isa($guardian) || set_task_perms(caller_perms()) if (dobjstr == "") if (this:isa($guardian)) objects = $set_utils:union($root:descendants_suspended(), {$trash, $root, $new_root}) else return player:tell("You must provide an object to ", verb) endif elseif (this:isa($guardian) && (m = match(dobjstr, "^%(#[0-9]+%)%(-%|%.%.%)%(#[0-9]+%)$"))) objects = {} for x in [toobj(dobjstr[m[3][1][1]..m[3][1][2]])..toobj(dobjstr[m[3][3][1]..m[3][3][2]])] x:isa($garbage) || (objects = {@objects, x}) endfor else objects = {player:my_match_object(dobjstr)} endif this:tell("--- ", verb, " of ", length(objects) == 1 ? $su:nn(objects[1]) | tostr(length(objects), " objects"), " for '", iobjstr, "' ---") length(objects) > 1 ? {verb = tostr(verb, "!"), "Just making sure that if there is more then one object it's a @grep!."} | 0 for object in (objects) for x in [1..length(`verbs(object) ! E_PERM => {}')] code = `verb_code(object, x) ! ANY => {}' q = 0 for a in (code) q = q + 1 if (index(a, iobjstr)) this:tell(object, ":\"", verbs(object)[x], "\" (Line ", q, ") -> ", a) if (!index(verb, "!")) break endif endif $cmd_utils:suspend_if_needed(0, caller_perms()) endfor $cmd_utils:suspend_if_needed(0, caller_perms()) endfor $cmd_utils:suspend_if_needed(0, caller_perms()) endfor this:tell("--- End of @grep ---") "Last modified by Cecil (#7407) on Sat Mar 3 12:25:10 2001 MST." . 0