Switch to edit mode.
Name(s): @kids @par*ents @child*ren @sibling*s1: "@kids <obj> - List the children of an object."
2: "@parents <obj> - List the ancestors of an object."
3: "@siblings <obj> - List the children of the object's parent"
4: if ($command_utils:object_match_failed(dobj = player:my_match_object(dobjstr), dobjstr))
5: return
6: elseif (verb[2] == "s")
7: if (parent(dobj) == #-1)
8: player:tell(dobj.name, " does not have a parent.")
9: else
10: player:tell("The parent of ", dobj.name, " (", dobj, ") is ", parent(dobj).name, " (", parent(dobj), ")")
11: force_input(player, tostr("@kids ", parent(dobj)))
12: endif
13: elseif (group = verb[2] != "p" ? children(dobj) | dobj:ancestors())
14: verb[2] != "p" || (group = {dobj, @group})
15: lines = {}
16: for x in (group)
17: $command_utils:suspend_if_needed()
18: obj_name = `(obj_num = x):title() ! ANY => obj_num.name + ": [Broken Title!]"'
19: loc_name = valid(loc_num = x.location) ? `loc_num:title() ! ANY => loc_num.name + ": [Broken Title!]"' | tostr(loc_num)
20: own_name = valid(own_num = x.owner) ? `own_num:title() ! ANY => own_num.name + ": [Broken Title!]"' | tostr(own_num)
21: lines = {@lines, {obj_name, tostr(obj_num), tostr(loc_num), own_name}}
22: endfor
23: player:tellColumns({30, 5, 5, 30}, {"Object", "#", "Where", "Owner"}, @lines)
24: else
25: player:sub_tell("%1 has no %2s.", $string_utils:nn(dobj), verb[2] == "p" ? "parent" | "kid")
26: endif
27: "Last modified by MadHatter (#8371) on Sun Aug 11 04:40:52 2002 MDT."