hi kisai,
that's a rather big and complex cap file; i'm afraid most people won't have the time to read & understand it all the way. it is a lot easier to tackle problems when they are 'on their own'. do you think it would be possible to do that?
whenever i try to build something new (e.g. a menu system), i first try to make my idea work in a fresh cap. that way, all the bugs i encounter are those of my system, and i don't have to worry about strange interferences from other parts. it also helps to find construct bugs/twists that prevent it from working the way i imagined it; these are sometimes very hard to find & can drive you to frustration. if you get stuck that way, it is also more likely that other people can spot the errors when the cap is small. so it's always a good idea to start clean, in a scope that you can grasp completely, and hunt down all the bugs before trying to implement it into an existing system.
i don't know why your animation glitches or how your menu & item system works; but i think that the item system you describe could be more easily done using the hash table object instead of any global or private variables. you could just add any collected item name as a key, and, in case the item type is already in the inventory, add to the existing key's value. that would make for a more flexible system, since you can add/remove keys from the hash table during runtime and don't have to worry about adding variables etc. for every object you would like to have in your game.