HOLY AUTOMATED REFACTORING BATMAN.
Anyways, I've written a script that pulled out the functions from the event numbers in doEvent.as, and then went through all the .as files in ./includes and replaced the event numbers with the corresponding functions. Hopefully, it won't cause too many issues, it certainly compiles, in any event.