Buying packs/boxes is always going to have the random factor. There's no guaranteeing you'll get a copy of every card. If you want to make sure you get the whole set the easiest way is to buy the set from TLG.
If you want to spend less and get boxes/packs instead you can always make a trade thread in the Market and see if people will trade you ones you didn't get for extras/duplicates you did.