My 24 month old just weaned last month. We had a similar problem. She wasn't wanting to eat during the day...or dinner time, and then she'd nurse all night. So we had two or three bad habits to break. She was also using me as a pacifier like a few people suggested.
I had hoped for a gentle wean where she'd just not be intersted anymore, but I didn't get my wish.
I finally had the last straw after finding out I was pregnant and extremely sore. She woke up one night and wanted to nurse every hour. With the pregnancy, I was drying up quickly and feeling extra sick because of the need for fluid. After about 3 feedings, I was out of milk....so, we began the weaning process completely.
It was a rough and she cried for about 4 hours. I think she woke up at some point and cried another one or two. However, at that point there was nothing I could do. It was too painful to even try to let her use it as a pacifier. I started the broken record approach. "No, milk is all gone, you drank it all." I didn't explain anything else....just no, you drank it all. I held her and rocked her. The next morning we both slept in.
The next day I enforced the "all gone" concept by giving her some M'Ms and letting her ask for more a few times....then warning her that there were only 3 left...then 2...then 1...then all gone. No more. I did that two or three times over a few days. I also warned her over the next few days that milk was almost gone (cut the nap nursing out very last).
Night two.... she woke up wanting it again. By that point I was like, "we're weaning; I"m not doing this again at another point.' She woke up and cried for 2 hours and at that point wouldn't let me comfort her at all. She scooted herself as far from me in our King bed as she could. DH was sleeping in another room b/c he was sick. She cried herself to sleep and that was it.
Night three....woke up, asked for it...whimpered when she asked for it and I said no it was all gone....and went back to sleep.
At that point, I was okay with letting her cry. It's her first big "loss" in life and I figured maybe she was just
"mourning it." When we lose something or someone, we cry....
Then we had to deal with the not eating during the day.....about a week later, she woke up around 4 wanting to eat and so then I had to start the broken record of, "No it's sleeping time, we don't eat when it's sleeping time. We sleep." She screamed for about an hour, but she was fine after that. Woke up like nothing happened. She is sorta eating better, she doesn't wake up to eat anymore.
Good luck. I was super concerned about damaging her for life or damaging our relationship. She did fine and in fact got more sweet and cuddly. I never lost my temper with her when she was weaning and just kept telling her I loved her. She ended up becoming more confident and independent once she weaned. It was awesome to see that change in her.