Make a concrete plan to do something else and stick to it. It doesn't really matter what it is, as long as it's not going to the pub.
If you simply plan to "not go" and have nothing else but idle time, it will be much easier to talk yourself into just going to get a drink.