6ae @verb #6319:"@view" any any any rdo #7165 @program #6319:"@view" any any any "Copied from manta (#7165):view May 12 00:54:12 1998" if (player != this) return $msg:mtell("huh") endif if (valid(iobj) && iobj:isa($editor)) return iobj:view(@args) endif if (valid(target = $string_utils:match_local_player(args[1]))) this.last_viewed = target else target = this.last_viewed endif args = listdelete(args, 1) for x in ($editor:descendants()) if ((n = x:loaded(target)) && (x:readable(n) || this.wizard)) len = length(x.texts[n]) ins = x.inserting[n] window = 8 if (len < 2 * window) default = {"1-$"} elseif (ins <= window) default = {tostr("1-", 2 * window)} else default = {tostr(window, "_-", window, "^"), tostr(2 * window, "$-$")} endif if (typeof(range = x:parse_range(n, default, @args)) != $LIST) this:tell(tostr(range)) elseif (range[3] && !(nonum = "nonum" == $string_utils:trim(range[3]))) this:tell("Don't understand this: ", range[3]) elseif (`nonum ! E_VARNF') this:tell(x.texts[n][range[1]..range[2]]) else for line in [range[1]..range[2]] x:list_line(n, line) if ($command_utils:running_out_of_time()) suspend(0) if (!(n = x:loaded(target))) this:tell("ack! something bad happened during a suspend...") return endif endif endfor if (ins > len && len == range[2]) this:tell("^^^^") endif endif return endif endfor player:tell($su:nn(target), " has no published texts.") "Last modified by Dax (#789) on Wed May 4 06:46:04 2005 MDT." . 0