ignition resistor question

Ok I appreciate the info guys and the engine had not been sitting for 14 years it came running out of an even that had only been sitting for a couple months but still fired when I pulled it. The cap and rotor I replaced. Ill check the gap and give the ecu a good inspection to see if that may be the problem but what gets me is the fact that it fire every now and again. For example the truck has been sitting for a couple weeks bc I have been busy and when I parked it last it wouldn't for again. By just the other day I went out and cranked it for $#it$ and giggles and boom fired right up and has started find the last couple times I've cranked it...