Hey guys. I was wondering if there is a way to create an NPC (perhaps with the already existing mesh) and give it the ability to perform functions. For instance, a shopkeep of sorts. I have created an in-game economy on my private server and instead of using a storage box mechanism, I would like to have an NPC to have the ability to take items within the game and turn them into different items (currency). Sort of how the compost bin turns thatch and feces into fertilizer. Just as an example, you access the NPCs inventory and give him a rifle. He then turns the rifle into metal ingots.
I guess the first question is can I even create an static NPC whose only function would be to staff a trading outpost.
Second, how would I go about giving this NPC the ability to do what I described.
Third, is there a way to set a value on any given item in the game for use by the NPC
Thanks ahead guys.