@verb #13:"@disown @disinherit" any any any rdo #55 @program #13:"@disown @disinherit" any any any "Copied from Generic Programming student&&Etudiant d'informatique generique (#3924):@disown by Sleeping_Beauty (#2) Sat Jul 1 04:24:36 1995 EDT" "Syntax: @disown [from ]" "This command is used to remove unwanted children of objects you control. If you control an object, and there is a child of that object you do not want, this command will chparent() the object to its grandparent." if (prepstr) if (prepstr != "from") player:notify("Usage: ", verb, " <object> [from <object>]") return elseif ($command_utils:object_match_failed(iobj = player:my_match_object(iobjstr), iobjstr)) "... from WHAT?.." return elseif (valid(dobj = $string_utils:literal_object(dobjstr))) "... literal object number..." if (parent(dobj) != iobj) player:notify(tostr(dobj, " is not a child of ", iobj.name, " (", iobj, ")")) return endif elseif ($command_utils:object_match_failed(dobj = $string_utils:match(dobjstr, children(iobj), "name", children(iobj), "aliases"), dobjstr)) "... can't match dobjstr against any children of iobj" return endif elseif ($command_utils:object_match_failed(dobj = player:my_match_object(dobjstr), dobjstr)) "... can't match dobjstr..." return endif victim = dobj parent = parent(victim) if ($perm_utils:controls(player, victim)) "... why is he using @disown?... probably by mistake..." player:notify(tostr(victim.name, " (", victim, ") is yours. Use @chparent.")) elseif (!valid(parent)) player:notify(tostr(victim.name, " (", victim, ") is already an orphan.")) elseif (!$perm_utils:controls(player, parent)) player:notify(tostr(parent.name, " (", parent, "), the parent of ", victim.name, " (", victim, "), is not yours.")) else set_task_perms(victim.owner) grandparent = parent while (1) if (!valid(grandparent = parent(grandparent))) "I dunno... should we do the chparent anyway? Shouldn't matter for anything that's descended from $root." player:tell("Odd... there is no valid grandparent to chparent the object too!") return endif if ($perm_utils:perm_f(victim.owner, grandparent)) $building_utils:chparent(victim, grandparent) player:tell(victim.name, " (", victim, ") chparented to ", grandparent.name, " (", grandparent, ").") return endif endwhile endif "Last modified by Dax (#789) on Thu Nov 8 11:38:30 2001 MST." .