i havent done it myself, but i'm prety sure it is done with a couple of scripts and an off screen item box....
you put a box off the screen and fill it with stuff, and then give it a script to re-plenish it's stocks over a period of time
next you give the "trader" a script that deals with the talking and stuff, then when you pick the trading option, it swaps out the stuff in his personal inventory and replaces it with the stuff from the off screen box...
the trader should have it's "can trade with" flag set to yes...