This is just a simple selfclass command I wrote for LoW4 since it doesn't come with one in the stock release. It doesn't include mages cause I've ripped them out of my code. They shouldn't be too difficult to add in though.
[Update] Fixed a few things such as the \n\r problem and a redundant setting of generation for highlanders. Also removed the bottom usage message and replaced it with do_selfclass to make this a smaller piece of code. I'm currently working on reducing the size of the code further and will update this again when I get it working.
[Update 2] This is hopefully the final update for this snippet. I was going to include Sharmair's version of it in this release but since my version turned out not being that different from his after I finished my edits, I just borrowed some ideas from him and combined the two versions into one pretty nice one in my opinion. There's no more redundant code and I have tested it with no problems. It should be easy to add/remove classes if you need to do so. As always, let me know if you find any problems with this release.