As far as I know, and this is a constant point of frustration for me, there is no source code for the script editor... at least, not that has been made open source. If anyone finds the source code for the script editor, or creates a script editor for this game and makes the code open source, PLEASE let me know.