There is a vendor stock program called "Vendor Stock 1.1" available on easyuo. The author is Penny. It kicks ass for stocking your vendors and I use it when I am stocking a pile of the same item. Its not an AFK stocker, but it might have some pieces you could use. If you are only going to do ingots, you could pull out a lot of the variability and hard code it to stock just what you want, from where you store it. For example, it will pull items from a bag/ container not on your character, drop them on the vendor and price them. Probably has most of the subs your script would use.
You might look at some of the BOD gathering scripts for character log in routines.