I'm not 100% sure how this works but here goes anyway.
When you warp into a belt, find a roid that you want to mine. Make sure you have a spawn consisting of 3-4 cruisers, no frigates, no bs, as they deal damage fast!
Only shoot ships that attack you (you should know by which ships have targetted you) if a ship doesnt attack you, dont shoot it, unless it starts attacking you.
DO NOT KILL OFF SPAWN

If you kill of the spawn, there will be a new spawn of a unpredictable size and the position of where they spawn is randomized. You could get a battleship(s) for all you know by killing off the spawn.
By not killing of the spawn, the current spawn will keep trying to regrow to the original size. Eventually you might get a spawn of 4 cruisers which just ignore you and your corp mates.
I cannot guarantee that this will work, however i have had it work with Angel Legionaires/Scouts. It takes about an hour to do and lasts until they jump out the belt and a new spawn jumps in, which is a very long time.
I have not tried this will frigate/bs npc rats and i have no idea how they would react to the method of which I use.
Please send me a PM of how you got on with this method with the different types of NPC
Regards
Pyros