SALEM – A Lynn woman arrested for selling crack cocaine to an undercover officer was allowed to plead guilty to reduced charges.Hyishma Ramsay, 28, who last lived at 34 Hanover St., #4, avoided a trial Wednesday in Salem Superior Court by pleading guilty to possession with the intent to distribute cocaine and distribution of cocaine.The confession before Judge David A. Lowy, spared her of a minimum mandatory punishment of three years in state prison on one of the charges.Lowy sentenced her to two and a half years in prison, with three years of probation to follow as agreed by Assistant District Attorney Michael A. Sheehan and defense lawyer Randi J. Potash.It was around 12 a.m., on April 20, 2007, when undercover Lynn Detective Oren Wright was approached by a Lynn man, Alieu Ceesay, 34, in the Washington Street area who first asked him if he could spare some change, then asked him if he would be interested in purchasing crack cocaine.Ceesay made a call on his cell phone and the two proceeded to Hanover Street where Ramsay came out of 34 Hanover St., and sold Wright a twist of crack cocaine from the front foyer of the building.Police then executed a search of the apartment she shared with her aunt. Inside a purse on the couch, police found additional cocaine, about 24 grams, along with her identification and $712 in cash.When Ramsay gets out of prison, she will be on probation for another three years and will receive drug counseling and treatment as deemed necessary by probation officials, random screenings and must be employed or have five job applications on file.Because of the drug convictions, Ramsay will lose her driving privileges in Massachusetts for at least five years.The judge credited Ramsay the 106 days she has spent in jail awaiting trial on her case.Ceesay was placed on five years of probation in November.