#! perl # this script loads all unique-item maps and removes unique exits on them, # because the new map file format does not have a need for exits to be marked unique. cf::async { my $maps = Coro::AIO::aio_readdir "/var/crossfire/unique-items"; for my $mapname (grep !/\.pst$/, @$maps) { $mapname =~ s/∕/\//g; my $map = cf::map::find_map $mapname or next; $map->load; for my $x (0.. $map->width - 1) { for my $y (0.. $map->height - 1) { for my $ob (grep $_->type == 66, $map->at ($x, $y)) { $ob->destroy if $ob->flag (cf::FLAG_UNIQUE); } } } Coro::Timer::sleep 0.2; } }; 1