... The final leg of this three-legged statutory stool is N.J.S.A. 2B:12-31(a)(2), which authorizes the municipal court to order the ... do any other act as a condition of that sentence . . . .' N.J.S.A. 2B:12-31(b) requires that '[p]rior to any action being taken ...