This is an even simpler script that adds a given value to all FRAME and NEXT= lines in the data provided.

Hurrah for regexes!

Offset to add:
Existing states: