After completing your desired quest, put a command "If Item is in inventory..." and complete with the item you are looking for stack (on example Tainted Gem) and a * on quantity:
imgur.com/LWz8ZLg
Then you go on item tab and select "To bank from inv" and add the item name:
imgur.com/spVKJBh
Add Complete command to the quest you are looking for and then, on Item tab again, select "to inv from bank" and the item name:
imgur.com/8GQ1aU7
Now change to Get drop on item tab and add command:
imgur.com/gcJqO8o
Note: Do not select "Pick-up white-listed items" because it will accept the item while the bot are sending it to bank, inflicting a DC. So, if your quest need acceptable items, always add a Get drop command like there:
imgur.com/ULlrHBB
I have not permission to put links, so open the images if you need :)
Vi que você é BR, mas deixei em inglês pra galera do forum ver também, qualquer dúvida me adiciona.