628 @verb #101:"bf_chparent" this none this rxdo #55 @program #101:"bf_chparent" this none this "Copied from _constructor & _destructor wrappers (#992):bf_chparent by manta (#7165) Sep 23 14:10:10 1997" "Replacement for the old chparent builtin: chparent(what, new_parent)" {what, where} = args cp = caller_perms() if (!valid(what)) raise(E_INVARG, tostr("The object to be chparented, ", what, " is not a valid object.")) elseif (!valid(where) && where != #-1) raise(E_INVARG, tostr("The new parent, ", where, " must be either a valid object or $nothing.")) elseif (!cp.wizard && is_player(what)) raise(E_PERM, "You cannot chparent() yourself to a player class.") elseif (!$perm_utils:controls(cp, what)) raise(E_PERM, tostr(cp, " does not control ", what)) elseif (!$perm_utils:perm_f(cp, where, what)) raise(E_PERM, tostr(what, " is not fertile and is not controlled by ", cp)) endif "if (!caller_perms().wizard)" " return E_PERM;" "endif" whence = parent(what) $wiz_utils:autoextend(where) ci = $building_utils:chparent_info(whence, where) $code_utils:call_verbs(ci[1], "_destructor", {what}, 100.0, #-1) $scheduler:run(99.9, #0, "do_bf_call", {$slacker, "resume", {task_id()}}, $slacker, player) suspend(60) pass(what, where) if (!caller_perms():isa($guardian)) what:_set_petrified(0) endif $code_utils:call_verbs(ci[2], "_constructor", {what}, 90.0, #-1) $scheduler:run(89.9, #0, "do_bf_call", {$slacker, "resume", {task_id()}}, $slacker, player) suspend(60) "Last modified by Cecil (#7407) on Tue Nov 26 11:36:33 2002 MST." . 0