CONCORD, N.H. (AP) — Drugmaker Johnson & Johnson has agreed to pay $40.5 million in a settlement with New Hampshire over its role in the opioid addiction crisis, days before the case was scheduled for trial, the state attorney general's office said Thursday.