Hmm this was a clever one, but i think this should work:
Actions: unit begins casting an ability
Conditions: spell being cast equal to (your sell spell)
actions: first create 1 dialog with theese buttons:
slot 1 (if the item to sell is in slot 1)
slot 2 (if the item to sell is in slot 2)
slot 3 (if the item to sell is in slot 3)
Slot 4 (if the item to sell is in slot 4)
Slot 5 (if the item to sell is in slot 5)
slot 6 (if the item to sell is in slot 6)
Now you need to create a new dialog for every button where you choose the prize of your choose. Now create this action:Game - Display to (All players) the text: (Name of (Item carried by (Target unit of ability being cast) in slot 1,2,3,4,5,6(depends on what button is picked))
and then another message where it stand the price he choosed. Now you need 1 more dialog with theese buttons
Yes, i accept the prize and want to buy the item.
No, i dont want to buy the item.
and show it for all players, The player that press yes first gets the unit and looses the amount of gold he prized it.
I hope you understand anything, and you probably do if you know anything about triggers
just test around and i'm sure you'l find the solution.
Note: All this about dialogs is almost made from If/then/else actions.
/Sr3dna