While lua scripting has been implemented in many emulators, lsnes breaks away from the implementation from most other emulators.
Below are instructions on how to work with the lua implementation in lsnes.
The following are less critical to know, but may still give insight to a few programming tricks:
It is assumed that you have some base knowledge of lua. If you need further help, use this lua reference manual.