Edit: Sorry that I didn't add a tag to the thread, not used to that :)
So Rochet2 created this script for me like a year ago or so, I decided I wanted to fix it to work with the current revision, I had some help from LilleCarl, Rochet2 and JameyBoor to update it (as I just recently started C++...