Basically the quest would allow the player to trade various items to a vendor in exchange for various rewards, this is how I would expect it to work.
One GlobalVariable, OrcResourceCount, would be set to 0 by default. Then, I would attach a global called, OrcResourceValue, to the item. When the player "trades" the item through dialogue to the NPC the OrcResourceCount increases by the amount of the OrcResourceValue being traded. Then, either a dialogue condition or an If/IfElse check in the script would allow the player to "spend" the OrcResourceCount to recieve various rewards or have an effect on the game world, heres a possible example...
A dialogue condition checks to see if the player has an item that is acceptable to trade, lets say they have 3 Orcish Daggers. These Orcish Daggers have an attached OrcDaggerValue of 2. I do some math and set OrcResourceCount equal to the GetItemCount x OrcDaggerValue. Then, I use a dialogue conditional or an If/IfElse to check to see if OrcResourceCount is greater than 5. If it is true, a dialogue choice appears that allows to the player to trade for training, raw materials, etc. Now the player can either spend the points in which case I subtract OrcResourceCount by the amount of points that are equal to the check, in this case 5. Or, the player can exit dialogue and the OrcResourceCount will stay at its new value of 6, and the player can save up the points to spend on something else.
Now if this above idea is possible I want to see if something even cooler is possible, for example allow the player to choose to spend his "points" on something that would effect the world. Lets say when they reach OrcResourceCount reaches 20, they can "spend" the points to trigger a script that gives Orc guards better weapons; or, trigger a script that starts to send guards out on a "patrol" route. That way I could make the player feel like they are affecting and improving the world through their actions. I think this last part might be outside the scope of what they scipting language can do, but hopefully at least the former part of my idea is possible.
Please let me know if this sounds like the sort of thing that is possible. I don't want to spend several hours setting something like this up if it has no way of ever working. Also, if you have alternate ways of doing what I am attempting to do and you feel that it is a better, more efficient way of scripting it then feel free to share.Thank you!