most times it starts and runs perfect....then it turn but not start.. on 2004 Ford Ranger

a shade tree mech took off one wire @the roter and it started..said needed plugs/wires/roter/batery....fine for about two weeks..then the same think.what would cause it stare and run great,,,and not..the last time after it set a while it started just fine....98000 miles