854 @verb #13:"@dig" any any any rdo #55 @program #13:"@dig" any any any set_task_perms(player) if (!prepstr) room = argstr exit_spec = "" elseif (length(args) >= 3 && args[2] in {"to", "a"}) exit_spec = args[1] room = $su:from_list(args[3..$], " ") else player:tell({"Usage: @dig <new-room-name>", " or @dig <exit-description> to <new-room-name-or-old-room-object-number>"}) return endif other_room = tostr(toobj(room)) == $su:trim(room) ? toobj(room) | $room_db:find(room) if (!valid(other_room)) try other_room = $recycler:create(this.digwith[1]) except e (ANY) return player:tell(e[1]) endtry try "In case the set_name does not terminate..." stat = 0 stat = other_room:set_name(room) && other_room:set_aliases({room}) except (E_INVARG) for name in ({room}) if (m = $room_db:why_not_available(name)) return player:tell("You cannot use the name ", name, " because ", m) endif endfor $msg:mtell("rename_bad") except (E_NACC) $msg:mtell("db_frozen") except e (ANY) player:tell(e[1]) endtry if (stat) other_room:moveto($czone) $msg:mtell("dug_simple", other_room) else $recycler:recycle(other_room) return endif elseif (length(args) == 1) return $msg:mtell("dig_exists") elseif (!valid(player.location) || !($room in $object_utils:ancestors(player.location))) return $msg:mtell("not_room", player.location) elseif (!valid(other_room) || !($room in $object_utils:ancestors(other_room))) return $msg:mtell("not_room", other_room) endif if (exit_spec) exits = $string_utils:explode(exit_spec, "|") if (length(exits) < 1 || length(exits) > 2) $msg:mtell("dig_exitspec_usage") endif to_ok = $building_utils:make_exit($su:is_numeric(exits[1]) ? toint(exits[1]) | exits[1], player.location, other_room) if (to_ok && length(exits) == 2) $building_utils:make_exit($su:is_numeric(exits[2]) ? toint(exits[2]) | exits[2], other_room, player.location) endif endif "Last modified by Dax (#789) on Tue May 3 14:09:29 2005 MDT." . 0