Help idk if I'm hurting my chances

I have had some serious shoulder issues and am still dealing with it so daily I'm still taking pain medication. I back off of them frequently just to know I can but still need them to keep the pain somewhat comfortable. I have been ttc for years and know if i got a positive test I would eliminate any and all "bad" things from my life but could these things prevent pregnancy? The pain meds, excessive caffeine, lack of excercise?