Switch to edit mode.
Name(s): @cont*ents1: "@contents <obj> - list the contents of an object, with additional data. By Raptor & Odo."
2: dobj = dobjstr ? player:my_match_object(dobjstr) | player.location
3: if ($command_utils:object_match_failed(dobj, dobjstr))
4: return
5: endif
6: contents = dobj:has_verb("contents") ? dobj:contents() | dobj.contents
7: if (contents)
8: lines = {}
9: for x in (contents)
10: $command_utils:suspend_if_needed()
11: obj_name = `(obj_num = x):title() ! ANY => obj_num.name + ": [Broken Title!]"'
12: par_name = valid(par_num = parent(x)) ? `par_num:title() ! ANY => par_num.name + ": [Broken Title!]"' | $find_ref(par_num) || tostr(par_num)
13: own_name = valid(own_num = x.owner) ? `own_num:title() ! ANY => own_num.name + ": [Broken Title!]"' | $find_ref(own_num) || tostr(own_num)
14: lines = {@lines, {obj_name, obj_num, par_num, own_name}}
15: endfor
16: player:tellColumns({30, 5, 5, 30}, {"Object", "#", "Parnt", "Owner"}, @lines)
17: else
18: player:sub_tell("%D (#%d~#) contains nothing.")
19: endif
20: "Last modified by Dax (#789) on Sun Jul 28 03:27:30 2002 MDT."