Well you wouldn't be able to call the function from in game.
Best you could do is create a macro that does the donating. It would only be ale to donate all resources, you wouldn't be able to make it filter what to donate. Macros just arn't big enough to have that much coding in them.
you would probably need to use
Code: Select all
local inventoryIndex, icon, name, itemCount, locked, invalid = GetBagItemInfo ( bagIndex )
but this doesn't tell you the type of the item, best you could do is use the name. but like I said macros can't be that big, so you couldn't make a table of names for every resources type.
If you were going to do this you would probably need to create it as an addon and not a macro.