A little room for improvement:
When you require the same item for two quests (i.e. spade for Ernest the Chicken and X Marks the spot) the script requires two of the item.
Case by case, maybe. But for the entire userbase? That must be more than 100 million recordsets a week for trade transactions between players only. Just sorting such an amount of data is a massive headache and takes minutes. Possible but too expensive in my opinion.