Ive dated my ex for a year and a half and it's been four months since we broke up. Durning these four months we've been acting like we're together and it's as if we are almost back together. The only thing getting in the way is that she likes another guy. She said the whole situation is complicated and that she has a flirty connection with the guy but she still loves me and wants to be with me. There's nothing else I want more than to have her back. I feel as if I wouldn't have a worry in the world as long as I know I have her. Is it worth trying to win her heart or is it pointless? When we're together, everything is perfect and we're both completely happy. She just has a problem of having to drop one person over the other.
So what should I do?
So what should I do?

Leave her, please just leave her alone. She is being indecisive and is probably getting some sort of pleasure form the romantic excitement and from having control of you and your feelings.
Please leave her, girls like this are no good. If she loved you and valued you as much as you think that she does, she'd be with you, not checking other fences to see how much greener their grass is.
The best advice I can give, from my experience, is to follow your heart. If she keeps playing games, there will come a point where it's not worth it for you to you to try anymore. At this point it will be very easy to walk away. And if she happens to change her mind between now and then then she will comes back to you and you have the choice.
I was in a similar situation, and by the time she choose to come back to me I had reached the point where I no longer respected her as a person or wanted her back anymore. I know nobody can say anything to make you feel better, but maybe you can learn something from a random strangers heart break lolz.
My advice is to try and act more like just friends with her, as much as you may not like to. A stronger division between what being in a friendship and a relationship is will help situations like this. It would help her make up her mind on whether she really does not want to be in a relationship with you. It is not fair to you if she wants to be with another guy as well as you. She needs to evaluate and figure out her feelings before you guys try getting back together.
And as for staying a couple... it's still your decision to make, but I strongly advise against pursuing this girl. In my experience, a situation like this never ends well.
Who knows? Maybe you'll find someone who's a little more emotionally stable, instead of a girl who rushes into a relationship while being in great doubt.