If only one section of the carpet is affected, test each color in that section. If the whole carpet is affected, test each color in the carpet in four or five different areas. The carpet needing treatment will have to stay damp while the enzymatic action takes place. After the odor is removed, rinse the affected area thoroughly. If the stain is less than 3-6 months old, it should come out without much more treatment than this.
Cats are quite intelligent.