It will check if the last of selected item was consumed and do ::OnRestock NPC Event to restock the items to the selected amount. Works very well and without any ms of lag. Thanks to @Dastgir
Fixed and corrected. Works fine on current branch.
How to enable:
Move "restock.c" to...