Switch to edit mode.
Name(s): @1: "Copied from whiz (#3135):@ Nov 28 21:16:42 2004" 2: "Copied from Generic Builder (#13):@contents by Hacker (#60) Nov 28 21:11:21 2004" 3: "@contents <obj> - list the contents of an object, with additional data. By Raptor & Odo." 4: dobj = dobjstr ? player:my_match_object(dobjstr) | player.location 5: if ($command_utils:object_match_failed(dobj, dobjstr)) 6: return 7: endif 8: contents = dobj:has_verb("contents") ? dobj:contents() | dobj.contents 9: if (contents) 10: lines = {} 11: for x in (contents) 12: if (x:isa($player) && x:connected()) 13: $command_utils:suspend_if_needed() 14: obj_name = `(obj_num = x):title() ! ANY => obj_num.name + ": [Broken Title!]"' 15: par_name = valid(par_num = parent(x)) ? `par_num:title() ! ANY => par_num.name + ": [Broken Title!]"' | $find_ref(par_num) || tostr(par_num) 16: own_name = valid(own_num = x.owner) ? `own_num:title() ! ANY => own_num.name + ": [Broken Title!]"' | $find_ref(own_num) || tostr(own_num) 17: lines = {@lines, {obj_name, obj_num, par_num, own_name}} 18: endif 19: endfor 20: player:tellColumns({30, 5, 5, 30}, {"Object", "#", "Parnt", "Owner"}, @lines) 21: else 22: player:sub_tell("%D (#%d~#) contains nothing.") 23: endif