cwScript 

will be a simple script engine to code events in your mod file without shipping real javaScript code