You get an offer according to whats available and also according to your preferences
If you don't get your first, you get your second etc
and if you ranked your preferences according to your UAI then yes, you will get the offer that is closest to your UAI.