Zoey Ripple, a University of Colorado graduate accused of wandering into a Boulder house drunk before being shot in the hip by the homeowner, pleaded guilty Wednesday to first-degree criminal trespassing and received a deferred sentence as part of a deal with prosecutors.

Her attorney said in Boulder District Court on Wednesday that Ripple may have been under the influence of a date-rape drug when the incident happened.

Under the terms of the plea agreement, Ripple, 21, received an 18-month deferred sentence, which means if she avoids another conviction during that time the felony will be wiped from her record.

“This has been an enormously traumatic incident for me,” Ripple said. “This is something that will follow me for the rest of my life. But this does not define me.”

Ripple’s attorney, Colette Cribari, said she felt the plea deal was “a good resolution in this case.”

The terms of the agreement also include no alcohol. Ripple has already been to substance-abuse classes and said she has not drunk since the incident, nor does she plan to in the future.

“This is a just result, and I am pleased this case is resolved in a manner that gives Ms. Ripple an opportunity to learn from it and move forward with her life,” said Boulder County District Attorney Stan Garnett. “The most important aspects of the court’s order are those requiring alcohol treatment and monitoring, since alcohol was clearly a substantial factor in what happened that night. This office, and law enforcement throughout Boulder County, deal daily with the public safety problems that result from excessive alcohol consumption.”

Ripple was shot and wounded around 3:30 a.m. May 23 after she wandered into a couple’s bedroom at 425 College Ave. The homeowners, Timothy Justice and Doreen Orion, told police that Ripple approached their bed holding a light and never said a word. They said they demanded repeatedly that she leave and even warned they had a gun.

Justice fired a single shot at Ripple once she was within 6 feet of him, according to court records.

After the shooting, prosecutors announced Justice would not be charged because his actions were justified under Colorado’s “Make My Day” law.

Ripple — who suffered a fractured hip in the shooting — was drunk at the time of the incident, according to court records, and thought she was at a friend’s house.

But Cribari said she believes Ripple may have been drugged sometime during the night. She said Ripple started the night out at the Goose Bar on University Hill before being invited to a party near 11th Street and University Avenue.

Although a test for the presence of drugs was not administered at the hospital, Cribari said there is no way someone as supposedly drunk as Ripple was could have made it to the house where she was shot. She said Ripple has a vague memory of being in a car, and Cribari said the presence of a drug could explain why she was able to hold conversations with officers but not remember any of them.

“We never think that this could be us,” Ripple said. “It’s so important to keep your bearings about you.”

Deputy District Attorney Tim Johnson said there was no evidence of drugs, and he asked Judge John McMullen to add either 48 hours of community service or four days on a work crew to Ripple’s sentence. He said the impact the incident has had on the victims warranted some sort of punishment.

“Homeowners have a right to be secure in their home and not barricade themselves inside,” Johnson said.

But Cribari argued that Ripple had already suffered enough. The bullet remains lodged in her back and could cause health problems for her down the road.

“If a gunshot doesn’t wake you up, what will?” Cribari said.

She also said the case has cast Ripple as a drunken college student despite all the community service she has done in Boulder, even before the incident.

“She’s been portrayed as this dumb drunk who wandered into someone’s house,” she said. “This is not who Zoey Ripple is.”

McMullen ultimately agreed and did not issue any punitive sanctions against Ripple, calling the case “unusual” in the sense that Ripple did not appear to have any intention to harm the victims and has already suffered due to her actions. He read letters from 20 people in support of Ripple, many of whom packed the courtroom at her hearing.

“According to letters, Ms. Ripple has lived an admirable life up to this point,” he said. “The media portrayal of her is something she will have to live with long after this case.”

Ripple, who hopes to someday work at a school in speech therapy, said she is now looking forward to putting the case behind her and to “start living.” She hopes to travel to Peru, when she is allowed, to continue working with a program that helps professional development for women.

“I’ve learned so much from this incident,” she said. “I hope this can continue to be a lesson for other people.”