5fa @verb #1247:"find_room" this none this rxdo #8219 @program #1247:"find_room" this none this placeSubStr = args[1] timeToLive = `args[2] - 1 ! ANY => this.search_threshold' placesVisited = `args[3] ! ANY => {}' matches = `args[4] ! ANY => {}' startPlace = `args[5] ! ANY => this:start_search()' exitsSoFar = `args[6] ! ANY => {"exit listing unimplemented at this point"}' if (timeToLive <= 0) return {placesVisited, matches, exitsSoFar} elseif (length(placeSubStr) < 3) return E_INVARG else newMatches = {} if (index(`startPlace:title() ! ANY => ""', placeSubStr) && !(startPlace in newMatches)) newMatches = {@newMatches, startPlace} endif newExitList = {} for exit in (startPlace:exits()) if (index(`exit.dest.name ! ANY => ""', placeSubStr) && !(exit.dest in newMatches)) newMatches = {@newMatches, exit.dest} endif if (!`exit.dest in placesVisited ! ANY => 1' && `exit.name in {"north", "south", "east", "west", "northwest", "southwest", "northeast", "southeast"} ! ANY => 0') {placesVisited, matchesFound, newExits} = this:find_room(args[1], timeToLive, {@placesVisited, startPlace}, newMatches, exit.dest, {@exitsSoFar, exit}) newExitList = newExits newMatches = {@newMatches, @matchesFound} endif $command_utils:suspend_if_needed(0) endfor return {$list_utils:remove_duplicates(placesVisited), $list_utils:remove_duplicates(newMatches), exitsSoFar} endif "Last modified by Avenger (#8219) on Mon Sep 9 22:47:29 2002 MDT." . 0