A script entry can not record all of your actions in a portable form. Everything that can not be written in a general form is not recorded. You can not record the offset, because it should be written in a general form, and so you can not do it. You can not say - apply an offset to the 3 result of the search, because tomorrow it will not be the third search result. Even on your device or on another device. If you save the memory address in the script, the script will become useless even after the game is restarted. In general, writing a script is not intended to make a ready script, it is impossible by definition, but to provide some workpiece, for later manual editing. Well, or for writing VERY simple scripts. Something like found a group search and replaced / frozen everything. Not more difficult than this.
_______________________________________________
added 1 minute later
And what you are talking about (shifting) requires a fine and precise work. Cycles, a clear understanding of what is happening, and why.