Aight, here's what I got for the money thing. Unfortunatly, I couldn't get an equation for it, thus I had to do it by hand. It works pretty well, I think I have all possible chances (There's 6) for something that costs 1 silver, 65 copper. If you don't have enough silver or copper, but have a gold, it'll pull it from there, or if you have 2 silver, but no copper, it'll pull it from there.
Bonus is cute little icons and an edited Gold Cash effect. Didn't bother fixing the fact that if you have too little money the item just vanished...couldn't rememember how to restock. Hopefully someone on the team will be able to improve upon it, but the icons look pretty at the top.