stumped and in a rut

There is this guy I have been into for a rlly long time. He constantly uses me and we have a long history of lots of complicated things mostly him either getting bored with me and then coming back to me. I always let him walk all over me but I know I shouldand I try rlly hard not to and to get over him, but I can't. What do I do?