Here are some thoughts on the topic from a screenplay perspective.
As is pointed out in the comments,
If one uses "for" in temporal context, the use of for is necessary when referring to a positive span of time. As in:
I smoked for five years.
If one uses for in a negative temporal context:
I have not touched a cigarette for five years.
it seems to carry a slight tinge of continuation of the state, compare this to
I have not touched a cigarette in five years.
which seems to bring that state to current close. That is to say, the in implies a closure of the period.
if i was to write a dialogue in a screenplay for two situations:
someone who is saying no to a cigarette i would use the first.
someone who is accepting a cigarette (possibly in a nervous situation and is talking to themselves) i would use the second.
Addendum
Compare the following remarks from one person to another in a house:
I haven't been here for a long time.
vs.
I haven't been here in a long time.
The former implies time period that is continuing (starting from arrival) whereas the latter refers to the state that ended when the subject arrived at the house.