Well if i understood what youre trying to do right, you need to make the building sell dummy units or items. These units or items shouldnt cost anything, and when you buy them they should be removed from the game. Then make a trigger that gives the player who bought the unit/item a quest depending on whitch item he bought.