Replying to PM by DoctorJohn, who asked for Lua assistance, here in case anyone else is interested:
Here are some scripts from my bug reporting posts about pcsx-rr:
http://tasvideos.org/forum/viewtopic.php?p=221795#221795
Additionally, here's the proof-of-concept script previously mentioned. You'll need libfft.lua linked in the above thread. As you'll see, the routine is quite rough and doesn't offer much more than a way to crudely inflict damage. The final version of this would overload the function call with '<' and '>' so that it could be used for evasion as well.
http://dl.dropbox.com/u/2275704/TAS/Final%20Fantasy%20Tactics/libfft.lua
If you're planning on engaging Lua in pcsx-rr be forewarned that any pcsx.pause() statements used cannot be removed due to them affecting program flow. Personally, I'm waiting for the next version before I head back into this with any zeal.