Or at least make them try to restock ammo from a certain area, instead of just running for whichever bolt catches their fancy?
Paint an ammo pile 3x2 down the floor just inside the fortified wall-murder hole with absolutely zero bins. Lock down the fortress, by lifting drawbridge in front entrance, and using a forbidden door in the back entrance. As the sieging targets get shot down, and ammo starts to run thin, other dwarfs with hauling will bring more ammo to your 3x2 ammo stockpile if you allow for it, by including that stockpile, and the craftstation making ammo, inside the Civilian(CIV) "Danger" Burrow, you'll have an unlimited amount of ammo, aslong as the logs hold out. They will shoot and shoot and shoot.
I'm assuming your ordering them to Defend Burrow next to a murder hole. I mix the ammo 3x2 stockpile with 2 barrels of beverages and remove the drink container from the marksdwarf uniform. Not sure why I do that, maybe so they hold more ammo, but I can't remember why. For undead I think you need a bigger gun, however. A ballista bolt aimed directly at trapped sieging targets, caught within a goblin grinder, works very well for mass elimination.
Dont cut corners like I sometimes break down and do. Never do far corner to far corner(FCFC), multi-z-level reclaims to get more goblinite. I forbid all the Forbid options in orders so they never run out, unless I make them. A FCFC reclaim will goof up the ammo supply and dwarfs will run out to reclaim single bolts and get murdered occasionally. Just a heads up, if your in a calm embark, ya might be able to do do that, but not with a tower neighbor, I don't think. Sincerely, Knutor