ab3 @verb #1247:"f*ind" any with/using this rdo #8219 @program #1247:"f*ind" any with/using this player:tell("You type \"" + dobjstr + "\" into the computer.") this.location:announce_all_but({player}, player.name + " looks for \"" + dobjstr + "\" using the computer.") results = this:find_room(dobjstr)[2] if (results == E_INVARG) player:tell("That search request is too short. Please broaden it.") elseif (length(results) == 0) player:tell("The computer beeps. Nothing was found.") this.location:announce_all_but({player}, "The computer beeps. " + player.name + "'s search result returned nothing.") elseif (length(results) == 1) best_path = this:path_between(this.location, results[1], player) if (best_path == E_NACC) player:tell(results[1]:title() + " is not accessable to you.") else player:tell("The computer thinks that you're looking for " + results[1]:title() + ".") player:tell("You can get there by following this path:") for exit in [1..length(best_path)] player:tell(" " + tostr(exit) + ". " + best_path[exit].name + " to " + `best_path[exit].dest:title() ! ANY => "broken title"') endfor player:tell("The computer provides the following map:") for map in (this:draw_map(best_path)) map_line = " " for map_char in [1..length(map)] map_line = map_line + map[map_char] endfor $command_utils:suspend_if_needed(0) player:tell(map_line) endfor player:tell(" Legend: " + this.building + " - building " + this.you_are_here + " - you are here") this.location:announce_all_but({player}, "The computer beeps. " + player.name + "'s search returned a single result.") endif elseif (length(results) < 20) player:tell("The computer found multiple results.") for room in (results) best_path = this:path_between(this.location, room, player) player:tell(" ", room in results, ". ", `room:title() ! ANY => "broken title"') if (best_path == E_NACC) player:tell(" You cannot get to this room as it is locked.") else player:tell(" Directions from here: " + $string_utils:title_list(best_path)) endif $command_utils:suspend_if_needed(0) endfor this.location:announce_all_but({player}, "The computer beeps. " + player.name + "'s search returned " + tostr(length(results)) + " results.") else player:tell("There are too many results (" + tostr(length(results)) + ") to display.") player:tell("Try narrowing down your parameters a bit.") this.location:announce_all_but({player}, "The computer beeps; " + player.name + " is hit in the face with excessive printout.") endif "Last modified by Avenger (#8219) on Mon Sep 9 22:55:11 2002 MDT." . 0