Something like this: http://forum.gamedeception.net/showthread.php?t=5484
Yeah, I suppose I could write a script function to do this using external variables, but it seems to me that a hardcoded function would be faster and easier to use. It'd make it very easy to write script hacks (especially when your trainer maker is complete) that update themselves after each new game patch.