after viewing your code i see that you have long way to make this work and i am not talking about light wheighting the code...
you could make a fake system with 1 thread and 4 classes MAX (dress(skills, items), ai(attacking, movement skilluse, talking), mechanics(spawns, maps etc), and load) calls with Rnd (wont be perfect but its still shitty :D ) but you created a heavy engine without point that needs alot of work that you wont have the time eventually to finish.
after all this years i think the parts on l2 you should focus on creating should be more on new technologies and implementing them as extensions on l2 for example mailing systems live sound like radio for l2 clients live broadcasts you name it and code it this is wasting of your time and skill.
if you continue good luck to make it stable.